mirror of
https://github.com/games-on-whales/fenrir.git
synced 2026-10-15 12:51:53 +00:00
[PR #10] [wolf-agent] act as fake-udev for hotplugged input devices #12
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/fenrir#12
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/fenrir/pull/10
Author: @shrinedogg
Created: 6/13/2026
Status: 🔄 Open
Base:
main← Head:feat/wolf-agent-fake-udev📝 Commits (1)
b621069[wolf-agent] act as fake-udev for hotplugged input devices📊 Changes
6 files changed (+385 additions, -1 deletions)
View changed files
📝
pkg/controllers/agent.go(+84 -0)➕
pkg/fakeudev/fakeudev.go(+173 -0)➕
pkg/fakeudev/fakeudev_linux.go(+26 -0)➕
pkg/fakeudev/fakeudev_other.go(+9 -0)➕
pkg/fakeudev/fakeudev_test.go(+54 -0)📝
pkg/wolfapi/client.go(+39 -1)📄 Description
Problem
Wolf creates virtual input devices (gamepads, mouse, keyboard) at runtime and publishes
PlugDeviceEvent/UnplugDeviceEventover its API, carrying the raw udev properties and hwdb entries for each device. In the Docker runner, Wolf'sfake-udevhelper consumes those events and injects the matching udev database entry plus a libudev netlink event, so that SDL/Steam inside the container actually detect the device.Under Kubernetes (direwolf), nothing performs that fake-udev injection. The kernel only broadcasts real uevents in the host network namespace, so a device hotplugged by Wolf is invisible to clients in the session pod — controllers never show up in-game.
Fix
Implement the fake-udev role in
wolf-agent:pkg/wolfapi)./run/udev/data/entry to a volume shared with the app container, and broadcast a synthetic libudev netlink event inside the pod network namespace solibudevclients (SDL/Steam) discover the device.MAJOR/MINORfrom sysfs, since Wolf cannotstat/dev/inputfrom its own container.This adds a new
pkg/fakeudevpackage (with unit tests) and wires it intopkg/controllers/agent.go.Testing
go build ./...(native andGOOS=linux GOARCH=amd64) andgo test ./pkg/fakeudev/...pass.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.