Opened 7 weeks ago

Last modified 6 weeks ago

#15051 new bug

USB Mouse not working on hrev53104

Reported by: MelanieFox Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Drivers/Input/USB-HID Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: x86-64

Description

I have a 5 Button USB Gaming Mouse. 1ea7:1006 /dev/bus/usb/0/5 "SHARKOON Technologies GmbH" "" ver. 0104

The device is unreponsive. Mouse Pointer is not moving neither does any of the buttons trigger some reaction.

According to listusb -v the Device has to Interfaces in one configuration. One Interface is reporting as Mouse and the other one as keyboard.

When i disconnect the USB Gaming Mouse the Keyboard also stops working. All three leds on the Keyboard than flash every few seconds. (seems like reinit...)

Attaching listusb and -v output, also syslog.

Attachments (8)

syslog.txt (441.6 KB) - added by MelanieFox 7 weeks ago.
usb_device_list.txt (733 bytes) - added by MelanieFox 7 weeks ago.
usb_device_list_long.txt (20.2 KB) - added by MelanieFox 7 weeks ago.
decus_report_hex (597 bytes) - added by MelanieFox 6 weeks ago.
rdesc seen by Haiku
decus_report_hex_linux (597 bytes) - added by MelanieFox 6 weeks ago.
rdesc seen by linux
decus_report_decoded_linux (5.2 KB) - added by MelanieFox 6 weeks ago.
QuirkyDevices.cpp (5.2 KB) - added by MelanieFox 6 weeks ago.
HIDDevice.cpp (9.2 KB) - added by MelanieFox 6 weeks ago.
hack in line 189

Download all attachments as: .zip

Change History (14)

Changed 7 weeks ago by MelanieFox

Attachment: syslog.txt added

Changed 7 weeks ago by MelanieFox

Attachment: usb_device_list.txt added

Changed 7 weeks ago by MelanieFox

Attachment: usb_device_list_long.txt added

comment:1 Changed 7 weeks ago by waddlesplash

It appears this mouse has a broken report descriptor: https://github.com/torvalds/linux/blob/master/drivers/hid/hid-holtek-mouse.c

We may need to add a patching facility to our USBHID driver.

comment:2 Changed 7 weeks ago by mmlr

We already have facilities for device specific init and creating custom report descriptors. See https://git.haiku-os.org/haiku/tree/src/add-ons/kernel/drivers/input/usb_hid/QuirkyDevices.cpp

comment:3 Changed 7 weeks ago by MelanieFox

What i found out so far:

My Mouse is handled by hid-generic under linux

The Report Descriptor seen by Haiku differs from the one linux reports.

I've tried to code a quirk by reporting the linux one.

Hasn't fixed the issue but looked much better than before.

Oddly the xhci driver reports a TRB not found.

Seems like the device is stuck and doesn't generates any events at all.

What i will try next is the kernel go panic when that not found TRB message occurs, with usb trave and usb hid trace enabled.

Will attach some files with the report descriptors from haiku and linux (hexed) tomorrow.

Changed 6 weeks ago by MelanieFox

Attachment: decus_report_hex added

rdesc seen by Haiku

Changed 6 weeks ago by MelanieFox

Attachment: decus_report_hex_linux added

rdesc seen by linux

Changed 6 weeks ago by MelanieFox

Attachment: decus_report_decoded_linux added

comment:4 Changed 6 weeks ago by MelanieFox

I've found a way to finally get her running. My solution involves a patched rdesc and a dirty little hack in HIDDevice.cpp (don't know how to solve this otherwise :/ )

Attaching modified sources...

Changed 6 weeks ago by MelanieFox

Attachment: QuirkyDevices.cpp added

Changed 6 weeks ago by MelanieFox

Attachment: HIDDevice.cpp added

hack in line 189

comment:5 Changed 6 weeks ago by diver

Could you please attach a patch wiki:CodingGuidelines/SubmittingPatches#Submittingyourcommits instead of modified sources here. Thanks!

comment:6 Changed 6 weeks ago by pulkomandy

Changes submitted on Gerrit: https://review.haiku-os.org/c/haiku/+/1437

Note: See TracTickets for help on using tickets.