question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hidraw USB mode doesn't work with DS4 Slim

See original GitHub issue

Trying to get the DualShock 4 Slim controller to work through USB, because Bluetooth mode has too much input lag (but it works).

Ubuntu 16.04 x64, Installed stable ds4drv through pip install ds4rv, Ran sudo ds4rv --hidraw The output is:

[info][controller 1] Created devices /dev/input/js1 (joystick) /dev/input/event16 (evdev) 
[info][hidraw] Scanning for devices
[info][hidraw] Scanning for devices
[info][hidraw] Scanning for devices

Every time I disconnect and reconnect the controller USB cable it does a scan for devices but doesn’t detect anything.

My lsusb sees the controller as: Bus 003 Device 008: ID 054c:09cc Sony Corp.

When connecting the controller through USB dmesg outputs the following:

[583905.131514] usb 3-10: new full-speed USB device number 9 using xhci_hcd
[583905.260575] usb 3-10: New USB device found, idVendor=054c, idProduct=09cc
[583905.260577] usb 3-10: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[583905.260578] usb 3-10: Product: Wireless Controller
[583905.260579] usb 3-10: Manufacturer: Sony Interactive Entertainment
[583905.260649] usb 3-10: ep 0x84 - rounding interval to 32 microframes, ep desc says 40 microframes
[583905.260651] usb 3-10: ep 0x3 - rounding interval to 32 microframes, ep desc says 40 microframes
[583905.271098] input: Sony Interactive Entertainment Wireless Controller as /devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10:1.3/0003:054C:09CC.0049/input/input125
[583905.271196] hid-generic 0003:054C:09CC.0049: input,hidraw1: USB HID v1.11 Gamepad [Sony Interactive Entertainment Wireless Controller] on usb-0000:00:14.0-10/input3

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6

github_iconTop GitHub Comments

9reactions
ghostcommented, Oct 28, 2016

Looks like the problem is that the device name is different for the DS4 Slim, I’ve managed to get ds4drv to work by changing one line in /backends/hidraw.py:

Before:

HID_DEVICES = {
    "Sony Computer Entertainment Wireless Controller": HidrawUSBDS4Device,
    "Wireless Controller": HidrawBluetoothDS4Device,
}

After:

HID_DEVICES = {
    "Sony Interactive Entertainment Wireless Controller": HidrawUSBDS4Device,
    "Sony Computer Entertainment Wireless Controller": HidrawUSBDS4Device,
    "Wireless Controller": HidrawBluetoothDS4Device,
}

I’ll create a pull request.

1reaction
stevenqubrossicommented, Jan 23, 2017

Hi guys, sorry I’m new to the world of retro pie. How can I find the directory for /backends/hidraw.py? Like where is this located so I can edit the above information? I am using PuTTY to access the backend, but I can’t seem to find it anywhere…

Read more comments on GitHub >

github_iconTop Results From Across the Web

If Steam doesn't detect your Dualshock PS4 (Ubuntu 18.04 ...
I see a lot of people have this problem in Ubuntu 18.04. ... ATTRS{idProduct}=="0ba0", MODE="0666" # DualShock 4 Slim over USB hidraw KERNEL=="hidraw*", ......
Read more >
Despite following the guide for setting up DS3/4 on Linux ...
Hi, I am using Arch and a using a Bluetooth dongle instead of official adapter with DS4, but it has been working out...
Read more >
Sony DualShock - Gentoo Wiki
This article describes the use of Sony DualShock 3 / Sixaxis, DualShock 4, and DualSense PlayStation controllers via USB and Bluetooth.
Read more >
Steam with PS4 controller - Batocera.Linux - Forum
I went to Steam Settings -> Controllers but Steam doesn't ... Valve HID devices over USB hidraw ... DualShock 4 Slim over USB...
Read more >
You will need to update your udev rules for the Steam Controller
DualShock 4 slim wired. SUBSYSTEM=="usb", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="09cc", MODE="0666" # Valve HID devices over USB hidraw
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found