[PR #190] [MERGED] Hidraw hotplug fix #387

Closed
opened 2026-10-15 13:00:12 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/games-on-whales/wolf/pull/190
Author: @ABeltramo
Created: 4/1/2025
Status: ✅ Merged
Merged: 4/2/2025
Merged by: @ABeltramo

Base: stable ← Head: dev-hidraw-fix


📝 Commits (2)

  • 4680192 fix: dynamically set cgroup rules
  • e0ba6e6 feat: updated dependencies

📊 Changes

7 files changed (+111 additions, -31 deletions)

View changed files

📝 .github/workflows/linux-build-test.yml (+3 -3)
📝 CMakeLists.txt (+14 -0)
📝 src/core/src/platforms/all/helpers/CMakeLists.txt (+1 -1)
📝 src/moonlight-server/CMakeLists.txt (+16 -8)
📝 src/moonlight-server/api/endpoints.cpp (+18 -18)
📝 src/moonlight-server/runners/docker.cpp (+57 -0)
📝 tests/CMakeLists.txt (+2 -1)

📄 Description

Thanks to all reports in #187 and after a bit of digging, I've found out that there was a mismatch in the major number that would be assigned for hidraw devices; for example 244 on Arch whilst 246 on Debian. When the mismatch occurs, our hot plugging code (mknod /dev/hidraw* ...) will silently fail resulting in

root@77d4bf4b9ff0:/dev# cat hidraw8 
cat: hidraw8: Operation not permitted

which in turn will end up in mismatched inputs between the client and the server as originally reported.

Turns out that hidraw devices use dynamically assigned major numbers rather than static ones. You can easily check which number you get assigned with

grep hidraw /proc/devices

So, we could do the unsafe way of defaulting to c *:* rmw, instead I've added the code for dynamically grab those values and set the right DeviceCgroupRules instead.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/games-on-whales/wolf/pull/190 **Author:** [@ABeltramo](https://github.com/ABeltramo) **Created:** 4/1/2025 **Status:** ✅ Merged **Merged:** 4/2/2025 **Merged by:** [@ABeltramo](https://github.com/ABeltramo) **Base:** `stable` ← **Head:** `dev-hidraw-fix` --- ### 📝 Commits (2) - [`4680192`](https://github.com/games-on-whales/wolf/commit/4680192008d802899049cfef1ddbc18e0c46d74b) fix: dynamically set cgroup rules - [`e0ba6e6`](https://github.com/games-on-whales/wolf/commit/e0ba6e600be91c34ccb6944b37906f922b1e44c0) feat: updated dependencies ### 📊 Changes **7 files changed** (+111 additions, -31 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/linux-build-test.yml` (+3 -3) 📝 `CMakeLists.txt` (+14 -0) 📝 `src/core/src/platforms/all/helpers/CMakeLists.txt` (+1 -1) 📝 `src/moonlight-server/CMakeLists.txt` (+16 -8) 📝 `src/moonlight-server/api/endpoints.cpp` (+18 -18) 📝 `src/moonlight-server/runners/docker.cpp` (+57 -0) 📝 `tests/CMakeLists.txt` (+2 -1) </details> ### 📄 Description Thanks to all reports in #187 and after a bit of digging, I've found out that there was a mismatch in the `major` number that would be assigned for `hidraw` devices; for example `244` on Arch whilst `246` on Debian. When the mismatch occurs, our hot plugging code (`mknod /dev/hidraw* ...`) will silently fail resulting in ``` root@77d4bf4b9ff0:/dev# cat hidraw8 cat: hidraw8: Operation not permitted ``` which in turn will end up in mismatched inputs between the client and the server as originally reported. Turns out that `hidraw` devices use dynamically assigned major numbers rather than static ones. You can easily check which number you get assigned with ``` grep hidraw /proc/devices ``` So, we could do the unsafe way of defaulting to `c *:* rmw`, instead I've added the code for dynamically grab those values and set the right `DeviceCgroupRules` instead. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 13:00:12 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
games-on-whales/wolf#387
No description provided.