Kernel related: Mouse clicking madness (All mice go to heaven)

Here you can post about your various experiences with PC hardware. You can also post about hardware that is not compatible with the linux kernel or not recommended for use with Porteus.
User avatar
M. Eerie
Moderator
Moderator
Posts: 620
Joined: 31 Aug 2017, 21:18
Distribution: Nemesis Xfce/MATE x64

Kernel related: Mouse clicking madness (All mice go to heaven)

Post#1 by M. Eerie » 06 Nov 2021, 10:30

Short history: If you are experiencing troubles with your mouse getting "jumpy" (bounceclicking) and double-triple clicks are fired with the press of the mouse button, then read on. You may end rescuing that USB peripheral that you blamed when suddenly became troublesome.

If not, and you are a registered user who received a PM from me with the subject "gnome-games", then this post should clarify things, plus it will help to understand why some (crazy) things happen.

Preface:
Years ago, I've faced a crazy issue when still using Wonblow$. By that time, I was building my own PC from components from here and there.

A hair got in the way between the motherboard RAM slot and the memory chip. This triggered a series of BSoD that appeared in whatever circumstances making it impossible to work. It corrupted opened files and was affecting all I/O operations (including storage devices)...
Today, that would be almost impossible for me to track. To start with, my eyesight is tired. Then data calculations from human intelligence, shows that at least 2 out of 3 of my hairs have gone #ffffff where they used to be #000000 (more or less).

Joking aside, let's get down to business.

A few days ago, I've downloaded the Archlinux ISO builded by neko
This one included the "Kernel version: 5.15 with AUFS patch "5.x-rcN-20211018" and I was expecting to help Jack with his wifi problems. So, I've downloaded, included in my Nemesis MATE to test it, and everything seems to be fine, but then...
A unexpected, yet familiar Klingon starship appeared out of nowhere.

I remember that this had happened to me before, but I had not seen it again for years, so, given that I spent 50€ on a mouse to be on the safe side, I blamed the USB port hub for my wired Logitech K120 keyboard and my G203 Logitech mouse.

In the middle of all this, I wanted to send the file to Jack and in the end I added all the registered users (trying to look for it in the wrong place, because I assumed there would be more than one Jack, but not all with the rank of contributor).
I clicked to remove the All_registered_users recipient, but in fact, it seems a double-triple or quadruple click got fired and I didn't noticed (by then it was midnight -stelar time- and I couldn't wait to go to bed). So, the PM was sent to every registered user and twice to Jack.

(Side note: I think this should be disabled by the admins to prevent things like this from happening.)

So, I was talking with Rava who asked me should it be a driver failure. I'm not familiar with kernels and I rely on the invaluable work of neko, so I started to test in other environments. Exchanged mouses and situation became almost restored (not fully though). Rava told me he had experienced such things and then he became to understand why. And I realized that I was not alone...

Then I explained the problem to nanZor who put me in the right path because he uses a Logitech K120 keyboard too... He remembered that such klingons issues have been with us for quite some time now, appearing every now and then:

As he stated:
The problem was that *some* keyboard and mouse manufacturers used a chip that got confused when the kernel put the usb ports into a low power-saving mode and wouldn't wake up properly and just started to connect / disconnect once triggered by that. Resulting in jerky response.

So the solution ended up being a kernel patch

And indeed I've searched for a solution and so it was how I added usbcore.autosuspend=-1 option to my APPEND kernel line at boot.

My `cat` showed a previous value was '2':

Code: Select all

$ cat /sys/module/usbcore/parameters/autosuspend
$ 2
And now is -1 (disabled). This can be done also by issuing:

Code: Select all

echo -1 > /sys/module/usbcore/parameters/autosuspend
Again, I want to apologize every member for the unintended PM sent and above all, to publicly thank nanZor for his help and his memory.

PS1= My mouse (aged 0.00000000033 parsecs only) got a new mission to boldly go where no mice has gone before.
PS2= I had to change my keyboard and plug a Dell one while typing this post because the Logitech K120 went off...



Now, I realize this has been between us for a while, those are related posts:
usb mouse and keyboard temporary freeze of laptop
Wireless mouse problems... [SOLVED]

https://unix.stackexchange.com/question ... 0-or-above

Note that this could also affect external HDD's. By the way, don't plug them into a TV unless they are SSD's / USB sticks.
https://forums.linuxmint.com/viewtopic. ... 0&t=325553
> Does not compute_ 🖖

https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=84002#p84002
https://forum.porteus.org/viewtopic.php?p=77174#p77174
https://forum.porteus.org/viewtopic.php?f=39&t=8584

User avatar
M. Eerie
Moderator
Moderator
Posts: 620
Joined: 31 Aug 2017, 21:18
Distribution: Nemesis Xfce/MATE x64

Kernel related: Mouse clicking madness (All mice go to heaven)

Post#2 by M. Eerie » 06 Nov 2021, 10:36

For the record, I've been asked to remove the file/link and I couldn't. I even tried to download it 100 times with a "for" loop, but obviously the web service used gives a "session id" to every download attempt, so it was impossible for me to do it.
> Does not compute_ 🖖

https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=84002#p84002
https://forum.porteus.org/viewtopic.php?p=77174#p77174
https://forum.porteus.org/viewtopic.php?f=39&t=8584

nanZor
Shogun
Shogun
Posts: 381
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.01 x86-64 LXQT

Kernel related: Mouse clicking madness (All mice go to heaven)

Post#3 by nanZor » 06 Nov 2021, 23:18

Nice writeup! This problem was elusive to me for many years, not only for Logitech, but any number of usb-connected drives and devices. And thank you for the reminder of the kernel parameter, which I had forgotten. Looks like the universe put us in touch with your mistake. :)

Code: Select all

usbcore.autosuspend=-1
Not just for specific models of Logitech, but for many other usb-driven devices as well. The problem was very hard to track down initially because one doesn't immediately suspect power savings. It seemed so random. And it can depend on the quality of the computer you are using too.

Other shotgun-advice to "just change keyboards" or "don't use usb-3 ports", or "use only usb-2 cabling" wasn't satisfactory since I take my Porteus show on the road, and don't take mice or keyboards with me. You don't know what will be available to you when you get there.

Although I'm not seemingly having that problem now with Porteus, unless error messages from the keyboard are just being sent 2>/dev/null. I first witnessed this in a Slitaz install.

Unless one dropped into a virtual terminal where the keyboard is basically spamming the output with endless connect/reconnect messages, or doing dmesg every few minutes, it may be hard to notice other than just jerky graphics. Which made one think maybe the video driver was bad - not so!

Thanks again for your reminder of what the kernel parameter is to stop that, since I had forgotten.
That's a UNIX book - cool. -Garth

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Kernel related: Mouse clicking madness (All mice go to heaven)

Post#4 by Ed_P » 07 Nov 2021, 00:29

nanZor wrote:
06 Nov 2021, 23:18
Nice writeup!
Indeed. Very nice M. Eerie. Thanks for posting it. :good:
Ed

Post Reply