-
Notifications
You must be signed in to change notification settings - Fork 50
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
Fix Steam input in unprivileged containers #81
Comments
Yes. A valve engineer confirm to me, that LD_PRELOAD-ing steam to do this should give us all the infos we need. Basically we should intercept UI_DEV_CREATE and then internally call UI_GET_SYSNAME, matching the name to our container and returning from the intercepted ioctl. Everything that is not |
Thank you so much for confirming it! It should be fairly straightforward then, just need to plug together |
Hi! Just wondering if there's any update on this. I tried the quick fix, as I just want to connect to my TV and phone (separate times, home / work respectively), but I get the following in my logs: I set the runner to what you put in the quick fix in
And here's my full log output if it's needed:
|
@pahaze is there a specific reason why you are trying to use this? |
There is, sadly. I use a DualSense/DualShock 4 to play my games, and a lot of the games I own only work with Xbox controllers or need to map the controller to keyboard keys using Steam Input |
Right, I see what you mean. |
That should do the job! Minus the keyboard/mouse games, but I can get a wireless combo later on for those. Thanks! |
Nice, unfortunately that's just a workaround.. Hopefully I'll get around to properly support Steam input in Wolf! |
If possible, I might try to look into it some myself too. I'm not too experienced with Docker, or Linux to that level, and I'd like to start learning! I've not been doing much programming as is, too :). But, just an idea, and please tell me if this isn't possible or I'm wrong, but is it possible to set up seats between the Wayland sessions to know which Steam Input device is being used for each Wolf session, rather than having to rely on kernel events and potentially accessing other containers? |
Unfortunately no, historically compositors just ignored joypads and apps had to direcly access them so everything relies on accessing stuff directly under If you want to take a look into this I suggest reading how we achieved hotplug in Docker and the rationale behind this issue and the status of the corresponding stale PR. Feel free to jump in our Discord server if you want to ask anything in more detail! |
I see.. I'll definitely try to look into it some if I can, at the very least to try to get a better understanding. I did change my config, and I got this at first: Which, scared me, until I went past the screen and saw it was actually working as an Xbox controller (hello from work!) 😆 Thanks again for the help and all info! |
Steam input works by creating virtual devices using
uinput
(similar to how we do it in inputtino). So the first step is obviously to allow the Steam container to access it:When you start a game with steam input enabled the following
uevents
will be generated:As you can see it's missing the corresponding
udev
events (network isolation for the win); we'll have to pick those kernel events up,mknod
the devices and relay the correspondentudev
event using fake-udev.The only bit that I'm not sure is how to avoid mounting other containers devices. Unfortunately kernel events aren't isolated, for example I can see the event for when a device is plugged in the host.. How can we
mknod
only the devices that are actually generated by this steam instance? Intercept/dev/uinput
ioctl calls?Quick fix
This will break isolation, but for a single user this should work:
And set the env variable
WOLF_DOCKER_FAKE_UDEV_PATH=""
to disable ourfake_udev
implementation.The text was updated successfully, but these errors were encountered: