workspaces-issues
workspaces-issues copied to clipboard
[Feature Request] - Information about how Kasm connects the gamepad inputs to the session
Is your feature request related to a problem? Please describe. Is this secret sauce for kasm, or is it using an open solution? I am using kasm for some game streaming sessions but I want to use an alternate application called sunshine for the actual streaming. I just use kasm for the container/environment management. All works well, except for joystick input from the client app for sunshine, which appears to be due to the missing /dev/input from the host system, which is expected since I don't want these containers accessing host devices except GPU
Describe the solution you'd like How does kasm register the gamepad for use with applications? I'd like to explore ways to replicate this with sunshine
Describe alternatives you've considered Currently the only option is to use keyboard and mouse
Additional context n/a
I'm not intimately familiar with the sunshine app. Are you running the client or server in the kasm container? Can you share your dockerfile?
If sunshine is acting as a client inside the container and it should normally be picking up locally attached gamepads, then it "should" work.
There are a few known issues mentioned in the docs you may want to be familiar with https://kasmweb.com/docs/latest/guide/gamepad_passthrough.html
If sunshine is supposed to be creating its own virtual gamepads with udev , then it may get confused with Kasm's virtual gamepads. In that case I recommend you disable Kasms gamepad functionality by disabling the group setting allow_kasm_gamepad . And then try putting the workspace in privileged mode. See Docker Run Config: https://kasmweb.com/docs/latest/guide/workspaces.html#docker-run-config
You may also need to create volume mappings to expose /dev and /run/udev/data into the container
https://kasmweb.com/docs/latest/guide/persistent_data/volume_mapping.html#volume-mapping
I'd see if you can get things working with those combinations. If so you may have a shot at backing things down to more restrictive permission etc.
Kasm's implementation is specific to our use-case , so there not much that would be applicable besides the suggestions I mentioned.
Thanks for the info that's helpful. I gathered the kasm gamepad server was only listening for events from the kasm api that was hosting the container. but I was wondering if the gamepad server and your implementation sucessfully isolated input events from 2 seperate user's containers, each with their own gamepad attached. That seems to be a major issue for sunshine and other docker projects In this case sunshine is the user frontend rather than kasm-api, your image just had most of the usability done which I appreciate. maybe I'll disable the kasm_gamepad_server, since these are "always on" rather than my usual kasm on demand use.