-
Notifications
You must be signed in to change notification settings - Fork 21
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
FlatPak #19
Comments
That's a very good idea. I am going to look into that eventually. Does anybody know if flatpak supports running as a background service/daemon, with low-level access to USB devices and ability to host a UDP server? |
The background service and server are definitely possible but the usb access is probably not. |
Steam Link is distributed by flatpak and it passes the control of Steam Deck controls entirely to the host, so I think USB access has to be also possible somehow. |
You may have already figured this out but you can use Additional Note: Steam Deck has a udev rule for usb/hidraw access by the deck user (given the user is physically logged in). You can see it when logged into a Steam Deck with:
as the following:
However, it looks like you aren't reading via the usb or hidraw interfaces and are instead reading the You can see example manifests on flathub using |
@streetpea thank you for the write-up. I've read up on udev a little and it looks like the rule:
should allow access to all usb/hiddev* also but it doesn't. Any idea why that might be? I'm not even sure if those actually allow access to hidraw, I will check that when I have a chance. The rule applied to group Maybe there's some ACL configuration that allows only steam process to access those or something? |
@kmicki it probably has to do with another rule interfering then. Anyway, you can tell it's not getting applied properly if you look at the extended permissions (acls) with getfacl (note: the extended attributes denoted by a + in ls -l which are added by the +=uaccess udev rule)... for usb you get
USB Output:
For hidraw devices you get
Hidraw Output:
As you can see, the deck user has rw to hidraw devices but only the root user (file owner) has rw to the usb device so it looks like the +=uaccess for the usb devices isn't going through (probably because there is another rule taking precedence) |
After more analysis I think uaccess (ACL) just doesn't work the same as rules for users/groups. AFAIR I tried to access the device using hidapi but it failed because it was already used by Steam (hence getting data via hiddev*). I noticed that Steam Link is able to get data from the device simultaneously with Steam so it has to be possible somehow using files that are accessible to |
I am able to get access using hidapi with hidraw interface without requiring root to install extra udev rules. Here is a link to the place in my project (Chiaki4deck) where I do this: https://github.com/streetpea/chiaki4deck/blob/cfc982a622b592c07eea4a27aacb97a00bc71642/steamdeck_native/src/sdeck.c#L153. I link to hidapi using the hidraw instead of the libusb interface here: https://github.com/streetpea/chiaki4deck/blob/cfc982a622b592c07eea4a27aacb97a00bc71642/steamdeck_native/CMakeLists.txt#L16. If you have any questions lmk. |
@streetpea Thank you. It was very helpful. I will switch to using hidapi-hidraw in the next release. This will bring it closer to creating a Flatpak. |
@kmicki Awesome, if you haven't already made progress on a flatpak build I can test one out for you if you want. |
I don't know if we can help you or advice you on this. But if you want you can join our Discord and we can add you to the 🚧-open-development channel if you are open for discussion. That goes for the both of you :) @streetpea @kmicki As we got the biggest manifest on flathub. //RetroDECK Team |
Since this is specifically for the Deck, and the Deck only officially supports FlatPak installs, I think it would be a good idea to support them.
The text was updated successfully, but these errors were encountered: