Add commandline option for subselection of devices to be used for session input.
Feature request
I am looking into creating—or seeing added to Gamescope—the ability to select specific input devices to be treated differently by the nested Gamescope window, enabling single-GPU multiseating.
Currently, Gamescope accepts input and appears to support locking mouse and keyboard input to the nested window using command-line options. This feature would expand on those options by allowing input to be locked to the nested window while only utilizing a subset of available input devices. The remaining devices could then be used by the main desktop or a different Gamescope session.
Since Gamescope is designed for gaming, comes preinstalled on SteamOS, and can run in a nested mode, I believe this feature would be highly beneficial. It would enable split-screen multiplayer for non-Steam games with two sets of peripherals, as well as for Steam games if run under separate accounts.
Games that are not graphically demanding would not require the full power of the GPU, and for devices such as laptops and handhelds, the ability to support multiseating for both gaming and traditional workloads would be an interesting and valuable feature.
A similar feature previously existed in the X11 project, primarily through Xephyr. While lacking GPU acceleration without additional tools, it allowed for nested multiple sessions. Here is a Reddit discussion from 12 years ago when Xephyr still supported this. However, this feature was removed about seven years ago in an update to X11's backend input handling, which eliminated the required argument and broke functionality. Xserver gitlab post about removal Removal commit
Now that the Linux ecosystem has largely transitioned to Wayland, with X11 applications running via XWayland, it seems important to bring this removed feature into the Wayland world.
Should this be added, this may be a useful feature in a future steam update to allow for local split screen on nearly any game; although it may require steaminput support.
If this would be better suited as a separate project, I would be willing to explore developing it, though I am currently unsure if I have the experience or time to create and maintain an entirely new project. However, I believe this feature would be useful within Gamescope, and based on a brief review of the code, it seems feasible to implement while handling devices via libinput.
If this assumption turns out to be incorrect (Unsure if direct device handling requires root or not), feel free to let me know in order to make revisions as to this goal, or to branch into a different project.
Thanks!
Little bit on topic, I found your thread while I was attempting to use gamescope and Xephyr for this purpose, using the precise documentation you linked to and others. Please look at my solution: https://codeberg.org/gggrav/arch-multiseat
Hopefully it will be helpful to future readers. Currently it only works with a dual gpu setup (integrated + dedicated), but perhaps I'll try to adjust it to virtual displays in a single GPU setup in the future.