mirror of
https://github.com/games-on-whales/inputtino.git
synced 2026-10-15 12:52:02 +00:00
[PR #48] fix: honor physical paths for uinput devices #49
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#49
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/inputtino/pull/48
Author: @papi-ux
Created: 8/19/2026
Status: 🔄 Open
Base:
stable← Head:fix/uinput-device-phys📝 Commits (1)
8da0031fix: honor physical paths for uinput devices📊 Changes
11 files changed (+117 additions, -70 deletions)
View changed files
📝
src/uinput/include/inputtino/protected_types.hpp(+40 -0)📝
src/uinput/joypad_nintendo.cpp(+2 -7)📝
src/uinput/joypad_ps.cpp(+2 -7)📝
src/uinput/joypad_xbox.cpp(+3 -8)📝
src/uinput/keyboard.cpp(+3 -8)📝
src/uinput/mouse.cpp(+4 -14)📝
src/uinput/pentablet.cpp(+2 -7)📝
src/uinput/touchscreen.cpp(+3 -8)📝
src/uinput/trackpad.cpp(+2 -7)📝
tests/libinput.h(+14 -4)📝
tests/testLibinput.cpp(+42 -0)📄 Description
Summary
DeviceDefinition::device_physvalues through the kernelUI_SET_PHYSioctl before creating libevdev uinput devicesRoot cause
The public device definition exposes
device_phys, and callers already populate it, but inputtino's uinput implementations only applied the name and numeric identity fields. Only the UHID DualSense path consumed the physical path. Consumers that rely on udev matching byphystherefore could not classify uinput devices as intended.This was observed in papi-ux/polaris#494, where private-session keyboard and pointer devices remained on the host seat because their configured isolation marker never reached the kernel device.
libevdev_set_phys()is not sufficient here. It updates libevdev's in-memory descriptor, while libevdev documents virtual uinput devices as having no libevdev physical location. The working path opens/dev/uinput, appliesUI_SET_PHYSbeforeUI_DEV_CREATE, passes that descriptor into libevdev, and closes it after destroying the device.Compatibility
Empty physical paths retain the existing libevdev-managed descriptor path. Non-empty paths now honor the existing public field. Failure to open
/dev/uinputor apply the requested physical path fails device creation instead of silently creating a device with the wrong identity.Validation
stablelibrary: all five device sections fail because the sysfsphysvalue is empty, return code 5ID_SEAT=seat-polaris, groupinput, and mode0660; all nodes disappear after teardownclang-formatcheck: passThis PR remains draft pending maintainer review.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.