Add udev rule for reading controller without root privileges

This commit is contained in:
Michael Wagner
2023-02-02 20:09:44 +01:00
parent d34302b494
commit bda77189f7
2 changed files with 20 additions and 1 deletions

11
70-ps5-controller.rules Normal file
View File

@@ -0,0 +1,11 @@
# ref.: https://boilingsteam.com/the-dualsense-is-making-even-more-sense/
# copy this file to /etc/udev/rules.d
# reload udev rules with:
# udevadm control --reload-rules
# udevadm trigger
# PS5 DualSense controller over USB hidraw
KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0ce6", MODE="0660", TAG+="uaccess"
# PS5 DualSense controller over bluetooth hidraw
KERNEL=="hidraw*", KERNELS=="*054C:0CE6*", MODE="0660", TAG+="uaccess"

View File

@@ -17,7 +17,15 @@ pip install --upgrade pydualsense
## Linux ## Linux
On Linux based system you first need to install the hidapi through your package manager of your system. On Linux based system you first need to add a udev rule to let the user access the PS5 controller without requiring root privileges.
```bash
sudo cp 70-ps5-controller.rules /etc/udev/rules.d
sudo udevadm control --reload-rules
sudo udevadm trigger
```
Then install the hidapi through your package manager of your system.
On an Ubuntu system the package ```libhidapi-dev``` is required. On an Ubuntu system the package ```libhidapi-dev``` is required.