You are not logged in.

#1 2019-09-04 14:01:15

F43nd1r
Member
Registered: 2019-09-04
Posts: 11

[Solved]Kernel update 5.2.11 broke some of Logitech G502 functionality

Usually, my mouse registers as 4 entries in /dev/input/by-id

> ls /dev/input/by-id | grep Logitech_Gaming
usb-Logitech_Gaming_Mouse_G502_0A87355F3331-event-if01
usb-Logitech_Gaming_Mouse_G502_0A87355F3331-event-mouse
usb-Logitech_Gaming_Mouse_G502_0A87355F3331-if01-event-kbd
usb-Logitech_Gaming_Mouse_G502_0A87355F3331-mouse

but after the update to kernel 5.2.11, it only shows two of them, and my additional mouse buttons do not work.

> ls /dev/input/by-id | grep Logitech_Gaming
usb-Logitech_Gaming_Mouse_G502_0A87355F3331-event-mouse
usb-Logitech_Gaming_Mouse_G502_0A87355F3331-mouse

Downgrading to 5.2.10 fixed this, but that is obvisously not a permanent solution. How do I fix this properly?

Last edited by F43nd1r (2019-09-23 21:30:34)

Offline

#2 2019-09-04 14:41:19

Omar007
Member
Registered: 2015-04-09
Posts: 332

Re: [Solved]Kernel update 5.2.11 broke some of Logitech G502 functionality

How are you using/binding the additional buttons? Are you depending/binding to the specific keyboard device? (e.g. usb-Logitech_Gaming_Mouse_G502_0A87355F3331-if01-event-kbd)
If so, update that reference to the mouse one instead.

