USB Sony DualShock controller not detected in Retropie
-
Trying to connect the USB controller but it is not detected
dmesg
[ 99.518212] usb 1-1.4: USB disconnect, device number 23
[ 100.174685] usb 1-1.4: new full-speed USB device number 24 using dwc_otg
[ 100.411203] usb 1-1.4: New USB device found, idVendor=054c, idProduct=09cc, bcdDevice= 1.00
[ 100.411232] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 100.411246] usb 1-1.4: Product: Wireless Controller
[ 100.411259] usb 1-1.4: Manufacturer: Sony Interactive Entertainment
[ 100.487351] sony 0003:054C:09CC.0015: failed to retrieve feature report 0x81 with the DualShock 4 MAC address
[ 100.487888] sony 0003:054C:09CC.0015: hidraw2: USB HID v81.11 Gamepad [Sony Interactive Entertainment Wireless Controller] on usb-3f980000.usb-1.4/input3
[ 100.487909] sony 0003:054C:09CC.0015: failed to claim input -
Please add the rest of the info requested in https://retropie.org.uk/forum/topic/3/read-this-first to your post.
Is this a genuine Dualshock 4 controller or a clone ?
-
Pi Model or other hardware: pi 2 w
Power Supply used: USB-C Power Supply, 5.V 2.5A,
RetroPie Version Used: 4.8.9
Built From: retropie-buster-4.8-rpi2_3_zero2w (1).img.gz
USB Devices connected: Sony Dualshock 4 controller, Keyboard
Controller used: Sony Dualshock 4
Error messages received: no gamepad detectedResults of lsusb
Bus 001 Device 029: ID 054c:09cc Sony Corp. DualShock 4 [CUH-ZCT2x]
Bus 001 Device 003: ID 03f0:3f4a HP, Inc
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubI think it is a clone CUH-ZCT2x
I also read this post https://retropie.org.uk/forum/topic/27359/ps4-controller-not-detected-in-retropie-4-6-on-pi-4b/5 , but I was lost in the path for that fix :(
-
@misuok this seems an issue with the clone and not quite a RetroPie/Linux problem. The forum topic you pointed has a potential fix, but it's a 3rd party patch which you have to install manually.
Which part of the installation is not clear ? -
@mitu I understand , I wish it would have been different and not waste my time or your time.
these were the commands
git clone https://github.com/soreau/hid-sony
cd hid-sony
wget -O hid-sony.c https://raw.githubusercontent.com/raspberrypi/linux/rpi-5.10.y/drivers/hid/hid-sony.c
*save the patch from https://bbs.archlinux.org/viewtopic.php?pid=2010615#p2010615 to apatch.diff
file in thehid-sony
folder
*then run the patch
patch < patch.diff
make && sudo make installCan you tell me what part to copy from https://bbs.archlinux.org/viewtopic.php? topid=2010615#p2010615 ? to patch.diff
-
Can u tell me the exact steps again ?
What the other user did exactly to fix it ? and did not work from the start (after he ran the same commands) -
@misuok said in USB Sony DualShock controller not detected in Retropie:
Can you tell me what part to copy from https://bbs.archlinux.org/viewtopic.php? topid=2010615#p2010615 ? to patch.diff
That's a different patch. You should follow the steps outlined in https://github.com/soreau/hid-sony:
git clone https://github.com/soreau/hid-sony
cd hid-sony
make
sudo make installfollowed by a reboot of the system.
-
@mitu
I encountered some errorspi@retropie:~ $ git clone https://github.com/soreau/hid-sony
Cloning into 'hid-sony'...
remote: Enumerating objects: 11, done.
remote: Counting objects: 100% (3/3), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 11 (delta 0), reused 2 (delta 0), pack-reused 8 (from 1)
Unpacking objects: 100% (11/11), done.
pi@retropie:~ $ cd hid-sony
pi@retropie:~/hid-sony $ make
make -C /lib/modules/5.10.103-v7+/build M=/home/pi/hid-sony modules
make[1]: Entering directory '/usr/src/linux-headers-5.10.103-v7+'
CC [M] /home/pi/hid-sony/hid-sony.o
MODPOST /home/pi/hid-sony/Module.symvers
CC [M] /home/pi/hid-sony/hid-sony.mod.o
LD [M] /home/pi/hid-sony/hid-sony.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.10.103-v7+'
zstd hid-sony.ko
make: zstd: Command not found
make: *** [Makefile:5: all] Error 127
pi@retropie:~/hid-sony $ sudo make install
cp hid-sony.ko hid-sony.ko.zst /lib/modules/5.10.103-v7+/kernel/drivers/hid/
cp: cannot stat 'hid-sony.ko.zst': No such file or directory
make: *** [Makefile:12: install] Error 1 -
@misuok said in USB Sony DualShock controller not detected in Retropie:
pi@retropie:~/hid-sony $ sudo make install
cp hid-sony.ko hid-sony.ko.zst /lib/modules/5.10.103-v7+/kernel/drivers/hid/
cp: cannot stat 'hid-sony.ko.zst': No such file or directoryYou can ignore the
.zst
file and copy just the.ko
file, as in https://retropie.org.uk/forum/topic/27359/ps4-controller-not-detected-in-retropie-4-6-on-pi-4b/38:sudo cp ./hid-sony.ko /lib/modules/$(uname -r)/updates/dkms/
-
@mitu i installed zstd and reload the process , this time with no errors ,
After reboot , i plugged back controller but still not detectedpi@retropie:~/hid-sony $ sudo apt install zstd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
zstd
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 273 kB of archives.
After this operation, 1,250 kB of additional disk space will be used.
Get:1 http://mirrors.pidginhost.com/raspbian/raspbian buster/main armhf zstd armhf 1.3.8+dfsg-3+rpi1+deb10u2 [273 kB]
Fetched 273 kB in 6s (45.6 kB/s)
Selecting previously unselected package zstd.
(Reading database ... 126118 files and directories currently installed.)
Preparing to unpack .../zstd_1.3.8+dfsg-3+rpi1+deb10u2_armhf.deb ...
Unpacking zstd (1.3.8+dfsg-3+rpi1+deb10u2) ...
Setting up zstd (1.3.8+dfsg-3+rpi1+deb10u2) ...
Processing triggers for man-db (2.8.5-2+deb10u1) ...
pi@retropie:~/hid-sony $ cd ..
pi@retropie:~ $ sudo rm -r hid-sony
pi@retropie:~ $ git clone https://github.com/soreau/hid-sony
Cloning into 'hid-sony'...
remote: Enumerating objects: 11, done.
remote: Counting objects: 100% (3/3), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 11 (delta 0), reused 2 (delta 0), pack-reused 8 (from 1)
Unpacking objects: 100% (11/11), done.
pi@retropie:~ $ cd hid-sony
pi@retropie:~/hid-sony $ make
make -C /lib/modules/5.10.103-v7+/build M=/home/pi/hid-sony modules
make[1]: Entering directory '/usr/src/linux-headers-5.10.103-v7+'
CC [M] /home/pi/hid-sony/hid-sony.o
MODPOST /home/pi/hid-sony/Module.symvers
CC [M] /home/pi/hid-sony/hid-sony.mod.o
LD [M] /home/pi/hid-sony/hid-sony.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.10.103-v7+'
zstd hid-sony.ko
hid-sony.ko : 43.22% ( 40176 => 17363 bytes, hid-sony.ko.zst)
pi@retropie:~/hid-sony $ sudo make install
cp hid-sony.ko hid-sony.ko.zst /lib/modules/5.10.103-v7+/kernel/drivers/hid/
pi@retropie:~/hid-sony $ sudo reload
sudo: reload: command not found
pi@retropie:~/hid-sony $ sudo rebootunplug
pi@retropie:~ $ sudo dmesg -c > /dev/null
plug
pi@retropie:~ $ dmesg
[ 360.651487] usb 1-1.4: new full-speed USB device number 59 using dwc_otg
[ 360.889450] usb 1-1.4: New USB device found, idVendor=054c, idProduct=09cc, bcdDevice= 1.00
[ 360.889484] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 360.889499] usb 1-1.4: Product: Wireless Controller
[ 360.889514] usb 1-1.4: Manufacturer: Sony Interactive Entertainment
[ 360.968579] sony 0003:054C:09CC.003A: failed to retrieve feature report 0x81 with the DualShock 4 MAC address
[ 360.969075] sony 0003:054C:09CC.003A: hidraw57: USB HID v81.11 Gamepad [Sony Interactive Entertainment Wireless Controller] on usb-3f980000.usb-1.4/input3
[ 360.969093] sony 0003:054C:09CC.003A: failed to claim input -
if i try with the command you mentioned "sudo cp ./hid-sony.ko /lib/modules/$(uname -r)/updates/dkms" i get the last message
pi@retropie:~ $ sudo rm -r hid-sony
pi@retropie:~ $ git clone https://github.com/soreau/hid-sony
Cloning into 'hid-sony'...
remote: Enumerating objects: 11, done.
remote: Counting objects: 100% (3/3), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 11 (delta 0), reused 2 (delta 0), pack-reused 8 (from 1)
Unpacking objects: 100% (11/11), done.
pi@retropie:~ $ cd hid-sony
pi@retropie:~/hid-sony $ make
make -C /lib/modules/5.10.103-v7+/build M=/home/pi/hid-sony modules
make[1]: Entering directory '/usr/src/linux-headers-5.10.103-v7+'
CC [M] /home/pi/hid-sony/hid-sony.o
MODPOST /home/pi/hid-sony/Module.symvers
CC [M] /home/pi/hid-sony/hid-sony.mod.o
LD [M] /home/pi/hid-sony/hid-sony.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.10.103-v7+'
zstd hid-sony.ko
hid-sony.ko : 43.22% ( 40176 => 17363 bytes, hid-sony.ko.zst)
pi@retropie:~/hid-sony $ sudo make install
cp hid-sony.ko hid-sony.ko.zst /lib/modules/5.10.103-v7+/kernel/drivers/hid/
pi@retropie:~/hid-sony $ sudo cp ./hid-sony.ko /lib/modules/$(uname -r)/updates/dkms/
cp: cannot create regular file '/lib/modules/5.10.103-v7+/updates/dkms/': Not a directory -
Create the desination folder manually and then copy the file.
-
@mitu created the folder and copied the file
pi@retropie:/lib/modules/5.10.103-v7+/updates/dkms $ ls
hid-sony.kopi@retropie:/lib/modules/5.10.103-v7+/updates/dkms $ sudo modinfo hid_sony
filename: /lib/modules/5.10.103-v7+/kernel/drivers/hid/hid-sony.korestarted
but still controller not recognized
too bad..
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.