mirror of
https://github.com/games-on-whales/inputtino.git
synced 2026-10-15 21:02:05 +00:00
[GH-ISSUE #45] Make virtual input device identifiers (VID/PID/name) configurable #14
Labels
No labels
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/inputtino#14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mwatola-glitch on GitHub (Jul 6, 2026).
Original GitHub issue: https://github.com/games-on-whales/inputtino/issues/45
Is your feature request related to a problem?
The virtual
uinputdevices created by inputtino use hardcoded identifiers: vendor0xBEEF, product0xDEAD, and fixed names likeMouse passthrough,Keyboard passthrough. Since both Sunshine and Wolf create their devices through inputtino, and the identifiers are identical for every caller, it is impossible to tell apart the virtual devices created by two independent host instances running on the same machine.Concrete use case: I run two Sunshine instances on one Linux host - one streaming my own KDE/seat0 desktop, and one as a headless per-user session (headless
sway+ its own Sunshine) for a second user. Both instances create byte-identical uinput devices:0xBEEF:0xDEAD, the same names, emptyphys/uniq. As a result:seat0(KWin) enumerates both instances' virtual devices, so the remote client's mouse input for the headless session leaks into my physical desktop (and vice versa).ID_SEATassignment, or per-device compositor setting can isolate one instance from the other.This is the core blocker behind LizardByte/Sunshine#3768 ("Multiple Input Isolation").
Describe the solution you'd like
Let callers override the uinput device descriptor (name, vendor id, product id) when creating virtual devices, defaulting to the current hardcoded values for full backward compatibility. Something like:
With this, a second instance can be given a distinct VID (e.g.
0xF00D) or a name suffix, and then standard tooling (a udevID_SEATrule, or per-device enable/disable in the compositor) can isolate it cleanly - no hacks required.What people have to do today (workaround)
Without configurable identifiers, the only way to distinguish instances is to patch the device identity from outside the process. In my case I
LD_PRELOADa small shim into one Sunshine instance that interceptsioctl(UI_DEV_SETUP)and rewritesid.vendor0xBEEF -> 0xF00D, then isolate that vendor in the compositor. It works, but:cap_sys_adminfor KMS capture), becauseLD_PRELOADis ignored underAT_SECURE- forcing a second, non-capped copy of the binary for the instance that only needswlrcapture.A small config option in inputtino (surfaced by Sunshine/Wolf) would make all of this unnecessary and would unblock multi-instance isolation in general.
I'm happy to open a PR - an inputtino descriptor change (backward-compatible defaults) plus the config wiring in Sunshine - if the maintainers are open to this approach.
@ABeltramo commented on GitHub (Jul 7, 2026):
That is already the case:
github.com/games-on-whales/inputtino@b887f6a37a/include/inputtino/input.hpp (L22-L30)Example usage:
github.com/games-on-whales/inputtino@b887f6a37a/tests/testUHID.cpp (L471-L482)@mwatola-glitch commented on GitHub (Jul 7, 2026):
Thanks @ABeltramo, you're right - I missed that inputtino already exposes name/vendor/product via
DeviceDefinition. So the gap is purely on the consumer side: Sunshine creates the devices with the defaults and doesn't expose a way to override them per instance. I'll pursue that on the Sunshine side (LizardByte/Sunshine#3768). Appreciate the pointers!