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

Document Steam devices limitations #8

Closed
Anti-Ultimate opened this issue Jun 20, 2017 · 21 comments
Closed

Document Steam devices limitations #8

Anti-Ultimate opened this issue Jun 20, 2017 · 21 comments

Comments

@Anti-Ultimate
Copy link

Currently (as far as I know), there is no way for a Flatpak application to get udev access. However, Steam needs this in order for the Steam controller, the Steam Link and VR devices (HTC Vive, Oculus, ...) to work.

No udev access -> no Steam devices.
As far as I'm aware there's no way Steam devices could function through SDL, so it needs udev rules.

@TingPing
Copy link
Member

As I understand it udev has no stability guarantees between versions so it impossible to use in a portable way. So there has to be some stable interface to the host to use it be it another library or service.

@TingPing
Copy link
Member

TingPing commented Jun 20, 2017

By the way my steam controller does work fine here in big picture mode at least (host is F26).

@Anti-Ultimate
Copy link
Author

Make sure you do not have a native Steam package installed, as that will implement udev rules and load them during boot.

@TingPing
Copy link
Member

TingPing commented Jun 23, 2017

I don't have steam installed on the host.

EDIT: Oh but I have sc-controller so that might do it.

@Anti-Ultimate
Copy link
Author

Sure enough, that includes udev rules to access the Steam controller.

It seems that Steam itself already ships with a libudev library. If it's possible to access udev devices in the flatpak itself anyways, maybe it's possible to include these inside the flatpak? I'm not sure if loading udev rules inside the flatpak sandbox is even possible.

@yajo
Copy link

yajo commented Jul 29, 2017

When there are udev rule problems, you usually can use the steam controller in big picture mode, but not on games. Have you tried gaming, @TingPing?

FTR: http://steamcommunity.com/app/353370/discussions/0/490123197956024380/

@TingPing
Copy link
Member

@yajo works fine in game if you have the udev rules on the host. I don't think there is any way for the rules from the guest to work currenlty though.

@swick
Copy link

swick commented Jul 17, 2018

Some games (e.g. Dirt Rally) do not work with steering wheels when run in flatpak. Not entirely sure if this is udev related but it seems plausible.

@nanonyme
Copy link
Collaborator

Seems to me like the only workaround possible for this currently is to manually copy the udev rules from inside the Flatpak app into the host.

@fabiscafe
Copy link

@nanonyme no that wont work. Some distros needs some changes to the udev rules to make them work. like arch for example, where the normal steam udev rules wont work to make the controller work, and it also needs to load uinput. Since we use the same base in Manjaro I try to keep up rules in an external package.
-> https://gitlab.com/Fabish/steam-devices

So I dont think it's possible to add rules on a flatpak level. So maybe just add some message at the first start. So users will know.

@nanonyme
Copy link
Collaborator

Sounds like exactly why I found https://github.com/flathub/com.valvesoftware.Steam/wiki/Frequently-asked-questions in the first place

@TingPing
Copy link
Member

You can do something hacky:

flatpak-spawn --host pkexec cp $the_udev_rule_in_our_install $the_host_udev_path

@nanonyme
Copy link
Collaborator

Wow, that's really scary :)

@nanonyme nanonyme changed the title Steam devices support Document Steam devices limitations Aug 25, 2018
@pablodav
Copy link
Contributor

In fedora28 with 4.17 kernel steam-controller doesn't works out-of-the-box too.

But probably it could be supported in 4.18 as docummented in:

https://wiki.archlinux.org/index.php/Gamepad#Steam_Controller

I have got steam-controller support doing it:

Create file:

# file  /etc/udev/rules.d/99-steam-controller-perms.rules
# Valve USB devices
SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", MODE="0666"
# Steam Controller udev write access
KERNEL=="uinput", SUBSYSTEM=="misc", MODE="0660", GROUP="input"

# Valve HID devices over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="28de", MODE="0666"

# Valve HID devices over bluetooth hidraw
KERNEL=="hidraw*", KERNELS=="*28DE:*", MODE="0666"

Add users to input group and logoff/logon.

source: https://wiki.gentoo.org/wiki/Steam_Controller

Also see: https://gitlab.com/Fabish/steam-devices

I think it could be good to have it in frequently asked questions wiki.

@fabiscafe
Copy link

@pablodav I dont know if its different on fedora, but mode 666 isnt a good idea. Thats why we're using an additional tag "uaccess" so only the current loged-in user got access to the device. On top of that I need to load the uinput kernel module. I've done some readme now in the gitlab repo

@nanonyme
Copy link
Collaborator

Added some comments to https://github.com/flathub/com.valvesoftware.Steam/wiki/Frequently-asked-questions#my-controller-isnt-recognized-at-all; might turn that into a separate page if it expands too much

@pablodav
Copy link
Contributor

thanks @Tids for your comment, I don't know what's the proper configuration, but great to have better examples in your repo https://gitlab.com/Fabish/steam-devices/blob/master/71-Valve-Controllers.rules

I think it is the best set of examples I can find.

@nanonyme thanks for adding it on wiki, looks good as it is now, over time linux kernel could get more and more support, let's see what happens in some months...

@Lctrs
Copy link
Contributor

Lctrs commented Feb 11, 2021

FTR, you can also take the udev rules included in rpmfusion's steam package.

@PureTryOut
Copy link

Actually, I would recommend the udev rules used by the official Steam package itself.

The latest Steam package can be found here. Once you've downloaded and extracted the archive, the udev rules can be found under steam-launcher/subprojects/steam-devices/.

Note there is also a SteamVR rules file in there, but SteamVR has other issues preventing it from being used, #636.

@fabiscafe
Copy link

@PureTryOut In that case you can just use:
https://github.com/ValveSoftware/steam-devices

However I still provide a few more devices (including the steam-devices) in
https://gitlab.com/fabis_cafe/game-devices-udev

@PureTryOut
Copy link

Oh I didn't realize they have tagged releases for that in a separate repo, awesome!

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

No branches or pull requests

9 participants