Public bug reported:

The Logitech Gaming Keyboard G213 (USB ID 046d:c336) exposes two HID
interfaces, both registered as keyboard input devices (event2 and event3
/ input0 and input1). The secondary interface (bInterfaceNumber 01,
event3) generates conflicting and garbled escape sequences that
interfere with events from the primary interface.

Symptoms observed after upgrading to Ubuntu 26.04 LTS (kernel 7.0.0-15-generic; 
actually Kubuntu, upgrade was via `do-release-upgrade` so was not a fresh 
install; using the default Wayland, not X11):
- Home key triggers ^[[3~ (Delete escape sequence) instead of moving to start 
of line/list
- Right-shift key not recognised (libinput reports keycode -1)
- End key works correctly on the primary interface but event3 also fires 
conflicting sequences

Diagnosis:

Running `sudo libinput debug-events /dev/input/event3` while pressing
Home, End, and modifier keys produced raw escape sequences (^[[H, ^[[F,
^[[D, ^[[C etc.) confirming that event3 is sending its own independent,
conflicting key events.

The primary interface (event2) correctly reports KEY_HOME (102) and
KEY_END (107), but KEY_HOME is tagged with ^[[3~ due to interference
from event3.

Workaround:

Prior to troubleshooting with Claude.ai I `sudo apt install`-ed
`libinput-tools`, and `--reinstall` was done for `udev` and for
`kglobalacceld`.

The ultimate fix was then creating the following udev rule resolves the
issue by telling libinput to ignore the secondary interface:

File: /etc/udev/rules.d/99-g213-fix.rules

ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c336", KERNEL=="event*",
ATTRS{bInterfaceNumber}=="01", ENV{LIBINPUT_IGNORE_DEVICE}="1"

After `sudo udevadm control --reload` and unplug then replug of the
keyboard, all keys work correctly.

According to Claude.ai, a proper fix would be "a hwdb entry or HID quirk
for 046d:c336 to suppress or correctly handle the secondary interface,
so that G213 users are not affected on clean installs or upgrades".

System information:
- OS: Ubuntu 26.04 LTS (Resolute Raccoon)
- Kernel: 7.0.0-15-generic
- Device: Logitech Gaming Keyboard G213, USB 046d:c336, bcdDevice 9.00
- Driver: hid-generic

*Claude code used to help with writing this report and finding the bug;
https://claude.ai/share/aaba93cf-b551-4ae2-b83a-b22b3c813ff6. Fix
confirmed to work for me. I have read through and manually edited and
expanded this submission.*

ProblemType: Bug
DistroRelease: Ubuntu 26.04
Package: linux-image-7.0.0-15-generic 7.0.0-15.15
ProcVersionSignature: Ubuntu 7.0.0-15.15-generic 7.0.0
Uname: Linux 7.0.0-15-generic x86_64
ApportVersion: 2.34.0-0ubuntu2
Architecture: amd64
AudioDevicesInUse:
 USER        PID ACCESS COMMAND
 /dev/snd/controlC2:  pbhj      26866 F.... wireplumber
 /dev/snd/controlC1:  pbhj      26866 F.... wireplumber
 /dev/snd/controlC0:  pbhj      26866 F.... wireplumber
 /dev/snd/seq:        pbhj      26860 F.... pipewire
CasperMD5CheckResult: pass
CurrentDesktop: KDE
Date: Sat May 16 22:41:58 2026
InstallationDate: Installed on 2022-08-03 (1383 days ago)
InstallationMedia: Kubuntu 22.04 LTS "Jammy Jellyfish" - Release amd64 
(20220419)
MachineType: Micro-Star International Co., Ltd. MS-7A38
ProcFB: 0 amdgpudrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-7.0.0-15-generic 
root=UUID=206622ca-abb2-4264-93a0-12f19aed357a ro quiet nosplash
PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: No 
PulseAudio daemon running, or not running as session daemon.
SourcePackage: linux
UpgradeStatus: Upgraded to resolute on 2026-05-16 (0 days ago)
dmi.bios.date: 09/03/2024
dmi.bios.release: 5.17
dmi.bios.vendor: American Megatrends International, LLC.
dmi.bios.version: 8.H4
dmi.board.asset.tag: To be filled by O.E.M.
dmi.board.name: B450M PRO-VDH V2 (MS-7A38)
dmi.board.vendor: Micro-Star International Co., Ltd.
dmi.board.version: 6.0
dmi.chassis.asset.tag: To be filled by O.E.M.
dmi.chassis.type: 3
dmi.chassis.vendor: Micro-Star International Co., Ltd.
dmi.chassis.version: 6.0
dmi.modalias: 
dmi:bvnAmericanMegatrendsInternational,LLC.:bvr8.H4:bd09/03/2024:br5.17:svnMicro-StarInternationalCo.,Ltd.:pnMS-7A38:pvr6.0:rvnMicro-StarInternationalCo.,Ltd.:rnB450MPRO-VDHV2(MS-7A38):rvr6.0:cvnMicro-StarInternationalCo.,Ltd.:ct3:cvr6.0:skuTobefilledbyO.E.M.:pfaTobefilledbyO.E.M.:
dmi.product.family: To be filled by O.E.M.
dmi.product.name: MS-7A38
dmi.product.sku: To be filled by O.E.M.
dmi.product.version: 6.0
dmi.sys.vendor: Micro-Star International Co., Ltd.

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug resolute wayland-session

** Description changed:

  The Logitech Gaming Keyboard G213 (USB ID 046d:c336) exposes two HID
  interfaces, both registered as keyboard input devices (event2 and event3
  / input0 and input1). The secondary interface (bInterfaceNumber 01,
  event3) generates conflicting and garbled escape sequences that
  interfere with events from the primary interface.
  
- Symptoms observed after upgrading to Ubuntu 26.04 LTS (kernel 
7.0.0-15-generic; actually Kubuntu, upgrade was via `do-release-upgrade` so was 
not a fresh install):
+ Symptoms observed after upgrading to Ubuntu 26.04 LTS (kernel 
7.0.0-15-generic; actually Kubuntu, upgrade was via `do-release-upgrade` so was 
not a fresh install; using the default Wayland, not X11):
  - Home key triggers ^[[3~ (Delete escape sequence) instead of moving to start 
of line/list
  - Right-shift key not recognised (libinput reports keycode -1)
  - End key works correctly on the primary interface but event3 also fires 
conflicting sequences
  
  Diagnosis:
  
  Running `sudo libinput debug-events /dev/input/event3` while pressing
  Home, End, and modifier keys produced raw escape sequences (^[[H, ^[[F,
  ^[[D, ^[[C etc.) confirming that event3 is sending its own independent,
  conflicting key events.
  
  The primary interface (event2) correctly reports KEY_HOME (102) and
  KEY_END (107), but KEY_HOME is tagged with ^[[3~ due to interference
  from event3.
  
  Workaround:
  
  Prior to troubleshooting with Claude.ai I `sudo apt install`-ed
  `libinput-tools`, and `--reinstall` was done for `udev` and for
  `kglobalacceld`.
  
  The ultimate fix was then creating the following udev rule resolves the
  issue by telling libinput to ignore the secondary interface:
  
  File: /etc/udev/rules.d/99-g213-fix.rules
  
  ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c336", KERNEL=="event*",
  ATTRS{bInterfaceNumber}=="01", ENV{LIBINPUT_IGNORE_DEVICE}="1"
  
  After `sudo udevadm control --reload` and unplug then replug of the
  keyboard, all keys work correctly.
  
  According to Claude.ai, a proper fix would be "a hwdb entry or HID quirk
  for 046d:c336 to suppress or correctly handle the secondary interface,
  so that G213 users are not affected on clean installs or upgrades".
  
  System information:
  - OS: Ubuntu 26.04 LTS (Resolute Raccoon)
  - Kernel: 7.0.0-15-generic
  - Device: Logitech Gaming Keyboard G213, USB 046d:c336, bcdDevice 9.00
  - Driver: hid-generic
  
  *Claude code used to help with writing this report and finding the bug;
  https://claude.ai/share/aaba93cf-b551-4ae2-b83a-b22b3c813ff6. Fix
  confirmed to work for me. I have read through and manually edited and
  expanded this submission.*
  
  ProblemType: Bug
  DistroRelease: Ubuntu 26.04
  Package: linux-image-7.0.0-15-generic 7.0.0-15.15
  ProcVersionSignature: Ubuntu 7.0.0-15.15-generic 7.0.0
  Uname: Linux 7.0.0-15-generic x86_64
  ApportVersion: 2.34.0-0ubuntu2
  Architecture: amd64
  AudioDevicesInUse:
-  USER        PID ACCESS COMMAND
-  /dev/snd/controlC2:  pbhj      26866 F.... wireplumber
-  /dev/snd/controlC1:  pbhj      26866 F.... wireplumber
-  /dev/snd/controlC0:  pbhj      26866 F.... wireplumber
-  /dev/snd/seq:        pbhj      26860 F.... pipewire
+  USER        PID ACCESS COMMAND
+  /dev/snd/controlC2:  pbhj      26866 F.... wireplumber
+  /dev/snd/controlC1:  pbhj      26866 F.... wireplumber
+  /dev/snd/controlC0:  pbhj      26866 F.... wireplumber
+  /dev/snd/seq:        pbhj      26860 F.... pipewire
  CasperMD5CheckResult: pass
  CurrentDesktop: KDE
  Date: Sat May 16 22:41:58 2026
  InstallationDate: Installed on 2022-08-03 (1383 days ago)
  InstallationMedia: Kubuntu 22.04 LTS "Jammy Jellyfish" - Release amd64 
(20220419)
  MachineType: Micro-Star International Co., Ltd. MS-7A38
  ProcFB: 0 amdgpudrmfb
  ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-7.0.0-15-generic 
root=UUID=206622ca-abb2-4264-93a0-12f19aed357a ro quiet nosplash
  PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: No 
PulseAudio daemon running, or not running as session daemon.
  SourcePackage: linux
  UpgradeStatus: Upgraded to resolute on 2026-05-16 (0 days ago)
  dmi.bios.date: 09/03/2024
  dmi.bios.release: 5.17
  dmi.bios.vendor: American Megatrends International, LLC.
  dmi.bios.version: 8.H4
  dmi.board.asset.tag: To be filled by O.E.M.
  dmi.board.name: B450M PRO-VDH V2 (MS-7A38)
  dmi.board.vendor: Micro-Star International Co., Ltd.
  dmi.board.version: 6.0
  dmi.chassis.asset.tag: To be filled by O.E.M.
  dmi.chassis.type: 3
  dmi.chassis.vendor: Micro-Star International Co., Ltd.
  dmi.chassis.version: 6.0
  dmi.modalias: 
dmi:bvnAmericanMegatrendsInternational,LLC.:bvr8.H4:bd09/03/2024:br5.17:svnMicro-StarInternationalCo.,Ltd.:pnMS-7A38:pvr6.0:rvnMicro-StarInternationalCo.,Ltd.:rnB450MPRO-VDHV2(MS-7A38):rvr6.0:cvnMicro-StarInternationalCo.,Ltd.:ct3:cvr6.0:skuTobefilledbyO.E.M.:pfaTobefilledbyO.E.M.:
  dmi.product.family: To be filled by O.E.M.
  dmi.product.name: MS-7A38
  dmi.product.sku: To be filled by O.E.M.
  dmi.product.version: 6.0
  dmi.sys.vendor: Micro-Star International Co., Ltd.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2152810

Title:
  Logitech G213 keyboard (046d:c336) secondary HID interface causes
  garbled key events — Home acts as Delete, right-shift unresponsive

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2152810/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to