[PR #72] [MERGED] Add PS5 joypad emulation to unprivileged containers #350

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

📋 Pull Request Information

Original PR: https://github.com/games-on-whales/wolf/pull/72
Author: @ABeltramo
Created: 5/26/2024
Status: ✅ Merged
Merged: 6/27/2024
Merged by: @ABeltramo

Base: stable ← Head: input-upgrade


📝 Commits (10+)

  • 0d79ea9 feat: upgraded inputtino to latest, improved virtual device handling
  • 0f120b8 feat: implemented udev events for PS5 pad
  • fae90de fix: PS5 pad: additional input handlers + hotplug (fake) events
  • 1c15b28 fix: bring latest fixes from inputtino
  • 44a5130 fix: LED udev events, battery, tests
  • 9b5303f docs: updated with uhid requirement
  • 7bbe7a2 fix: everything required to get PS pad perfectly working: gyro, led, hidraw, udev rules
  • 4b9a0a0 tests: speedup compilation, properly init boost logs
  • d392033 CI: better flow, added more tests to arm build
  • 12207e0 fix: properly queue plugged devices queue

📊 Changes

40 files changed (+1329 additions, -750 deletions)

View changed files

📝 .github/workflows/clang-format.yml (+1 -1)
📝 .github/workflows/docker-build.yml (+4 -4)
📝 .github/workflows/linux-build-test.yml (+84 -24)
📝 .github/workflows/mirror-repo.yml (+1 -1)
📝 docker/gstreamer.Dockerfile (+1 -1)
📝 docker/wolf.Dockerfile (+2 -2)
📝 docs/modules/user/pages/configuration.adoc (+20 -0)
📝 docs/modules/user/pages/quickstart.adoc (+11 -8)
📝 src/core/CMakeLists.txt (+10 -5)
📝 src/core/src/core/input.hpp (+23 -9)
➕ src/core/src/platforms/all/helpers/helpers/tsqueue.hpp (+56 -0)
📝 src/core/src/platforms/linux/uinput/joypad.cpp (+155 -81)
📝 src/core/src/platforms/linux/uinput/uinput.hpp (+1 -0)
📝 src/moonlight-protocol/moonlight/control.hpp (+18 -3)
📝 src/moonlight-server/control/input_handler.cpp (+435 -278)
📝 src/moonlight-server/control/input_handler.hpp (+32 -0)
📝 src/moonlight-server/rest/endpoints.hpp (+2 -2)
📝 src/moonlight-server/runners/docker.hpp (+32 -29)
📝 src/moonlight-server/state/configTOML.cpp (+14 -1)
📝 src/moonlight-server/state/data-structures.hpp (+18 -12)

...and 20 more files

📄 Description

To test this pull the Docker image ghcr.io/games-on-whales/wolf:input-upgrade

To support DualSense joypads with gyro and acceleration:

  • add -v /dev/:/dev/:rw
  • add the udev rule under /etc/udev/rules.d/85-wolf-virtual-inputs.rules
  • To get the PS5 LED to work you'll also need to add "c 244:* rmw" under DeviceCgroupRules in config.toml otherwise Wolf will log a warning of Unable to get stats of /dev/hidraw**
# Allows Wolf to access /dev/uhid
KERNEL=="uhid", TAG+="uaccess"

TODO:

  • Basic joypad correctly recognised as PS5
  • Hotplug device without privileged
  • Gyro and acceleration
    • Check actual values, seems way off
  • LED
  • Touchpad
  • Battery report

🔄 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/72 **Author:** [@ABeltramo](https://github.com/ABeltramo) **Created:** 5/26/2024 **Status:** ✅ Merged **Merged:** 6/27/2024 **Merged by:** [@ABeltramo](https://github.com/ABeltramo) **Base:** `stable` ← **Head:** `input-upgrade` --- ### 📝 Commits (10+) - [`0d79ea9`](https://github.com/games-on-whales/wolf/commit/0d79ea9f9b2a8c3b8127ae62209ede5e8d49d45f) feat: upgraded inputtino to latest, improved virtual device handling - [`0f120b8`](https://github.com/games-on-whales/wolf/commit/0f120b8fd8caedab387082dd37e135821557496b) feat: implemented udev events for PS5 pad - [`fae90de`](https://github.com/games-on-whales/wolf/commit/fae90defd3a08e3b979021f65a84b38931c06798) fix: PS5 pad: additional input handlers + hotplug (fake) events - [`1c15b28`](https://github.com/games-on-whales/wolf/commit/1c15b28ad661526d795d9d2a58f20e7257fc793c) fix: bring latest fixes from inputtino - [`44a5130`](https://github.com/games-on-whales/wolf/commit/44a51306ad0c853da60d8f7e77e39616f57b0e02) fix: LED udev events, battery, tests - [`9b5303f`](https://github.com/games-on-whales/wolf/commit/9b5303f1bd8d68d81c2344a3c0710ef0813657fc) docs: updated with uhid requirement - [`7bbe7a2`](https://github.com/games-on-whales/wolf/commit/7bbe7a2af93db4840ba4acd277b31943f50fe894) fix: everything required to get PS pad perfectly working: gyro, led, hidraw, udev rules - [`4b9a0a0`](https://github.com/games-on-whales/wolf/commit/4b9a0a078e03695a712c6ad82c99a3020d05fa8b) tests: speedup compilation, properly init boost logs - [`d392033`](https://github.com/games-on-whales/wolf/commit/d392033d1249623e491577a0ce72f7fd8baee1f9) CI: better flow, added more tests to arm build - [`12207e0`](https://github.com/games-on-whales/wolf/commit/12207e04ce6b38a1c6538c4bb1df2ebc8d5ac05c) fix: properly queue plugged devices queue ### 📊 Changes **40 files changed** (+1329 additions, -750 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/clang-format.yml` (+1 -1) 📝 `.github/workflows/docker-build.yml` (+4 -4) 📝 `.github/workflows/linux-build-test.yml` (+84 -24) 📝 `.github/workflows/mirror-repo.yml` (+1 -1) 📝 `docker/gstreamer.Dockerfile` (+1 -1) 📝 `docker/wolf.Dockerfile` (+2 -2) 📝 `docs/modules/user/pages/configuration.adoc` (+20 -0) 📝 `docs/modules/user/pages/quickstart.adoc` (+11 -8) 📝 `src/core/CMakeLists.txt` (+10 -5) 📝 `src/core/src/core/input.hpp` (+23 -9) ➕ `src/core/src/platforms/all/helpers/helpers/tsqueue.hpp` (+56 -0) 📝 `src/core/src/platforms/linux/uinput/joypad.cpp` (+155 -81) 📝 `src/core/src/platforms/linux/uinput/uinput.hpp` (+1 -0) 📝 `src/moonlight-protocol/moonlight/control.hpp` (+18 -3) 📝 `src/moonlight-server/control/input_handler.cpp` (+435 -278) 📝 `src/moonlight-server/control/input_handler.hpp` (+32 -0) 📝 `src/moonlight-server/rest/endpoints.hpp` (+2 -2) 📝 `src/moonlight-server/runners/docker.hpp` (+32 -29) 📝 `src/moonlight-server/state/configTOML.cpp` (+14 -1) 📝 `src/moonlight-server/state/data-structures.hpp` (+18 -12) _...and 20 more files_ </details> ### 📄 Description To test this pull the Docker image `ghcr.io/games-on-whales/wolf:input-upgrade` To support DualSense joypads with gyro and acceleration: - add `-v /dev/:/dev/:rw` - add the udev rule under `/etc/udev/rules.d/85-wolf-virtual-inputs.rules` - To get the PS5 LED to work you'll also need to add `"c 244:* rmw"` under `DeviceCgroupRules` in `config.toml` otherwise Wolf will log a warning of `Unable to get stats of /dev/hidraw**` ```bash # Allows Wolf to access /dev/uhid KERNEL=="uhid", TAG+="uaccess" ``` TODO: - [x] Basic joypad correctly recognised as PS5 - [x] Hotplug device without privileged - [x] Gyro and acceleration - [x] Check actual values, seems way off - [x] LED - [x] Touchpad - [x] Battery report --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 12:59:56 +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#350
No description provided.