Skip to content

Fix G19 macro key handling on newer Linux systems#45

Open
MiQ71 wants to merge 1 commit into
mortendynamite:masterfrom
MiQ71:fix-g19-gkeys-linux-mint
Open

Fix G19 macro key handling on newer Linux systems#45
MiQ71 wants to merge 1 commit into
mortendynamite:masterfrom
MiQ71:fix-g19-gkeys-linux-mint

Conversation

@MiQ71

@MiQ71 MiQ71 commented Jun 7, 2026

Copy link
Copy Markdown

Problem

On Linux Mint 22 (Ubuntu 24.04 based), Logitech G19 macro keys only worked once after starting g19daemon.

The first key press was detected correctly, but subsequent G-key presses were ignored until the daemon was restarted.

Root Cause

The G19 macro interface (046d:c229) exposes endpoint 0x83 and produces additional 7-byte reports besides the actual macro key reports.

The current implementation uses a 4-byte buffer and does not correctly handle these additional reports.

Changes

  • Increase gKeysBuffer from 4 to 7 bytes.
  • Use endpoint 0x83 explicitly for the macro interface.
  • Ignore non-macro reports (buffer[0] != 0x02).
  • Re-submit transfers after ignored reports.
  • Properly handle key release events.

Testing

Tested on:

  • Linux Mint 22.3 (Zena)
  • Logitech G19 (046d:c229)

Verified:

  • G1-G12 work repeatedly.
  • M1/M2/M3 profiles work correctly.
  • Multiple consecutive key presses are detected reliably.
  • Commands assigned to G-keys can be executed repeatedly without restarting the daemon.

Related

This appears to resolve the behavior originally reported in issue #33.

@qwertychouskie

Copy link
Copy Markdown

Apparently OP's account got automatically shadow banned on GitHub for a bit, but it's back now. Just posting this here to make sure it's known that this PR exists now that it's actually visible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants