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

Is it possible to be clearer about Linux permissions? #236

Open
igorsantos07 opened this issue Mar 5, 2024 · 1 comment · May be fixed by #256
Open

Is it possible to be clearer about Linux permissions? #236

igorsantos07 opened this issue Mar 5, 2024 · 1 comment · May be fixed by #256

Comments

@igorsantos07
Copy link

igorsantos07 commented Mar 5, 2024

This is a split of one of the many issues reported at #91 (and possibly other issues around the board, such as the-via/releases#257): on Linux, it's usually necessary to run the browser with root privileges, or otherwise give the current user permissions over /dev/hidraw* (or similar files), as pointed by wlarch.

Given the amount of people reacting to the linked solutions, it seems to affect many Linux users (if not all of them).

The only thing that the VIA app can say are two errors (one quite misleading), since it can see the keyboard, but can't really talk to it:

Failed to open the device.
Device: Keychron Keychron K10 Pro
Vid: 0x3434
Pid: 0x02A0

Received invalid protocol version from device
Device: Keychron Keychron K10 Pro
Vid: 0x3434
Pid: 0x02A0

The first one seems to be replaceable by the following in some other distros (or other keyboards):

The device must be opened first.
Device: Alicianrone
Vid: 0x414E
Pid: 0x4152

That said, it's possible to pinpoint the issue if you visit chrome://device-log (found by hofheinz and confirmed by others) - there, it complains about missing permission on the specific file.

Is there any chance the VIA app could drink from that log and tell specifically about the lack of permissions? If not, maybe could the "failed to open device" hint about a possible lack of root permissions, if the OS is Linux?

P.S.: it would be somewhat expected for this kind of issue to arise on Mac as well, but not sure if it really happens there.

@maciek134
Copy link

You don't need to, and should never run a browser as root. All you need is a udev config, for the example pid/vid in the issue:

/etc/udev/rules.d/90-qmk.rules

SUBSYSTEM=="usb", ATTR{idVendor}=="3434", ATTR{idProduct}=="02A0", GROUP="plugdev", TAG+="uaccess"

unplug the keyboard, plug back in and it should work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants