denilsonsa / udev-joystick-blacklist

Fix for keyboard/mouse/tablet being detected as joystick in Linux
118 stars 27 forks source link

ENV{ID_INPUT_JOYSTICK}=="1" does not correctly match all devices #2

Closed denilsonsa closed 8 years ago

denilsonsa commented 8 years ago

After replacing KERNEL=="js[0-9]*" with ENV{ID_INPUT_JOYSTICK}=="1", as suggested by @xtor91 in the original Gist, some/several devices are not matched anymore.

I've noticed this myself (Microsoft keyboard+mouse matches, Wacom tablet doesn't), and there are other reports.

Most likely, it should be changed to ENV{ID_INPUT_JOYSTICK}=="?*". I'll do some testing here.

denilsonsa commented 8 years ago

My devices (I'm marking the relevant ones with an arrow):

  Bus 004 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
  Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  Bus 003 Device 003: ID 0bda:570c Realtek Semiconductor Corp. 
  Bus 003 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
  Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
  Bus 001 Device 017: ID 046d:c062 Logitech, Inc. M-UAS144 [LS1 Laser Mouse]
→ Bus 001 Device 016: ID 045e:0745 Microsoft Corp. Nano Transceiver v1.0 for Bluetooth
→ Bus 001 Device 015: ID 056a:0016 Wacom Co., Ltd Graphire 4 6x8
  Bus 001 Device 014: ID 058f:6254 Alcor Micro Corp. USB Hub
  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Full udevadm monitor -p output: https://gist.github.com/denilsonsa/91a056e9bde983f2677a

Conclusions:

@xtor91, you said "some software (including SDL2) only interfaces with joysticks through /dev/input/event devices". Can you provide a sample software that does that? For testing purposes.

denilsonsa commented 8 years ago

In my tests, commit d2233bd02058a6d47b239300b206e856b0ab531d fixed this issue.

doraskayo commented 8 years ago

Hey @denilsonsa, sorry for the delay.

I only had one device to test it on, so I just went with what I had. The software I used was Steam, in its Big Picture mode.

As for the bug, your commit covers my case as well. Good job!