You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change introduces multiseat input support and virtual device naming on Linux, allowing multiple users to interact with Sunshine independently on the same system. The intention is to provide flexibility for shared workstations, gaming setups, and other advanced multi-user environments.
Modern systems (based on systemd and logind) have the concept of a seat (seat0 is default), with associated input devices and graphics outputs. For example, look at loginctl seat-status seat0.
When Sunshine fires up uinput, it’s logically similar to plugging in a second USB mouse: the input gets attached to the default seat (seat0).
While I don't know exactly what the solution should look like, (it) should ideally run as a separate "seat" (as far as logind and libinput are concerned).
Hi there. Nice work. I'm working on a similar problem but for containerized/headless deployments where systemd/logind aren't available.
My approach uses the device_phys field on uinput devices to tag them with a per-instance identifier, then filters by that field on the input consumer side. The key insight is that libevdev_set_phys() doesn't actually propagate to the kernel — you need to call ioctl(fd, UI_SET_PHYS, ...) on the uinput fd before UI_DEV_CREATE.
I think this could complement your seat naming nicely — your name suffix is great for human-readable identification (xinput list), while device_phys gives a machine-readable field that compositors and input libraries can filter on. For your use case, something like .device_phys = "sunshine/" + seat_id would let libinput-based compositors route devices to the correct seat automatically, without requiring manual udev rules.
I plan to submit a patch to inputtino that adds UI_SET_PHYS support (since the existing device_phys field in DeviceDefinition is silently ignored by the uinput backend). Would be happy to coordinate if you're interested — both approaches could land together.
you would still need to use the ID_SEAT udev property to make it work with logind tho
if you can handle that case you can comment the pr of that implementation and I close this one
using the phys attribute sounds cleaner, I'd like to test it
Good point. ID_SEAT and device_phys solve different layers of the same problem. phys gives a machine-readable tag that compositors/libinput can filter on without any udev rules or logind dependency, which is essential for containerized/headless setups. ID_SEAT is the right mechanism for bare-metal logind multi-seat.
I think both approaches are complementary, not competing. inputtino could support both: UI_SET_PHYS for the phys field (currently silently ignored), and your seat naming for logind-aware setups. They can land independently.
I'll submit the inputtino patch for UI_SET_PHYS support soon and link it here. Happy to coordinate so the two features work well together.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This change introduces multiseat input support and virtual device naming on Linux, allowing multiple users to interact with Sunshine independently on the same system. The intention is to provide flexibility for shared workstations, gaming setups, and other advanced multi-user environments.
from #137 (comment)
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage