-
I am experimenting with starting a sway session based on a short tutorial for headless Steam streaming. Rather surprisingly, this works quite well for the most part - kind of like a poor man's multi-seat solution with a single GPU, something which normally doesn't work under Linux without sacrificing full OpenGL / Vulkan acceleration. The only issue I have encountered is that while the gamepad correctly sends input to apps started via the sway session, the keyboard and mouse control the terminal / the underlying session instead. I have tested this from Android and iOS, both with touch input and physical devices. Is there something that could be done on the Sunshine end to enable similar behavior to Steam and wayvnc? Or is there a setting on the OS side (udev rule?) that would do the trick? I looked at "udevadm monitor --property", but it only ever shows gamepad events. If anybody has an idea how to make this work, I'd love to hear it. If you need any logs, let me know. As for the Sunshine and sway setup, here are the relevant configs - Sunshine: hevc_mode = 2 Sway (default from /etc/sway/config, plus): exec --no-startup-id dbus-update-activation-environment --all |
Beta Was this translation helpful? Give feedback.
Replies: 0 comments 6 replies
-
In the meantime, a related issue has been opened as #137 and I am wondering if nothing can be done to send keyboard and mouse events from the client to the sway session instead of the terminal or X11 desktop it was started from. The gamepad registers perfectly fine under /devices/virtual/input and controls the sway session, but nothing at all is shown for other devices. It's a classical case of "being so close and yet so far" away from the solution. Does anybody have an idea or is this something that would need to be added to Sunshine? |
Beta Was this translation helpful? Give feedback.
-
Starting sway with I don't see an obvious way to split input devices between the two sessions without resorting to containers or cgroups (not sure if changing the owner on devices would work ...), but am quite happy with this setup, so case closed as far as I am concerned. Feel free to ask any questions regarding the setup if you're interested in getting this to work :) |
Beta Was this translation helpful? Give feedback.
Starting sway with
WLR_BACKENDS=headless,libinput sway
on another console (tty1, 2, ...) than the graphical session makes all devices connected to the host PC and client device available to that session as long as the console is selected. You can then just start any program (yuzu, RPCS3, etc.) via mouse and keyboard. As the apps connect to game controllers directly, even when switching the focus away from the console (to the X11 session for example), gamepad input stays with the Sunshine session, while M/K input changes focus to the selected console. This allows one person to play controller-enabled games while somebody else uses the machine for work or other tasks that require mouse and …