Advertisement
metalx1000

PS4 PlayStation 4 Controller setup on Linux

Aug 17th, 2023 (edited)
2,125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.04 KB | None | 0 0
  1. #Playstation 4 controller drivers
  2. #https://github.com/chrippa/ds4drv
  3.  
  4. #install
  5. sudo pip install ds4drv
  6.  
  7. #setup udev
  8. sudo wget "https://raw.githubusercontent.com/chrippa/ds4drv/master/udev/50-ds4drv.rules" -O /etc/udev/rules.d/50-ds4drv.rules
  9.  
  10. #or manually enter into "50-ds4drv.rules"
  11. KERNEL=="uinput", MODE="0666"
  12. KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="05c4", MODE="0666"
  13. KERNEL=="hidraw*", SUBSYSTEM=="hidraw", KERNELS=="0005:054C:05C4.*", MODE="0666"
  14. KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="09cc", MODE="0666"
  15. KERNEL=="hidraw*", SUBSYSTEM=="hidraw", KERNELS=="0005:054C:09CC.*", MODE="0666"
  16.  
  17. #update udev rules
  18. sudo udevadm control --reload-rules
  19. sudo udevadm trigger
  20.  
  21. #you may need to load uinput
  22. sudo modprobe uinput
  23.  
  24. #Contect controller with bluetooth or USB and start drivers
  25. ds4drv --hidraw
  26.  
  27. #bluetooth notes
  28. #scan for devices that are discoverable
  29. hcitool scan
  30.  
  31. #list connected devices
  32. hcitool con
  33.  
  34. echo "connect <address>"|bluetoothctl
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement