mirror of
https://github.com/games-on-whales/wolf.git
synced 2026-10-15 13:02:03 +00:00
[PR #421] [CLOSED] fix(fake-udev): persist /run/udev/data so libudev can enumerate devices #455
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#455
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/421
Author: @JBailes
Created: 6/7/2026
Status: ❌ Closed
Base:
stable← Head:fix/fake-udev-write-db📝 Commits (2)
13bb455fix(fake-udev): persist the /run/udev/data DB record117e67dstyle(fake-udev): clang-format (wrap condition per .clang-format)📊 Changes
1 file changed (+79 additions, -1 deletions)
View changed files
📝
src/fake-udev/fake-udev-cli.cpp(+79 -1)📄 Description
Problem
fake-udevonly broadcasts theNETLINK_KOBJECT_UEVENT; it never writes the/run/udev/data/c<maj>:<min>database record. libudev consumers enumerate devices from that database, not from the netlink event. In session images that run noudevd(gamescope/Steam), a Wolf virtual gamepad ismknod'd and its evdev events flow, but SDL never seesID_INPUT_JOYSTICKfor it, so certain games ignore the controller. Keyboard/mouse are unaffected because they don't depend on that tag. The fake-udev docs already state it should "generate the appropriate DB entries in/run/udev/data/" — the code never did.Evidence
strace fake-udev -m <add event>:socket/bind/sendmsgonly; noopen/writeunder/run/udev.udev_enumerate_scan_devices) skips the pad; writing the record by hand makes Steam detect it on its next scan.fake-udevwrites this record runs controllers correctly in production; this change brings stockfake-udevto parity.Change
On
add, parse the uevent payload and write the udev DB entry the waysystemd-udevddoes:E:device properties,I:USEC_INITIALIZED,G:/Q:tags,V:1, keyed onMAJOR:MINOR. Onremove, unlink it. Written before the broadcast, so a consumer that looks the device up in response to the event finds a complete record. No-op when the payload carries noMAJOR/MINOR. No new dependencies —<fstream>/<sys/stat.h>/<unistd.h>are already included.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.