Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logitech Buzz(tm) isn't recognized as joystick due to missing udev rule #6137

Closed
lehmann-4178656ch opened this issue Jun 16, 2017 · 10 comments
Closed
Assignees
Labels
bug 🐛 Programming errors, that need preferential fixing udev

Comments

@lehmann-4178656ch
Copy link

Submission type

  • Bug report

systemd version the issue has been seen with

systemctl --version
systemd 231
+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN

Used distribution

Fedora 25 64-bit (also occurs on Ubuntu 17.04)

In case of bug report: Expected behaviour you didn't see

sudo udevadm info --query=all --name=input/eventXX on the respective device that is Logitech Buzz(tm) will output line E: ID_INPUT_JOYSTICK=1 and device is available with SDL2 library as gamepad or joystick

In case of bug report: Unexpected behaviour you saw

sudo udevadm info --query=all --name=input/eventXX on the respective device that is Logitech Buzz(tm) doesn't output line E: ID_INPUT_JOYSTICK=1 and device is not available with SDL2 library as gamepad or joystick

In case of bug report: Steps to reproduce the problem

  1. Connect Logitech Buzz(tm)
  2. Get respective input device, e.g. by checking output of sudo evtest
  3. Run this command on the respective device: sudo udevadm info --query=all --name=input/eventXX

The udev rules which seems to fix this for me is the following:

SUBSYSTEM=="input", ATTRS{idProduct}=="0002", ATTRS{idVendor}=="054c", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"

@poettering
Copy link
Member

whether something is a joystick or a mouse is not determined by vendor/product matches but by counting axis, buttons, absolute/relative and so on, via input_id. Hence, while there is something to fix here, it's not with a rule like you suggest, but the input_id C logic needs a bit of tweaking most likely.

@ghost
Copy link

ghost commented Jun 19, 2017

@poettering just for what it's worth, the logitech buzz probably falls outside the usual expected layout for gamepads because it is made for quiz games. Here is how it looks like: https://upload.wikimedia.org/wikipedia/commons/7/7d/Playstation_2_3_Wireless_Buzzer.jpg (edit: sry that's the original playstation variant, but the logitech buzz is an almost exact remake for the PC)

@poettering
Copy link
Member

@Jonast hmm, so what is it precisely? does it have any axis? if it doesn't have any axis, and udev considers it a keyboard, then this looks pretty correctly handled, no?

@poettering poettering added the needs-reporter-feedback ❓ There's an unanswered question, the reporter needs to answer label Jun 20, 2017
@poettering
Copy link
Member

@lehmann-4178656ch could you provide the full "udevadm info" for the device?

@lehmann-4178656ch
Copy link
Author

Here you go:

$ sudo udevadm info /dev/input/event18
P: /devices/pci0000:00/0000:00:14.0/usb3/3-1/3-1:1.0/0003:054C:0002.0003/input/input30/event18
N: input/event18
S: input/by-id/usb-Logitech_Logitech_Buzz_tm__Controller_V1-event-if00
S: input/by-path/pci-0000:00:14.0-usb-0:1:1.0-event
E: DEVLINKS=/dev/input/by-path/pci-0000:00:14.0-usb-0:1:1.0-event /dev/input/by-id/usb-Logitech_Logitech_Buzz_tm__Controller_V1-event-if00
E: DEVNAME=/dev/input/event18
E: DEVPATH=/devices/pci0000:00/0000:00:14.0/usb3/3-1/3-1:1.0/0003:054C:0002.0003/input/input30/event18
E: ID_BUS=usb
E: ID_INPUT=1
E: ID_MODEL=Logitech_Buzz_tm__Controller_V1
E: ID_MODEL_ENC=Logitech\x20Buzz\x28tm\x29\x20Controller\x20V1
E: ID_MODEL_ID=0002
E: ID_PATH=pci-0000:00:14.0-usb-0:1:1.0
E: ID_PATH_TAG=pci-0000_00_14_0-usb-0_1_1_0
E: ID_REVISION=1101
E: ID_SERIAL=Logitech_Logitech_Buzz_tm__Controller_V1
E: ID_TYPE=hid
E: ID_USB_DRIVER=usbhid
E: ID_USB_INTERFACES=:030000:
E: ID_USB_INTERFACE_NUM=00
E: ID_VENDOR=Logitech
E: ID_VENDOR_ENC=Logitech
E: ID_VENDOR_ID=054c
E: LIBINPUT_DEVICE_GROUP=3/54c/2/111:usb-0000:00:14.0-1
E: MAJOR=13
E: MINOR=82
E: SUBSYSTEM=input
E: USEC_INITIALIZED=116556760

@poettering
Copy link
Member

@whot what's your take on this? as what should devices like this one be categorized?

@whot
Copy link
Contributor

whot commented Jun 21, 2017

What's the evemu-describe output for this thing? I'm not sure it's worth changing input-id for this, may be better to have a custom hwdb override.

@lehmann-4178656ch
Copy link
Author

Currently I'm not on my Fedora machine, thus the output from an arch-linux. If this changes something i can report later from the fedora machine.

