sriemer / fix-linux-mouse

Hints how to fix USB mouse issues on Linux
44 stars 5 forks source link

Old Feb 2019: Collecting further mice with disconnect issues #15

Closed sriemer closed 5 years ago

sriemer commented 5 years ago

I've fixed four mice at upstream Linux kernel with HID_QUIRK_ALWAYS_POLL (0x00000400) already.

So please let me know if your mouse disconnects every x seconds or every minute when no user-space driver is running and nothing polls the mouse this way (usually on a virtual terminal [VT] without gpm running).

Please test if the kernel boot option

usbhid.quirks=0xaaaa:0xbbbb:0x00000400

fixes the issue while aaaa is the USB vendor ID and bbbb is the USB product ID in hex from lsusb or lsusb -vvv output.

If this fixes your issue, please let me know the USB IDs, your mouse model, which distro you use and if you need it for kernel < 4.16.

Thanks in advance!

sriemer commented 5 years ago

A further possible candidate is the Acer Lite-On SM-9020B with 1000 CPI. Seems to be a PixArt mouse as well with USB IDs 04ca:0061.

Reference: https://askubuntu.com/questions/792335/kernel-install-issue-new-usb-device-found-product-usb-optical-mouse-repeating

Second reference: http://www.at91.com/viewtopic.php?t=26401

Third reference complaining about reconnects: http://mail.rtai.org/pipermail/rtai/2016-October/027376.html

Fourth reference: https://e2e.ti.com/support/processors/f/791/p/679577/2509335#

As usual: I need confirmation that kernel boot option usbhid.quirks=0x04ca:0x0061:0x00000400 helps to prepare the upstream patch.

sriemer commented 5 years ago

Another possible candidate (Chicony PixArt mouse): https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=920957 USB IDs 04f2:0939. Second reference: https://bugs.centos.org/file_download.php?file_id=24595&type=bug

Patch sent to upstream by Oleksandr Natalenko (RedHat): https://lore.kernel.org/lkml/20190621091736.14503-1-oleksandr@redhat.com/T/#u

sriemer commented 5 years ago

Lenovo PixArt mouse 17ef:602e: https://lists.debian.org/debian-user/2017/08/msg00418.html Second ref: https://www.centos.org/forums/viewtopic.php?t=63379

sriemer commented 5 years ago

Jesis J1 PixArt mouse 1a81:2804: https://bugs.freedesktop.org/show_bug.cgi?id=107785 Uncertain about this one. No second ref, too rare, no disconnect visible.

sriemer commented 5 years ago

Another Lenovo PixArt mouse 17ef:6019: https://forums.fogproject.org/assets/uploads/files/1534429606509-bzimage41713m.log Second reference: https://www.linuxquestions.org/questions/showthread.php?p=5404600 Third reference: https://www.linuxquestions.org/questions/red-hat-31/sshd-hangs-rsyslog-related-4175550947-print/

dschepler commented 5 years ago

My mouse disconnected almost exactly every 60 seconds. USB ID 0461:4d65 Strings simply say "PixArt USB Optical Mouse'. It has Alienware branding (and came with my Alienware machine from c. Feb 2019.)

Confirmed that booting with usbhid.quirks=0x0461:0x4d65:0x00000400 resolved the issue for me.

sriemer commented 5 years ago

Thanks for the report. I will send the upstream patch. Which distro are you using so that a backport of the patch can be requested afterward?

dschepler commented 5 years ago

Actually, no distro - I'm building my own system (roughly based on Linux From Scratch at the initial stages, but with some departures even then). So once it makes it into upstream kernel, I'll probably build the updated kernel version soon afterward, and that will be that. (Though I did go back to the Debian unstable system that I used for the initial installation to bootstrap from, and I saw the same behavior there also.)

sriemer commented 5 years ago

@dschepler Patch sent to HID maintainers, linux-input, and stable mailing lists. Check the archives for it: https://www.spinics.net/lists/linux-input/ Will appear there soon. Subject: [PATCH] HID: Add another Primax PIXART OEM mouse quirk https://www.spinics.net/lists/linux-input/msg62163.html Patch applied upstream.

jonathan-teh commented 5 years ago

HP X1200 USB Optical Mouse (lsusb confirms manufacturer as PixArt) disconnects every 60 seconds with kernel 5.1.16-200 on Fedora 29. The kernel boot option usbhid.quirks=0x03f0:0x0641:0x00000400 fixes it.

sriemer commented 5 years ago

Thanks for the report @jonathan-teh. I’ll send the upstream patch. For >= v4.16 the patch applies in stable kernels without much modification. And then the distros pick up the stable kernels pretty much automatically.

sriemer commented 5 years ago

Second reference for HP X1200: https://forum.ubuntu-it.org/viewtopic.php?p=4945248 My howto didn‘t exist in that time. Disconnect visible. Will inform the Ubuntu stable guys as well.

sriemer commented 5 years ago

@jonathan-teh Patch sent to HID maintainers, linux-input, and stable mailing lists. Check the archives for it: https://www.spinics.net/lists/linux-input/ Will appear there soon. Subject: [PATCH] HID: Add quirk for HP X1200 PIXART OEM mouse https://www.spinics.net/lists/linux-input/msg62441.html

sriemer commented 5 years ago

The HP X1200 patch is applied by Jiri Kosina now. Phew, no need to resend. Stable commits will follow where it applies automatically (>= 4.16). I sent backports for 4.4, 4.9, and 4.14.

viinikv commented 5 years ago

I have yet another disconnecting mouse, "PixArt HP X500 USB Optical Mouse", usb id 03f0:0941, disconnects every 62 seconds without Xorg running. Says HP PN: E5E76AA, Manufactured March 2016 on the mouse itself. Booting with usbhid.quirks=0x03f0:0x0941:0x00000400 fixes the problem.

sriemer commented 5 years ago

Thanks for the report, @viinikv. I’ll send the upstream patch. Do you need it for kernel < 4.16?

viinikv commented 5 years ago

Nope.

sriemer commented 5 years ago

Patch sent to linux-input mailing list and for stable v4.16+. This time I haven't linked this issue in the patch but only this howto so that we'll see no patch references here. The ones for the HP X1200 were too many.

sriemer commented 5 years ago

@viinikv Alright, Benjamin applied the patch. The stable branches will follow soon. https://www.spinics.net/lists/linux-input/msg63199.html

sriemer commented 5 years ago

This issue is too long already. Thanks again for all the reports. I'm closing this issue now with a good feeling. The mission continues in #22. :smiley:

I hope that I was able to avoid some electronic scrap here. Homebrew development is pretty honest. I don't give a fuck about HW vendors, distributions, or money here. End users are what I care for. Information should be free, a community effort, and with SEO easily available. If companies don't help, we just help each other.

For SEO I need others to link and/or star this howto as well as to contribute in any way like e.g. device reports and comments. This is the best payment for my efforts.

It is not in my hands that Logitech will ever fix their firmware or the linux-input maintainers will ever decide to implement generic usbhid quirks like e.g. described in #20.

sriemer commented 5 years ago

The HP X500 patch made it to the tree of Linus and is queued for 5.3, 5.2, and 4.19 stable. Upstrean commit: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2acf40f0454d41b8d51c95d317283c20c931164d

sriemer commented 5 years ago

Ubuntu bug for the HP X500: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1832041