I believe the 5.2.11 kernel added IDs to the Logitech driver for several mice, including the G502, so the device is probably handled by the Logitech driver now instead of generic drivers and, as a result, finally shown as a single device; a Logitech mouse. (instead of a generic mouse+keyboard. Note that it still shows 2 entries even though it's a 'single' device, read the edit/note below)
The events of the additional buttons should still be available but now, all are presented through a single device instead of some of them out of a 'mouse' device and some out of a 'keyboard' device.
If that is not the case, it sounds like a bug.


EDIT/NOTE: for extra information (based on my limited knowledge on linux kernel input handling, someone please correct me if I'm wrong wink ), the reason you see 4 devices is that the linux kernel has several input handlers.
The relevant ones here are: evdev (/dev/event*), mousedev (/dev/mouse*) and keyboard.
With the old kernel, the device was not detected as a single device but as a (generic) mouse and keyboard. This creates an entry for keyboard, mousedev, an evdev for the keyboard and an evdev for the mouse; 4 total
With the new kernel, the device is most likely finally detected as a single device (a Logitech mouse) so instead it's only handled by mousedev and evdev; 2 total.

EDIT2:

https://lwn.net/Articles/797814/ wrote:

Filipe Laíns (1):
      HID: logitech-hidpp: add USB PID for a few more supported mice

Last edited by Omar007 (2019-09-04 14:56:36)

Offline

#3 2019-09-04 14:55:52

F43nd1r
Member
Registered: 2019-09-04
Posts: 11

Re: [Solved]Kernel update 5.2.11 broke some of Logitech G502 functionality

Omar007 wrote:

How are you using/binding the additional buttons?

The mouse has an internal storage, which I've configured using Logitech Gaming Software on a Windows System.

Omar007 wrote:

The events of the additional buttons should still be available just fine but now, all are presented through a single device instead of some out of a 'mouse' device and some out of a 'keyboard' device. If that is not the case, it sounds like a bug.

Button presses were completely ignored, I tried to detect them with showkey, but that did nothing.

Offline

#4 2019-09-04 14:59:58

Omar007
Member
Registered: 2015-04-09
Posts: 332

Re: [Solved]Kernel update 5.2.11 broke some of Logitech G502 functionality

F43nd1r wrote:

Button presses were completely ignored, I tried to detect them with showkey, but that did nothing.

Afaik, showkey is for keyboard only, isn't it??

Try `xev` instead please.

Offline

#5 2019-09-04 16:24:26

F43nd1r
Member
Registered: 2019-09-04
Posts: 11

Re: [Solved]Kernel update 5.2.11 broke some of Logitech G502 functionality

Omar007 wrote:
F43nd1r wrote:

Button presses were completely ignored, I tried to detect them with showkey, but that did nothing.

Afaik, showkey is for keyboard only, isn't it??

Try `xev` instead please.

Confirmed with xev as well: none of the additional buttons are recorded.

Offline

#6 2019-09-04 18:23:32

Ropid
Member
Registered: 2015-03-09
Posts: 608

Re: [Solved]Kernel update 5.2.11 broke some of Logitech G502 functionality

Omar007 wrote:
F43nd1r wrote:

Button presses were completely ignored, I tried to detect them with showkey, but that did nothing.

Afaik, showkey is for keyboard only, isn't it??

Try `xev` instead please.


These newer Logitech gaming mice are both a USB mouse and a USB keyboard device. When you program keys onto the buttons in the Logitech software, the mouse will use its keyboard half to send keyboard events to the PC.

Last edited by Ropid (2019-09-04 18:27:41)

Offline

#7 2019-09-04 18:30:52

loqs
Member
Registered: 2014-03-06
Posts: 9,056

Re: [Solved]Kernel update 5.2.11 broke some of Logitech G502 functionality

Ropid so if [1] causes the device to no longer be treated as having keyboard functionality does that mean those buttons can not be mapped to keys by the device itself?

[1] https://git.kernel.org/pub/scm/linux/ke … ca28fa4822
Edit:
the g502 has issues with hid-logitech-hidpp 27fc32fd9417968a459d43d9a7c50fd423d53eb9 should not have been backported without the partial revert [2]

[2] https://github.com/torvalds/linux/commi … c4e75d806a
Edit2:
5.2.12 is backporting a3384b8d9f63cc042711293bb97bdc92dca0391d which will fix the issue for the G700
https://git.kernel.org/pub/scm/linux/ke … b68c9abab4

I suggest replying to https://lore.kernel.org/stable/20190904 … ation.org/ asking for addf3382c47c033e579c9c88f18e36c4e75d806a to be backported for the same reason

Last edited by loqs (2019-09-04 22:29:17)

Offline

#8 2019-09-04 20:50:46

Omar007
Member
Registered: 2015-04-09
Posts: 332

Re: [Solved]Kernel update 5.2.11 broke some of Logitech G502 functionality

Hmm I wonder if this issue is only present then when you have overriden data on the device itself then.. (instead of in-game, or in the compositor/DE)
I just remoted into a system that is running 5.2.11 and has one of those mice attached.

It does not seem like it is merged into a single device completely but it lost 1 (*-event-if01, whatever that one is.. :S). It does still provide an evdev entry for keyboard events on 5.2.11 though.

$ uname -r
5.2.11-arch1-1-ARCH
$ ls -l /dev/input/by-id
total 0
lrwxrwxrwx 1 root root 10 sep  4 22:42 usb-Logitech_Gaming_Mouse_G502_187534633831-event-mouse -> ../event14
lrwxrwxrwx 1 root root 10 sep  4 22:42 usb-Logitech_Gaming_Mouse_G502_187534633831-if01-event-kbd -> ../event19
lrwxrwxrwx 1 root root  9 sep  4 22:42 usb-Logitech_Gaming_Mouse_G502_187534633831-mouse -> ../mouse0

Not really able to verify what the buttons are doing atm physically though but I've not heard about the mice having any problems since the update (about 2 days ago).


Ropid wrote:

These newer Logitech gaming mice are both a USB mouse and a USB keyboard device. When you program keys onto the buttons in the Logitech software, the mouse will use its keyboard half to send keyboard events to the PC.

Hmm interesting. I'd have expected that a complete driver implementation of a HID device would just represent itself as a single specialized HID device and not several generic types. But I guess that can make sense for compatibility reasons then?

Last edited by Omar007 (2019-09-04 21:07:29)

Offline

#9 2019-09-08 00:42:33

michael_dn
Member
Registered: 2019-09-08
Posts: 4

Re: [Solved]Kernel update 5.2.11 broke some of Logitech G502 functionality

Same issue with G502,

I am running arch 5.2.11 and it was working fine unitl I upgraded hwids to version 20190818-1, downgrading to version 20190316-1 after a reboot fixed the issue and mouse was working fine again.

@loqs pointed me to a commit in hwids adding logitech G series support in udev/70-mouse.hwdb but nothing in udev/60-keyboard.hwdb which should have 'Logitech Tunable RGB Gaming Mouse G502' which is normally registered as a keyboard device but is now not able to connect.

https://github.com/gentoo/hwids/commit/ … ad6cb82dae


I have reported this as a bug for hwids but it may be a conflict between kernel and hwids? as to how the device is registered.

https://bugs.archlinux.org/task/63677

Offline

#10 2019-09-08 01:11:03

loqs
Member
Registered: 2014-03-06
Posts: 9,056

Re: [Solved]Kernel update 5.2.11 broke some of Logitech G502 functionality

@micheal_dn does linux 5.2.10 with the new hwids have the issue?

Offline

#11 2019-09-08 03:30:35

michael_dn
Member
Registered: 2019-09-08
Posts: 4

Re: [Solved]Kernel update 5.2.11 broke some of Logitech G502 functionality

@loqs kernel upgrade to 5.2.13 just came out and fixed the issue for me with latest hwids package so I think you were right just a kernel issue, will close bug report. Thanks.

Offline

#12 2019-09-08 09:19:24

loqs
Member
Registered: 2014-03-06
Posts: 9,056

Re: [Solved]Kernel update 5.2.11 broke some of Logitech G502 functionality

Strange as 5.2.13 does not contain the revert for the 502 https://git.archlinux.org/linux.git/tre … rch1#n3765

Offline

#13 2019-09-09 23:10:35

F43nd1r
Member
Registered: 2019-09-04
Posts: 11

Re: [Solved]Kernel update 5.2.11 broke some of Logitech G502 functionality

5.2.13 did not fix the issue for me.

Offline

#14 2019-09-10 06:41:54

Ketchup901
Member
Registered: 2016-05-18
Posts: 38

Re: [Solved]Kernel update 5.2.11 broke some of Logitech G502 functionality

Can confirm this issue. None of the keybindings where the mouse pretends to be a hardware keyboard work, such as volume up/volume down or ctrl+tab/ctrl+shift+tab.

The issue happened with an upgrade from kernel 5.1.16 to 5.2.13, so 5.2.13 definitely didn't fix anything here, but rather that's what broke it in the first place.

Offline

#15 2019-09-10 11:04:16

loqs
Member
Registered: 2014-03-06
Posts: 9,056

Re: [Solved]Kernel update 5.2.11 broke some of Logitech G502 functionality

F43nd1r wrote:

5.2.13 did not fix the issue for me.

Were you expecting it to be from your contact with upstream?  It is also not fixed in 5.2.14. https://bugs.archlinux.org/task/63686

Offline

#16 2019-09-10 14:21:54

F43nd1r
Member
Registered: 2019-09-04
Posts: 11

Re: [Solved]Kernel update 5.2.11 broke some of Logitech G502 functionality

loqs wrote:

Were you expecting it to be from your contact with upstream?  It is also not fixed in 5.2.14. https://bugs.archlinux.org/task/63686

no, I wasn't expecting it to be fixed, but tried after the comment by @michael_dn and reported my result.

Offline

#17 2019-09-11 05:20:23

Ketchup901
Member
Registered: 2016-05-18
Posts: 38

Re: [Solved]Kernel update 5.2.11 broke some of Logitech G502 functionality

For some reason it started working again, several hours after upgrading to kernel 5.2.14, and even without rebooting.

Offline

#18 2019-09-11 07:22:27

michael_dn
Member
Registered: 2019-09-08
Posts: 4

Re: [Solved]Kernel update 5.2.11 broke some of Logitech G502 functionality

Very confusing, it seems the kernel sometimes refuses to connect the keyboard part of the mouse and sometimes it does. It stopped working for me then I rebooted and it worked again, the randomness kept confusing me. Defiantly seem an issue with hid-logitech-hidpp but any idea on why the randomness with connection?

Offline

#19 2019-09-11 09:14:07

loqs
Member
Registered: 2014-03-06
Posts: 9,056

Re: [Solved]Kernel update 5.2.11 broke some of Logitech G502 functionality

patch for 5.3.12+

commit 24915aec23dbac04095012449772425d5279c3dd
Author: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Date:   Tue Aug 13 15:38:06 2019 +0200

    Revert "HID: logitech-hidpp: add USB PID for a few more supported mice"
    
    This partially reverts commit 27fc32fd9417968a459d43d9a7c50fd423d53eb9.
    
    It turns out that the G502 has some issues with hid-logitech-hidpp:
    when plugging it in, the driver tries to contact it but it fails.
    So the driver bails out leaving only the mouse event node available.
    
    This timeout is problematic as it introduce a delay in the boot,
    and having only the mouse event node means that the hardware
    macros keys can not be relayed to the userspace.
    
    Filipe and I just gave a shot at the following devices:
    
    G403 Wireless (0xC082)
    G703 (0xC087)
    G703 Hero (0xC090)
    G903 (0xC086)
    G903 Hero (0xC091)
    G Pro (0xC088)
    
    Reverting the devices we are not sure that works flawlessly.
    
    Reviewed-by: Filipe Laíns <lains@archlinux.org>
    Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
    (cherry picked from commit addf3382c47c033e579c9c88f18e36c4e75d806a)

diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
index 4effce12607b..424d0f775ffa 100644
--- a/drivers/hid/hid-logitech-hidpp.c
+++ b/drivers/hid/hid-logitech-hidpp.c
@@ -3749,28 +3749,8 @@ static const struct hid_device_id hidpp_devices[] = {
 
 	{ L27MHZ_DEVICE(HID_ANY_ID) },
 
-	{ /* Logitech G203/Prodigy Gaming Mouse */
-	  HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC084) },
-	{ /* Logitech G302 Gaming Mouse */
-	  HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC07F) },
-	{ /* Logitech G303 Gaming Mouse */
-	  HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC080) },
-	{ /* Logitech G400 Gaming Mouse */
-	  HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC07E) },
 	{ /* Logitech G403 Wireless Gaming Mouse over USB */
 	  HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC082) },
-	{ /* Logitech G403 Gaming Mouse */
-	  HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC083) },
-	{ /* Logitech G403 Hero Gaming Mouse over USB */
-	  HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC08F) },
-	{ /* Logitech G502 Proteus Core Gaming Mouse */
-	  HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC07D) },
-	{ /* Logitech G502 Proteus Spectrum Gaming Mouse over USB */
-	  HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC332) },
-	{ /* Logitech G502 Hero Gaming Mouse over USB */
-	  HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC08B) },
-	{ /* Logitech G700s Gaming Mouse over USB */
-	  HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC07C) },
 	{ /* Logitech G703 Gaming Mouse over USB */
 	  HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC087) },
 	{ /* Logitech G703 Hero Gaming Mouse over USB */

Offline

#20 2019-09-12 22:23:14

F43nd1r
Member
Registered: 2019-09-04
Posts: 11

Re: [Solved]Kernel update 5.2.11 broke some of Logitech G502 functionality

loqs wrote:

patch for 5.3.12+

commit 24915aec23dbac04095012449772425d5279c3dd
Author: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Date:   Tue Aug 13 15:38:06 2019 +0200

    Revert "HID: logitech-hidpp: add USB PID for a few more supported mice"
    
    This partially reverts commit 27fc32fd9417968a459d43d9a7c50fd423d53eb9.
    
    It turns out that the G502 has some issues with hid-logitech-hidpp:
    when plugging it in, the driver tries to contact it but it fails.
    So the driver bails out leaving only the mouse event node available.
    
    This timeout is problematic as it introduce a delay in the boot,
    and having only the mouse event node means that the hardware
    macros keys can not be relayed to the userspace.
    
    Filipe and I just gave a shot at the following devices:
    
    G403 Wireless (0xC082)
    G703 (0xC087)
    G703 Hero (0xC090)
    G903 (0xC086)
    G903 Hero (0xC091)
    G Pro (0xC088)
    
    Reverting the devices we are not sure that works flawlessly.
    
    Reviewed-by: Filipe Laíns <lains@archlinux.org>
    Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
    (cherry picked from commit addf3382c47c033e579c9c88f18e36c4e75d806a)

diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
index 4effce12607b..424d0f775ffa 100644
--- a/drivers/hid/hid-logitech-hidpp.c
+++ b/drivers/hid/hid-logitech-hidpp.c
@@ -3749,28 +3749,8 @@ static const struct hid_device_id hidpp_devices[] = {
 
 	{ L27MHZ_DEVICE(HID_ANY_ID) },
 
-	{ /* Logitech G203/Prodigy Gaming Mouse */
-	  HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC084) },
-	{ /* Logitech G302 Gaming Mouse */
-	  HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC07F) },
-	{ /* Logitech G303 Gaming Mouse */
-	  HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC080) },
-	{ /* Logitech G400 Gaming Mouse */
-	  HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC07E) },
 	{ /* Logitech G403 Wireless Gaming Mouse over USB */
 	  HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC082) },