$ sudo evemu-describe /dev/input/event18
# EVEMU 1.3
# Kernel: 4.11.6-1-ARCH
# DMI: dmi:bvnLENOVO:bvrGCET20WW(1.09):bd06/01/2012:svnLENOVO:pn34382BG:pvrThinkPadX230Tablet:rvnLENOVO:rn34382BG:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
# Input device name: "Logitech Logitech Buzz(tm) Controller V1"
# Input device ID: bus 0x03 vendor 0x54c product 0x02 version 0x111
# Supported events:
#   Event type 0 (EV_SYN)
#     Event code 0 (SYN_REPORT)
#     Event code 1 (SYN_CONFIG)
#     Event code 2 (SYN_MT_REPORT)
#     Event code 3 (SYN_DROPPED)
#     Event code 4 ((null))
#     Event code 5 ((null))
#     Event code 6 ((null))
#     Event code 7 ((null))
#     Event code 8 ((null))
#     Event code 9 ((null))
#     Event code 10 ((null))
#     Event code 11 ((null))
#     Event code 12 ((null))
#     Event code 13 ((null))
#     Event code 14 ((null))
#     Event code 15 (SYN_MAX)
#   Event type 1 (EV_KEY)
#     Event code 704 (BTN_TRIGGER_HAPPY1)
#     Event code 705 (BTN_TRIGGER_HAPPY2)
#     Event code 706 (BTN_TRIGGER_HAPPY3)
#     Event code 707 (BTN_TRIGGER_HAPPY4)
#     Event code 708 (BTN_TRIGGER_HAPPY5)
#     Event code 709 (BTN_TRIGGER_HAPPY6)
#     Event code 710 (BTN_TRIGGER_HAPPY7)
#     Event code 711 (BTN_TRIGGER_HAPPY8)
#     Event code 712 (BTN_TRIGGER_HAPPY9)
#     Event code 713 (BTN_TRIGGER_HAPPY10)
#     Event code 714 (BTN_TRIGGER_HAPPY11)
#     Event code 715 (BTN_TRIGGER_HAPPY12)
#     Event code 716 (BTN_TRIGGER_HAPPY13)
#     Event code 717 (BTN_TRIGGER_HAPPY14)
#     Event code 718 (BTN_TRIGGER_HAPPY15)
#     Event code 719 (BTN_TRIGGER_HAPPY16)
#     Event code 720 (BTN_TRIGGER_HAPPY17)
#     Event code 721 (BTN_TRIGGER_HAPPY18)
#     Event code 722 (BTN_TRIGGER_HAPPY19)
#     Event code 723 (BTN_TRIGGER_HAPPY20)
#   Event type 4 (EV_MSC)
#     Event code 4 (MSC_SCAN)
# Properties:
N: Logitech Logitech Buzz(tm) Controller V1
I: 0003 054c 0002 0111
P: 00 00 00 00 00 00 00 00
B: 00 0b 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 ff ff 0f 00 00 00 00 00
B: 02 00 00 00 00 00 00 00 00
B: 03 00 00 00 00 00 00 00 00
B: 04 10 00 00 00 00 00 00 00
B: 05 00 00 00 00 00 00 00 00
B: 11 00 00 00 00 00 00 00 00
B: 12 00 00 00 00 00 00 00 00
B: 14 00 00 00 00 00 00 00 00
B: 15 00 00 00 00 00 00 00 00
B: 15 00 00 00 00 00 00 00 00

@ghost
Copy link

ghost commented Jun 21, 2017

@poettering the problem is that even if it could be considered a keyboard based on what it offers, this device is most likely used to be for games. Most popular game libraries (e.g. SDL2) offer easy gamepad and joystick handling with hotplugging, multiple and devices with no issue - but usually assume a single keyboard.

Therefore, not categorizing this as a joystick/gamepad makes it much more difficult to use this device in linux games because the usual libraries used for periphery expect extra button devices used by multiple players in front of a living room TV screen to be gamepads, and not additional keyboards. Also based on the use (living room TV gameplay with few buttons, ergonomic form to be easily held in midair) it seems closer to a gamepad than a classical keyboard, even though based on buttons/axes it might look closer to a keyboard to a driver backend.

whot added a commit to whot/systemd that referenced this issue Jun 21, 2017
These buttons were added specifically for joysticks with lots of buttons, no
other device should be using them. See kernel commit
cf2f765f18960 "HID: handle joysticks with large number of buttons"

We only test for BTN_TRIGGER_HAPPY (an alias for BTN_TRIGGER_HAPPY1) here, a
device that sets buttons 2 and above but doesn't set 1 is considered buggy.

systemd#6137

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
whot added a commit to whot/systemd that referenced this issue Jun 21, 2017
Even when they don't have an x/y axis.

systemd#6137

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
@whot whot self-assigned this Jun 21, 2017
@whot whot added bug 🐛 Programming errors, that need preferential fixing and removed needs-reporter-feedback ❓ There's an unanswered question, the reporter needs to answer labels Jun 21, 2017
@poettering
Copy link
Member

Fixed by #6170. Closing.

fredollinger pushed a commit to fredollinger/systemd that referenced this issue Jun 30, 2017
These buttons were added specifically for joysticks with lots of buttons, no
other device should be using them. See kernel commit
cf2f765f18960 "HID: handle joysticks with large number of buttons"

We only test for BTN_TRIGGER_HAPPY (an alias for BTN_TRIGGER_HAPPY1) here, a
device that sets buttons 2 and above but doesn't set 1 is considered buggy.

systemd/systemd#6137

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
fredollinger pushed a commit to fredollinger/systemd that referenced this issue Jun 30, 2017
Even when they don't have an x/y axis.

systemd/systemd#6137

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Programming errors, that need preferential fixing udev
Development

No branches or pull requests

3 participants