MiSTer-devel / MiSTer-devel/Linux-Kernel_MiSTer

DS4 controller fails to connect wired with message "failed to retrieve feature report 0x81 with the DualShock 4 MAC address"

Open
#64 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
21
Forks
36
Avg merge
6h 7m
Merged PRs (30d)
14

Description

The issue is not new and can be found on the internet.
I'm using MiSTer release_20250402.
It happens when you connect Sony DualShock 4 V2 using cable.
lsusb sees this controller Sony Corp. DualShock 4 [CUH-ZCT2x]

/root# lsusb

Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 006: ID 2357:011e TP-Link 802.11ac WLAN Adapter 
Bus 001 Device 005: ID 046d:c545 Logitech, Inc. USB Receiver
Bus 001 Device 004: ID 2357:0604 TP-Link TP-Link Bluetooth USB Adapter
Bus 001 Device 035: ID 054c:09cc Sony Corp. DualShock 4 [CUH-ZCT2x]
Bus 001 Device 002: ID 1a40:0201 Terminus Technology Inc. FE 2.1 7-port Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

but cannot initialize it.
dmesg -w output

/root# dmesg -w

[    7.300251] sony 0003:054C:09CC.0005: failed to retrieve feature report 0x81 with the DualShock 4 MAC address
[    7.315550] sony 0003:054C:09CC.0005: hidraw3: USB HID v81.11 Gamepad [Sony Interactive Entertainment Wireless Controller] on usb-ffb40000.usb-1.7/input3
[    7.315583] sony 0003:054C:09CC.0005: failed to claim input

Possible reasons:

  • issue with cable. Checked 5 different USBA - MicroUSB cables. The same result
  • checked if USB hub has enough power. I have 30w power supply unit.
  • checked controller. Most likely it is not original, but it works in MacOS and in Windows with microUSB cable without any issues. Checked on https://hardwaretester.com/gamepad webpage
  • checked kernel version. It is 5.15.1-MiSTer

Among possible reasons why controller is not connected using cable I found this one in this github https://github.com/Kyuunex/hid-sony-clone-fix-dkms repo:

hid-sony-clone-fix-dkms

A quick hack to the hid-sony driver for kernels 5.13 - 6.1, meant for the third party / clone DS4 controllers that do not support HID feature report 0x81.

Not needed since kernel 6.2

Since kernel 6.2, a new hid-playstation driver is included in the kernel which works with controllers that do not support HID feature report 0x81, and thus, this patch is no longer needed.
When you plug your controller in, it will make use of the new hid-playstation driver.

How to know if you need this patch

If you see the following in your kernel logs, this patch is meant to work around that.
failed to retrieve feature report 0x81 with the DualShock 4 MAC address

According to this description it is exactly this issue. Unfortunately it is applicable to ArchLinux.

the fix looks like one line change

Image

Is it possible to create similar patch for MiSTer?
Ready to help with testing if needed.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Linux kernel's hid-sony driver and compare its handling of the DualShock 4 feature report 0x81 with the referenced hid-playstation behavior. Reproduce the wired connection on MiSTer, inspect the dmesg output, and verify that the controller initializes without the MAC-address or input-claim errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.