Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1325354 - Keyboard and other input devices uncorrectly recognized as joysticks
Summary: Keyboard and other input devices uncorrectly recognized as joysticks
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 25
Hardware: All
OS: Unspecified
high
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-08 14:02 UTC by Pierre Ossman
Modified: 2017-07-31 18:46 UTC (History)
12 users (show)

Fixed In Version: kernel-4.8.5-300.fc25 kernel-4.8.6-201.fc24
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-07 23:26:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
0001-HID-input-ignore-System-Control-application-usages-i.patch (3.11 KB, patch)
2016-09-07 17:06 UTC, Benjamin Tissoires
no flags Details | Diff
0002-HID-wacom-do-not-detect-Pad-devices-as-joysticks.patch (1.31 KB, patch)
2016-09-07 17:07 UTC, Benjamin Tissoires
no flags Details | Diff

Description Pierre Ossman 2016-04-08 14:02:36 UTC
I have a Microsoft Sculpt Ergonomic Desktop keyboard that has worked fine up until recently. All of a sudden a bunch of keys are completely dead.

The affected keys are Play/Pause, Mute, Volume Up, Volume Down and Calculator. The physical keys themselves are fine as they also double as F1-F4 and work without problems in that mode.

This is definitely a kernel issue in some form as they keys generate no events with evtest. They are however present in evtest's initial list.

I'm afraid I do not know when they stopped working. The oldest kernel I have on my system is kernel-4.3.3-303.fc23.x86_64, which exhibits the issue.

Comment 1 Pierre Ossman 2016-04-08 14:23:32 UTC
Urgh. I dug up kernel-4.2.8-300.fc23.x86_64, and I'm fairly certain that kernel worked as I did some development related to volume handling on that kernel.

So either something has permanently reconfigured my keyboard, or there is something else messing up things as the device gets discovered.

Comment 2 Pierre Ossman 2016-04-08 14:53:37 UTC
Found the issue. It was steam that screwed things up by installing these udev rules:

https://github.com/denilsonsa/udev-joystick-blacklist

For some reason those buttons are using a secondary device rather than the primary. And that device node is getting nuked by said udev rule.

Sorry for the noise.

Comment 3 Laura Abbott 2016-04-08 22:20:42 UTC
No problem. This is a good data point for us to know in the future.

Comment 4 Simone Caronni 2016-05-30 16:59:51 UTC
Problem is, without the Udev rules in the Steam package, Big Picture is not working due to keypresses that move the cursor always in the top left corner. 

Please see this, where it originally was reported (in particular the last comment):

https://github.com/ValveSoftware/steam-for-linux/issues/3384

This is the kernel bug which is open since 2011 (!!):

https://bugzilla.kernel.org/show_bug.cgi?id=28912

So I have this dilemma, non functional Steam or broken multimedia keys when installing the Steam package?

Considering that the rules are added ONLY if the Steam package is installed, I consider this the best option, but I'm open to other solutions (separate subpackage with the Udev rules?).

Comment 5 Simone Caronni 2016-05-30 17:05:34 UTC
But the real fix would be to have the kernel bug fixed (sorry, I'm not able to fix it) and then the Udev rules workaround should not be required anymore.

Comment 6 Benjamin Tissoires 2016-09-07 17:06:32 UTC
Created attachment 1198779 [details]
0001-HID-input-ignore-System-Control-application-usages-i.patch

proposed fix for Microsoft devices

Comment 7 Benjamin Tissoires 2016-09-07 17:07:13 UTC
Created attachment 1198780 [details]
0002-HID-wacom-do-not-detect-Pad-devices-as-joysticks.patch

proposed fix for Wacom devices

Comment 8 Benjamin Tissoires 2016-09-07 17:11:16 UTC
I had a look at this issue (I happen to have a Microsoft Surface mouse that exposes the issue). The actual description of the issue and solution is in attachment #1198779 [details]. The TL;DR is that the report descriptor seems bogus for those devices, and many axes should not be created.

I am confident the provided patches will solve the Microsoft issues, but I'd need to have a look at the A4Tech mouse report descriptor to say if this will help those too or if a different fix is required.

I launched a koji build here: http://koji.fedoraproject.org/koji/taskinfo?taskID=15532573

Please report when the build gets done (in a couple of hours) if it doesn't fail :)

Comment 9 Simone Caronni 2016-09-09 15:16:52 UTC
Thanks! Will make a test as soon as possible.

Comment 10 Simone Caronni 2016-09-12 18:25:22 UTC
I've tested the build on Fedora 24 and I see that the spurious Joystick/Mouse devices are no longer there; so it seems to be fixed. I have one the Microsoft keyboards affected, btw.

Funny thing is that something has changed as well within Steam, as now I don't have the extra ghost touches even without the UDev rules in the default kernel.

Comment 11 Simone Caronni 2016-09-12 18:58:19 UTC
Red Hat has provided a patch for Wacom and Microsoft input devices. At least in my case the issue with the ghost inputs in Big Picture is solved with the patched kernel:

https://bugzilla.redhat.com/show_bug.cgi?id=1325354#c8

I will remove the extra UDev rules from the Fedora 25 build of Steam.

Comment 12 Simone Caronni 2016-09-12 19:05:37 UTC
Lol, sorry ignore the last comment, I closed the wrong bug :)

Comment 13 Benjamin Tissoires 2016-09-13 09:55:02 UTC
Patches submitted upstream:
https://patchwork.kernel.org/patch/9328671/
https://patchwork.kernel.org/patch/9328667/

I'll try to remember to post a note here when they get accepted so we can include them in Fedora too.

Comment 14 Benjamin Tissoires 2016-09-28 09:19:51 UTC
BTW, only the Microsoft patch has been accepted yet:
https://git.kernel.org/cgit/linux/kernel/git/jikos/hid.git/commit/?h=for-next&id=1989dada7ce07848196991c9ebf25ff9c5f14d4e it will be pulled in v4.9, so it would be interesting to have it in Fedora ASAP.

Not sure whether we should close the bug once this one hits Fedora, given that Wacom devices will be still affected. I keep those on my todo list but I must say it's a low priority item.

Comment 15 Simone Caronni 2016-09-29 21:06:19 UTC
Thanks. Considering it's something really related to the first patch I hope that it will not be forgot in time. In the meanwhile, I still have to carry around udev rules as a workaround.

Comment 16 Jason Porter 2016-10-18 14:27:44 UTC
I have an affected keyboard: Microsoft Natural® Ergonomic Keyboard 4000. I'm running Fedora 24. Looks like I need to wait for a kernel 4.8 release, is that correct?

Comment 17 Simone Caronni 2016-10-27 08:01:56 UTC
According to commment #14 you need to wait for 4.9.

Comment 18 Fedora Update System 2016-10-31 02:29:54 UTC
kernel-4.8.5-300.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-5d7d12d75a

Comment 19 Benjamin Tissoires 2016-10-31 11:04:28 UTC
As the update notification just said,m the patch has been added to f24-f25 and will be in 4.8.5 in those 2 releases (rawhide already is in v4.9-rcX so there is nothing to do here).

Thanks Justin for backporting the patch!

Comment 20 Fedora Update System 2016-11-01 02:20:36 UTC
kernel-4.8.5-300.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-5d7d12d75a

Comment 21 Fedora Update System 2016-11-03 18:28:16 UTC
kernel-4.8.5-300.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 22 Fedora Update System 2016-11-03 22:15:28 UTC
kernel-4.8.6-201.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-96d276367e

Comment 23 Fedora Update System 2016-11-05 03:35:08 UTC
kernel-4.8.6-201.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-96d276367e

Comment 24 Fedora Update System 2016-11-07 23:26:11 UTC
kernel-4.8.6-201.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.