-	{ /* Logitech G403 Gaming Mouse */
-	  HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC083) },
-	{ /* Logitech G403 Hero Gaming Mouse over USB */
-	  HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC08F) },
-	{ /* Logitech G502 Proteus Core Gaming Mouse */
-	  HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC07D) },
-	{ /* Logitech G502 Proteus Spectrum Gaming Mouse over USB */
-	  HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC332) },
-	{ /* Logitech G502 Hero Gaming Mouse over USB */
-	  HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC08B) },
-	{ /* Logitech G700s Gaming Mouse over USB */
-	  HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC07C) },
 	{ /* Logitech G703 Gaming Mouse over USB */
 	  HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, 0xC087) },
 	{ /* Logitech G703 Hero Gaming Mouse over USB */

While that patch may be in the kernel, it did not solve the problem for me. I've tried 5.2.14 as well, but to no avail.

Offline

#21 2019-09-12 22:37:16

loqs
Member
Registered: 2014-03-06
Posts: 9,056

Re: [Solved]Kernel update 5.2.11 broke some of Logitech G502 functionality

The patch I posted is based on one that is present in 5.3 but not in any 5.2.Y release you need to apply it to 5.2.14.

Offline

#22 2019-09-12 22:53:46

F43nd1r
Member
Registered: 2019-09-04
Posts: 11

Re: [Solved]Kernel update 5.2.11 broke some of Logitech G502 functionality

loqs wrote:

The patch I posted is based on one that is present in 5.3 but not in any 5.2.Y release you need to apply it to 5.2.14.

I see, my bad missed the 3.

Offline

#23 2019-09-12 23:12:06

loqs
Member
Registered: 2014-03-06
Posts: 9,056

Re: [Solved]Kernel update 5.2.11 broke some of Logitech G502 functionality

I provided the patch as cherry-picking the commit from 5.3 needs manual adjustment due to 5.2.12 containing the revert for the G700 without the commit covering the 502.
To apply it to the linux package you just need to add the patch to the sources array of the PKGBUILD and update the sha256sums.
The PKGBUILD will automatically apply any entry listed in the sources array with the .patch extension.

Last edited by loqs (2019-09-12 23:12:28)

Offline

#24 2019-09-13 17:22:45

Helloagain
Member
Registered: 2019-09-13
Posts: 5

Re: [Solved]Kernel update 5.2.11 broke some of Logitech G502 functionality

I got the (almost) same problem. But also my keyboard's symlinks are missing there (completely different brand). (My mouse: I own a Logitech G500 instead of a G502).

Applying the patch did not bring the symlinks back for me...

Any ideas?

Last edited by Helloagain (2019-09-13 17:23:50)

Offline

#25 2019-09-13 17:46:32

loqs
Member
Registered: 2014-03-06
Posts: 9,056

Re: [Solved]Kernel update 5.2.11 broke some of Logitech G502 functionality

What is the VID:PID of the G500?

Offline

Board footer

Powered by FluxBB