Git Product home page Git Product logo

fix-linux-mouse's People

Contributors

sriemer avatar whot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fix-linux-mouse's Issues

Old: Collecting further PixArt mice with disconnect issues - Primax, Dell MS111?

It looks like that there are PixArt mice with Primax vendor ID (0x0461) disconnecting every 30 or 60 seconds as well.


Case 1: At https://narkive.com/XTZc8YG5.17, a guy named Jim Beard found this howto and activated gpm for product ID 0x4d0f. He claims this is an HP mouse. Without verification that kernel boot option usbhid.quirks=0x0461:0x4d0f:0x00000400 works, I can't submit a kernel patch. But the thread suddenly stopped afterward.

Yeah, this howto is useful! That guy also didn't know that 0x00000400 is HID_QUIRK_ALWAYS_POLL. That bug in the howto is fixed by now.

Second reference: https://www.linuxquestions.org/questions/linux-newbie-8/understand-how-linux-deals-with-devices-4175468331/


Case 2: At https://community.nxp.com/thread/316910 the guy claims to have a Dell MS111 mouse which turns out to be a PixArt with the Primax idVendor and idProduct 0x4e22. I also need verification here that HID_QUIRK_ALWAYS_POLL fixes this.

Possible second reference: https://forums.opensuse.org/showthread.php/511915-OpenSUSE-12-1-crashed-and-cannot-boot-cannot-identify-boot-disk
The disconnect is around 60s away from first connect.

Who can verify that boot option usbhid.quirks=0x0461:0x4e22:0x00000400 works?

Touchbar doesn't work if an external USB HID device is connected.

I have been facing a strange bug with the touchbar found on Apple Macs. If there are external USB HID devices connected to the Mac during boot, it fails to work. Else, it works well. Also, after boot if I plug in an external USB HID device, then the touchbar isn't affected. Can you help me in this issue.

Need backreference to usbhid driver from the disconnect issue

From the GitHub traffic graph I know that this howto has been referenced from:
http://linet.gr.jp/~kojima/PlamoWeb/ML/htdocs/201808/msg00019.html

They only looked at the mouse disconnect issue and not at the usbhid kernel driver explanation. So they didn't know that 0x00000400 is HID_QUIRK_ALWAYS_POLL. So that one should be mentioned there as well and a backreference to the usbhid explanation should be added.

But it is interesting that there is also a PixArt OEM mouse from Microsoft.

Old Feb 2019: Collecting further mice with disconnect issues

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!

Taking apart Dell MS116t PixArt mouse

I used that device a lot. Dell were able to set their own USB IDs and the device has 1000 CPI.
So which PixArt Imaging IC is inside?

It is the PAW3515DB-VJZA.

Datasheet: https://cdn.datasheetspdf.com/pdf-down/P/A/W/PAW3515DB-PixArt.pdf

In contrast to the PAN3511, the USB mouse controller part has no detailed description any more. But the USB IDs are programmable in this one for sure.
Update: The link points now to the full datasheet.

There are two screws at the bottom back beneath the rubber slider. Then you have to lift the top casing and push it above the cable towards you simultaneously to get it out of the plastic latches in the front.

GNOME: Disabling the touchpad when mouse is connected

I have cats which jump on my laptop. When the docking station is connected, then the touchpad should be disabled. I found the following article:
https://www.ostechnix.com/automatically-disable-touchpad-when-external-mouse-is-connected-in-ubuntu/

I've just issued the following command once:

gsettings set org.gnome.desktop.peripherals.touchpad send-events disabled-on-external-mouse

This is rather something for a fix-linux-touchpad repo. But adding it here so that I can remember in case I want to start developing a further howto for touchpads.

Ubuntu seems to be prone to mouse disconnects on display server as well?

Maybe it is only the Mir display server. But I've noticed that Ubuntu has issues with aperiodic mouse disconnects if there is a PixArt IC with faulty Logitech FW and HID_QUIRK_ALWAYS_POLL is not set in the hid_quirks.

Lite-On PixArt mouse on Ubuntu Xenial:
https://askubuntu.com/questions/792335/kernel-install-issue-new-usb-device-found-product-usb-optical-mouse-repeating

HP X1200 on Ubuntu Xenial (4.4 kernel):
https://forum.ubuntu-it.org/viewtopic.php?p=4945248

HP X500 on Ubuntu Bionic (4.18 kernel):
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1832041

It looks like the Mir mouse driver does not poll the mouse frequently enough.

Who can confirm? TIA

Work on generic usbhid quirks

I've started working on generic usbhid quirks. The idea is to use the available usbhid.quirks module option with modified parameters.

Available options should be:

  • vendor ID quirk mask for certain bus and device type (USB mouse, 0x093a is PixArt)
  • manufacturer quirk mask for certain bus and device type (USB mouse)
  • quirk mask for all devices of certain bus and device type (USB mouse)

Examples:
usbhid.quirks=usb_mouse_vendor:0x093a:0x00000400
usbhid.quirks=usb_mouse_manufacturer:PixArt:0x00000400
usbhid.quirks=usb_mouse:0x00000400

The manufacturer quirk mask is required most due to PixArt ICs all around but it requires text compare which might be an issue for performance. Optimization idea: Compare as number hashes.
The last option should be easiest for users who just want their standard mouse to work properly with HID_QUIRK_ALWAYS_POLL no matter which model is connected as manufacturer "Logitech" also contains PixArt chips with integrated faulty Logitech mouse controller FW since some time.

Fix the same mouse disconnect/reconnect issues on FreeBSD?

I've seen in the traffic graph of this repository that there was traffic from twitter. So I searched for it and found the tweet https://twitter.com/vmisev/status/1502246729344823303.

Vladimir Mišev asks how to do the same mouse disconnect/reconnect fixes on FreeBSD. I see from the picture in his tweet that the driver there is ums. So I looked at the latest FreeBSD kernel source of the ums driver:
https://cgit.freebsd.org/src/tree/sys/dev/usb/input/ums.c?id=5c6935a645604b1e39b2cf6dbc23f66ec58f3e54#n1055
https://cgit.freebsd.org/src/tree/sys/dev/usb/input/ums.c?id=5c6935a645604b1e39b2cf6dbc23f66ec58f3e54#n817

FreeBSD has no USB HID quirks. What it has, is an ioctl MOUSE_SETMODE which can set the mouse polling interval in Hz sc->sc_pollrate or mode.rate. The maximum there is 1000. The default is -1 (no polling). A good value should be 1 for one poll per second.

The commands for this should be

killall moused
moused -p /dev/ums0 -t auto -F 1

Can someone verify please?

PR achievement: This howto is getting linked by Phoronix and others

fix-linux-mouse-traffic

With finally fixing the Microsoft PixArt mouse this howto made it to bigger press attention on Phoronix in this article. I've also only seen that mouse in the GitHub traffic graph. Plamo Linux users from Japan said that my howto helped them to fix that mouse with usbhid.quirks. That was what I needed to create the upstream patch.

Thanks everyone for promoting this howto and helping me to get better search engine ranking than forum and blog posts which don't provide structured correct solutions. They neither allow easy discussion, nor amending the article.

To thank you I'm sharing the current traffic graph. 🎉

Linux mouse issues after suspend due to usbcore quirks?

It seems like usbcore quirks for AMD chipsets which involve PixArt mice can cause trouble that the mouse does not work properly after resume from suspend any more. There is a RESET_RESUME quirk set for the default PixArt mouse USB IDs 093a:2510. I guess booting with usbcore.quirks=093a:2510:b fixes this issue. It toggles the RESET_RESUME quirk flag.

For doing proper documentation, I need confirmation. TIA

Reference:
https://ubuntu-mate.community/t/mouse-is-dead-a-second-time-around/19844

USB core quirk in kernel code:
https://elixir.bootlin.com/linux/v5.3-rc6/source/drivers/usb/core/quirks.c#L465

USB core quirks definition:
https://elixir.bootlin.com/linux/v5.3-rc6/source/include/linux/usb/quirks.h#L9

Kernel parameter documentation:
https://elixir.bootlin.com/linux/v5.3-rc6/source/Documentation/admin-guide/kernel-parameters.txt#L4884

This issue seems to be very rare for now.

TODO: test Wayland

With Wayland there is an alternative to the X Window System.
So Wayland should be tested as well.

TODO: Document PS/2 i8042 driver + quirks

Usually, the touchpads in laptops require i8042 quirks. But i8042 quirks are much less frequently required than for USB devices.

The quirks are located in drivers/input/serio/i8042-x86ia64io.h and the kernel boot parameters for the i8042 driver used as quirks are located in Documentation/admin-guide/kernel-parameters.txt. One of i8042.nomux=1, i8042.noloop=1 and i8042.reset=1 is usually required if the touchpad is not working properly.

Logitech mouse not working after boot in X11, extracting and reinserting it works

Hi,
I have a Logitech Mouse with this description:
Bus 002 Device 005: ID 046d:c00f Logitech, Inc. MouseMan Traveler/Mobile
After boot, it doesn't work in X11, it is "frozen" but can be temporarily unblocked clicking on right button and definitely unblocked extracting and reinserting USB.
No errors in dmesg and X11.log.
I tried all fixes I was able to find on your and other pages.

Any other idea?

Thanks in advance

TODO: Add section regarding SLES11 in a QEMU/KVM VM

For SLES11 VMs the virtual USB tablet cannot be used in virt-manager. The mouse pointer within the VM is located far away from where it should be. The virtual USB tablet has to be kicked out and the virtual USB mouse has to be added instead. Then it works like charm.

Taking apart Dell MS111-P PixArt mouse

The Dell MS111-P is pretty similar to the MS116t shown in #16. Opening it is similar besides that there is only a single screw.

And it even contains the same PixArt chip PAW3515DB-VJZA.

Taking apart Dell MS111-L Logitech/PixArt mouse

Although it hurts me to take apart a completely unused mouse, somebody has to do it!

This mouse has a really strange mouse wheel. So better put the spring back into the correct location before closing the device. My detail picture shows you how it has to look like.

I knew it, in this Dell mouse identifying with Logitech idVendor there is also a PixArt chip.
USB IDs: USB_DEVICE_ID_LOGITECH_C077 (046d:c077)
PixArt IC: PAW3526DB-FJY2

Must be a secret collaboration between PixArt and Logitech. There is no datasheet for this one. That indicates more and more that there is Logitech firmware in the PixArt chips with the buffer overflow bug.

Collecting further mice and other HID devices with disconnect issues 2024+

I've fixed several USB HID devices at upstream Linux kernel with HID_QUIRK_ALWAYS_POLL (0x00000400) already.

So please let me know if your mouse or USB HID device disconnects every x seconds or every minute when no user-space driver is running and nothing polls it this way (usually mice 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 or device model, your kernel version, and which distro you use.

I will check if it has been fixed at the latest upstream kernel already and prepare the kernel patch if needed.

Thanks in advance!

2019..2023 Collecting further mice with disconnect issues

I've fixed several 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!

Taking apart Trust 15862 PixArt mouse

I checked my old Trust 15862 mouse: Identifies as PixArt Imaging mouse (093a:2510). HID_QUIRK_ALWAYS_POLL is set for it since longer time. The clicking sound is too loud. So I don't use it. Seems to be a good chance to take it apart and check the PixArt chip inside.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.