mirror of
https://github.com/games-on-whales/wolf.git
synced 2026-10-15 13:02:03 +00:00
[PR #455] [MERGED] fix(input): stop Wolf virtual controllers leaking into the host desktop #480
Labels
No labels
🧠 1 - 🤖 999
AMD
bug
bug
cannot reproduce
documentation
duplicate
easy
enhancement
enhancement
enhancement
fixed?
fixed?
good first issue
hard
help wanted
Intel
invalid
LXC
medium
moonlight-protocol
Multi GPU
nixos
not a bug
nvidia
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/wolf#480
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?
📋 Pull Request Information
Original PR: https://github.com/games-on-whales/wolf/pull/455
Author: @JBailes
Created: 7/6/2026
Status: ✅ Merged
Merged: 8/8/2026
Merged by: @JBailes
Base:
stable← Head:fix/controller-host-input-leak📝 Commits (4)
5b96404fix(input): isolate Wolf virtual controllers from the host desktopac068f7feat(scripts): add wolf-input-diag.sh controller passthrough diagnostic3f86094fix(input): address review — tighten udev glob, drop dead keyboard/mouse rule8aec13bdocs(input): make 85-wolf.rules the single source of truth for udev rules📊 Changes
5 files changed (+491 additions, -25 deletions)
View changed files
📝
85-wolf.rules(+22 -12)📝
docs/modules/user/pages/quickstart.adoc(+12 -13)📝
docs/modules/user/pages/troubleshooting.adoc(+43 -0)➕
scripts/README.adoc(+40 -0)➕
scripts/wolf-input-diag.sh(+374 -0)📄 Description
Problem
Wolf's virtual gamepads are created via
uinput/uhidinside the Wolf container but appear as real devices in the host kernel. The udev rules that are supposed to keep them off the host's active seat don't do their job, sosystemd-logindgrants the logged-in desktop user auaccessACL and the streamed controller also drives the host desktop (e.g. the DualSense touchpad moves the host mouse pointer).Fixes #451. Also matches the reports in games-on-whales/unraid-plugin#57.
Root cause
Three compounding defects in
85-wolf.rules(and the copy in the quickstart docs):Wolf PS5 (virtual) padandWolf gamepad (virtual) motion sensors, but the pad is created asWolf DualSense (virtual) pad(src/moonlight-server/control/input_handler.cpp:126), and the kernel'shid-playstationdriver names its children… pad Touchpadand… pad Motion Sensors. None of those match, so the rules never fire for the DualSense.MODE/GROUP, with no seat reassignment and nouaccessremoval. AuaccessACL overrides the group permissions, so a pad leaked to the host even when its name matched — which is why the leak reproduced across Xbox, DualSense and the Wolf UI.Fix
Wolf *virtual*name glob instead of hard-coded names — covers the gamepad, the DualSenseTouchpad+Motion Sensorschild devices, and thehidrawnode, and won't go stale on a future rename.ATTR, for the uinput pads) and any ancestor's name (ATTRS, for the uhid DualSense children + hidraw).seat9and strip theuaccessACL so no logged-in host user can read them.85-wolf.rulesis now the single source of truthPer review feedback, the rules were duplicated between
85-wolf.rulesand the quickstart docs. Rather than delete the file — downstream installers (e.g. the Unraid plugin, games-on-whales/unraid-plugin#57) want a canonical URL to pull from — the file stays and the docs now fetch it instead of restating it:This also fixes drift the two copies had already accumulated: the docs told users to install the rules as
85-wolf-virtual-inputs.rules, whilescripts/wolf-input-diag.shchecks/etc/udev/rules.d/85-wolf.rules— so the diagnostic would report "not rule-covered" on a correctly configured host.Also dropped the stale claim that Wolf creates virtual keyboard/mouse devices — those events go to gst-wayland-display, not
uinput.New diagnostic —
scripts/wolf-input-diag.shHost-side, non-destructive tool to validate controller passthrough and isolation (it never grabs a device, so it can't steal input from a running game):
host— audits everyWolf …device on the host and flags any reachable by a non-root user or not covered by the rules (the leak in this issue).discover/static— lists per-container input devices and fails if a node is shared across containers.monitor/live— live checks that input reaches the container it should and no other.It doubles as the acceptance test for the rules change.
Testing
input_handler.cpp) and the pinnedinputtinodependency; rules and script are syntax-checked.logind/udevbehaviour (whetherseat9+TAG-="uaccess"fully strips the ACL on the touchpad child device) should be confirmed on a real device. Reproduce and confirm with the bundled diagnostic:🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.