-
-
Notifications
You must be signed in to change notification settings - Fork 39.3k
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
[Bug] 50-qmk.rules udev rule breaks game controllers #24222
Comments
This is probably due to this rule:
Which is required for |
It could be possible to detect the QMK console devices automatically by the usage code for the HID application collection (but the detection is not guaranteed to be 100% precise, because it involves HID usage codes from the vendor-specific range, and those codes are not really registered anywhere, so anyone else could pick the same codes to mean something completely different). But doing that requires installing a helper program to parse the HID descriptors: https://github.com/qmk/qmk_udev |
By QMK devices you mean devices that already run QMK firmware and use hidraw to communicate with PC? I am not sure about what exactly can be used but maybe configuration or interface descriptor names can be used. I believe you can change product name without changing VID/PID too. It could be possible to use some custom attributes that I am not aware of. |
There are no other useful attributes to filter on. QMK does not set string descriptors for anything other than manufacturer, product and serial number, all of which are variable based on the particular board. The only real solution would be what sigprof described - having udev run an external program to inspect the HID usage page/usage pair, but as mentioned it is not very reliable or convenient. I'm not really sure why exactly this udev rule is causing this issue - I'm not that familiar with udev. But perhaps there is some other way around it. |
Is it really necessary to have such permissive rules in the first place? From what I see, it seems like these only used for something called For me it seems like it's not very relevant for an average user and only needed for developers and troubleshooting. In this case, adding a rule that basically allows rawdogging hid devices by any user seems too much for potential benefits. Not only that but apparently this also breaks 3rd party code that has no relation to QMK at all. This can be solved by either mentioning to run You don't need raw access to all devices anyway so |
This is about the CLI subcommand |
First of all, it won't "just work" out if the box because somehow you need to have udev rules installed and you can't install udev rules without elevated privileges. Doesn't matter if you do it manually or by installing package from package manager And second, "just work" doesn't mean that app absolutely can't elevate privileges only for actions that, well, need elevated privileges. There are plenty of apps that can be used by regular user and only require using sudo for parts of it. Notable example of that is package manager. Virtually all PMs will require you to run as root to install packages and work just fine when you only need to run query operations. |
It seems you’re quite passionate about this issue — I’d suggest working out what you think is acceptable given our general usability constraints as well (i.e. In its current form the rules work for 99% of the use cases we’ve come across, and unfortunately it seems you’re one of the 1%. If you can improve the situation to be 99.9% vs. 0.1%, then great! As it’s generally working, any changes to the rules are currently extremely low priority from our team perspective, which is why we’re suggesting perhaps you’re in a better position to take action. Alternatively, the |
Only thing I care about is my system "just working". xpadneo even has checkbox in their issue template because of how viral this is. People even make workarounds when they bump into this simply because they don't question why this situation even exist. You can't argue in this case "maybe it's them and not us" because 60-xpadneo.rules contains very narrow set of rules.
I already removed all rules except ones that I use to flash firmware but only after spending significant amount of time investigating why game controller doesn't work.
If you are reluctant to the changes, warning could be added that this rule can cause conflicts with other devices. It won't fix the issue but at least people who follow your suggestions will know why their other devices don't work as expected.
OpenRGB does this by compiling udev rules dynamically using information about all supported devices.
https://docs.qmk.fm/cli doesn't mention any distributive that has these rules by default. QMK cli itself, while installed from pip, won't have these rules by default anyway. So I don't know where you get your numbers from but it's a big question if majority of people even install these rules. |
The main annoyance of qmk/qmk_udev is that it requires a compiled helper, so you can't just throw some udev rules into the system configuration. It could be possible to simulate what that helper does with some commonly available tools (although this would need lots of testing on more weird systems — e.g., the ones using
The The matching like that is not 100% generic (there are infinitely many ways in which the same application collection may be represented in the HID report descriptor), but should work with existing QMK versions. However, any HID report descriptor modifications in QMK may break compatibility (e.g., if someone would want to support 16-bit values in |
@gudvinr As you are on Arch it should be enough to install the |
This could be encanced to make sure to skip the problematic vid though. Of the top of my head, using https://www.freedesktop.org/software/systemd/man/latest/udev.html and https://devicehunt.com/view/type/usb/vendor/045E as a reference, this could eliviate the problem, no?
|
Describe the Bug
When you install this file according to the docs, you end up with game controllers (non qmk based, regular game controllers) not working anymore.
I've seen this behaviour with xbox series bluetooth controllers and xpadneo driver.
Once you remove qmk udev rule and reload, controller works again.
It is noticeable as apps not being able to receive controller inputs. You press keys, move sticks, etc and there is no input in the apps. Hovewer, evtest still shows input data.
It doesn't matter if QMK keyboard (or any input device other than gamepad itself) is connected to the system.
Keyboard Used
irrelevant
Link to product page (if applicable)
also irrelevant
Operating System
Arch Linux
qmk doctor Output
Is AutoHotKey / Karabiner installed
Other keyboard-related software installed
none
Additional Context
No response
The text was updated successfully, but these errors were encountered: