mirror of
https://github.com/games-on-whales/LXC2Docker.git
synced 2026-10-16 05:12:04 +00:00
[PR #73] [MERGED] fix(lxc): private tmpfs for /dev/input so virtual input nodes are per-container #76
Labels
No labels
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/LXC2Docker#76
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/LXC2Docker/pull/73
Author: @JBailes
Created: 6/8/2026
Status: ✅ Merged
Merged: 6/8/2026
Merged by: @JBailes
Base:
main← Head:fix/devinput-private-tmpfs📝 Commits (1)
6465e64fix(lxc): private tmpfs for /dev/input so virtual input nodes are per-container📊 Changes
13 files changed (+81 additions, -20 deletions)
View changed files
➕
.aimee/.last-verify(+8 -0)➕
.aimee/worktrees/0e7449d4/main(+1 -0)➕
.aimee/worktrees/1f9a2758/main(+1 -0)➕
.aimee/worktrees/31b246cc/main(+1 -0)➕
.aimee/worktrees/42f72487/main(+1 -0)➕
.aimee/worktrees/52803940/main(+1 -0)➕
.aimee/worktrees/5f0c2881/main(+1 -0)➕
.aimee/worktrees/65bd228e/main(+1 -0)➕
.aimee/worktrees/7952d60b/main(+1 -0)➕
.aimee/worktrees/dac9382e/main(+1 -0)➕
.aimee/worktrees/registry.tsv(+9 -0)📝
internal/lxc/config.go(+20 -20)📝
internal/lxc/config_test.go(+35 -0)📄 Description
Problem
Controllers and keyboard input in Wolf sessions die intermittently ("off and on"): a game (e.g. Bravely Default) or the Wolf UI stops accepting all input, even though the virtual input device is alive in the kernel.
autoMountDeviceDirsbind-mounts the host's/dev/inputdirectory into every container. On the host that directory is the single globaldevtmpfs, and a bind mount shares its superblock — somknod/unlinkof a device node inside one container is visible to every other container and the host.rprivateonly stops sub-mount propagation, not node operations within the shared filesystem.gow/Wolf manages its virtual input devices per session by
execingmknod/rmof/dev/input/eventNinside each container (controller and keyboard plug/unplug), built for Docker's private per-container/dev. On the shared devtmpfs those operations collide: one session's unplug (or a UI->game transition) deletes the node out from under another still-running session, leaving the kernel device alive but with no openable node.Evidence (live, PVE)
input34"Wolf X-Box One (virtual) pad",event19=13:83,js0=13:0./dev/input/event19+js0missing from the host and all containers simultaneously — only possible if unlinked from the shared devtmpfs.mknod: /dev/input/event19: File exists, then the node is gone.0:7 udevdevtmpfs at/dev/input.Fix
Mount a private tmpfs at the device directory instead of bind-mounting the host dir (no
nodev, so it allows device nodes), reproducing Docker's per-container/devisolation. Wolf populates it via its ownmknodon plug, and thec 13:* rwmwildcard already authorises any minor, so the per-node cgroup enumeration is dropped.Scope is only
/dev/input(majorDirMap); per-node device binds (/dev/dri,/dev/nvidia*) are unaffected. Unrelated to the linked-clone path (#71) and the cgroup:mixed fix (#69), both of which are working correctly.Tests
Added
TestAutoMountDeviceDirsUsesPrivateTmpfsandTestAutoMountDeviceDirsIgnoresNonWildcardAndUnknownMajors.go build ./...,go vet, andgo test ./...all pass.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.