Skip to content

Some HID devices make Big Picture unusable #3384

Open
@valentindavid

Description

@valentindavid
How to reproduce
  1. Plug one of those devices: Microsoft Wired Keyboard 600 (045e:0750) or A4Tech mouse G7 750 (09da:054f).
  2. Start Big Picture.
  3. Go in a vertical list (like in the options) and go anywhere but the top.
  4. Wait for a second. Then the cursor will by itself go up.

Tried on both release and beta. On a 64 bits Gentoo. Tested with 3.14.9-gentoo and 3.12.13-gentoo kernels.

It is very difficult to do anything because every time you wait for a second, then Steam goes cuckoo.

The likely root of the problem

It seems that some HID devices provide spurious joystick devices. I do not know if this is a bug in the kernel that it shows up as joystick, but at least there is a useless device on the hardware, and this is not a bug from the kernel.

Workarounds

The only two workarounds I have found are:

  • Unplugging both devices when I am in Big Picture. This is extremely annoying since I need to have a hub to be able to access the usb plugs.
  • Filter the spurious input devices in the kernel based on vendor id, product id AND interface number.

Removing device files (both the event and the js one) did not work I am guessing that showing up in sysfs is enough for the problem to happen. Doing some udev tricks is likely not to work.

It could be argued that the Linux kernel should have the correct quirks for those devices. But there might be a lot more of those devices. Steam should be more tolerant to this. Enabling all the controllers found on the machine even if it cannot open the device file is a bad idea in my opinion. For the moment I have not seen any game having problems with this devices, they show up as detected, but they do not use them. Only the Steam Big Picture fails miserably on it.

Here is the ugly work-around for people who happen to have the same bug:

diff -ur linux-3.14.9-gentoo.old/drivers/hid/usbhid/hid-core.c linux-3.14.9-gentoo/drivers/hid/usbhid/hid-core.c
--- linux-3.14.9-gentoo.old/drivers/hid/usbhid/hid-core.c   2014-06-29 00:44:10.830712842 +0200
+++ linux-3.14.9-gentoo/drivers/hid/usbhid/hid-core.c   2014-06-29 00:30:13.043473836 +0200
@@ -1239,6 +1239,20 @@
    dbg_hid("HID probe called for ifnum %d\n",
            intf->altsetting->desc.bInterfaceNumber);

+   if ((dev->descriptor.idVendor == 0x09da)
+       && (dev->descriptor.idProduct == 0x054f)) {
+     if (intf->altsetting->desc.bInterfaceNumber != 1) {
+       return -ENODEV;
+     }
+   }
+
+   if ((dev->descriptor.idVendor == 0x045e)
+       && (dev->descriptor.idProduct == 0x0750)) {
+     if (intf->altsetting->desc.bInterfaceNumber != 0) {
+       return -ENODEV;
+     }
+   }
+
    for (n = 0; n < interface->desc.bNumEndpoints; n++)
        if (usb_endpoint_is_int_in(&interface->endpoint[n].desc))
            has_in++;

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions