Add udev rule for reading controller without root privileges
This commit is contained in:
11
70-ps5-controller.rules
Normal file
11
70-ps5-controller.rules
Normal 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"
|
10
README.md
10
README.md
@@ -17,7 +17,15 @@ pip install --upgrade pydualsense
|
||||
|
||||
## 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.
|
||||
|
||||
|
Reference in New Issue
Block a user