Replies: 0 comments 4 replies
-
Alright, after a long silence and my setup changing quite a bit, I have come full circle with the above request while trying to run a fully accelerated cloud desktop based on a Incus / LXD container and sway / wlroots. This works really well for the audio and video part by just passing the GPU to the container, but Sunshine's virtual input devices (keyboard, mouse) won't show in libinput just the same as described above. Game controllers can be used as before, but I'd really like to use m/k to control the desktop via Moonlight. There's a hack how to make this work: "Overlay" Moonlight with a transparent TigerVNC window and use that for input via wlr-virtual-keyboard and wlr-virtual-pointer, which does register correctly with sway. This combination makes for a super simple and fully accelerated cloud desktop (video, 3D, without physical display) running in a container. The question is as before, would it be possible to implement both protocols in Sunshine as an alternative to the existing virtual devices via uinput / udev (which does not work in the container)? If this is somewhat feasible, I wouldn't mind compensating you for your time if the result makes it into Sunshine as it would be really nice to have this working directly without having to use input via VNC as a crutch. Anybody interested in picking this little project up? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
There's issue #137, but the thread is quite diluted and not a feature request, so I figured I'd post one here in the hopes that someone (not a dev myself) working on Sunshine might find this an interesting idea ...
Use-case: sway lends itself really well to setup a headless Sunshine session that allows for streaming games in the background while continuing to use the host for other tasks in another session. For example, I have a sway session running on tty6 and xfce on tty7. This works really well as long as a game controller can be used, which keeps its focus on the sway session even if xfce is brought up on the host. Unfortunately, physical and virtual keyboard and mouse input is only possible as long as the sway session is in focus, otherwise all events are sent to the xfce / X11 session.
This is OK for my purposes 90% of the time, but I couldn't help wondering if there isn't a way to do this properly and had a little chat with "emersion" (working on sway and wlroots) who mentioned that as long as evdev is being used, this would probably not be possible and recommended supporting wlr-virtual-keyboard and wlr-virtual-pointer in order to send virtual input to the sway session in the background.
wayvnc supports this protocol and it works quite nicely, though only on wlroots / sway. Still, that's probably a big step forward as firing up a headless sway session is quickly done and comes with little overhead compared to a full blown DE. Also, launching sway on its own tty or from within another X11 or wayland session is quite painless so that this could become the go-to solution for people wanting to setup a poor man's multiseat system without the (administrative) overhead of virtualization or containers.
Since Sunshine does support multiple ways for screen capture as well, would it be possible to support the aforementioned protocol(s) in addition to evdev to enable this use-case?
Beta Was this translation helpful? Give feedback.
All reactions