You are not logged in.

#1 2020-08-30 15:28:56

Salkay
Member
Registered: 2014-05-22
Posts: 462

Laggy, sticky mouse input

A bit of a long shot, but anyone else notice a laggy mouse cursor in the last few days?

Everything is fine when using a mouse normally. However, if I don't touch the mouse for a few seconds, and then move it, it "sticks" in the stationary position for 0.5–1 second, then moves after that. The hand movement seems to have been "stored", so it might be a graphic artefact instead of an input problem.

I've checked both /var/log/Xorg.0.log and journalctl, but nothing appears when the lag occurs. I do see the following in /var/log/Xorg.0.log, but it's there from half an hour ago, and doesn't appear when I see this problem specifically.

[ 38377.568] (EE) event20 - MOSART Semi. 2.4G Wireless Mouse: client bug: event processing lagging behind by 18ms, your system is too slow
[ 38798.532] (EE) event20 - MOSART Semi. 2.4G Wireless Mouse: client bug: event processing lagging behind by 26ms, your system is too slow
[ 39191.241] (EE) event20 - MOSART Semi. 2.4G Wireless Mouse: client bug: event processing lagging behind by 28ms, your system is too slow
[ 39195.378] (EE) event20 - MOSART Semi. 2.4G Wireless Mouse: client bug: event processing lagging behind by 29ms, your system is too slow

FWIW I'm using KDE and Nvidia, all of which (along with the kernel) had updates in the last few days. I can see this issue in both linux and linux-lts kernels. Everything is up-to-date.

Last edited by Salkay (2020-09-08 09:24:43)

Offline

#2 2020-08-30 15:44:37

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 10,455

Re: Laggy, sticky mouse input

Sounds like USB autosuspend kicking in on the dongle, try disabling that: https://wiki.archlinux.org/index.php/Po … utosuspend

Offline

#3 2020-08-30 15:48:02

Salkay
Member
Registered: 2014-05-22
Posts: 462

Re: Laggy, sticky mouse input

Thanks V1del. I'll give that a try and report back in a few days. The problem appears to be intermittent and seems to be much better now (after a suspend-resume cycle), so I might not be able to replicate it immediately.

EDIT: actually that wiki page is a bit confusing to me. If there is no explicit udev rule, is autosuspend on or off?

Last edited by Salkay (2020-08-30 15:49:29)

Offline

#4 2020-08-30 15:57:21

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 10,455

Re: Laggy, sticky mouse input

It should be on by default if it isn't handled by anything else (... e.g. TLP or laptop-mode tools or so)

Offline

#5 2020-09-08 01:20:26

Salkay
Member
Registered: 2014-05-22
Posts: 462

Re: Laggy, sticky mouse input

Just a bit of an update on this.

I had a read of the kernel documentation linked by that wiki page. It looks like USB autosuspend was already disabled for the troublesome mouse (as per /sys/bus/usb/devices/*/power/control), but it was enabled for the USB hub (0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub).

I created /etc/udev/rules.d/50-usb_power_save.rules with the following content

ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control", ATTR{power/control}="on"

restarted the system, and this disabled the USB hub. I haven't noticed the stickiness any more, so I'll tentatively mark this as solved. It's a bit hard to definitively know this, because the stickiness was intermittent.

Thanks again for the assistance V1del.

Offline

#6 2020-09-08 09:26:04

Salkay
Member
Registered: 2014-05-22
Posts: 462

Re: Laggy, sticky mouse input

And in a timely fashion, I'm still getting the jerkiness. It might be happening more after I resume from suspend, but it's hard to know. In this particular case, it only lasted about a minute before going away. FWIW it's a wireless mouse with a USB dongle.

Offline

#7 2020-09-09 03:16:50

Z2h-A6n
Member
Registered: 2014-08-06
Posts: 7

Re: Laggy, sticky mouse input

This may be a bit silly, but these sound similar to the symptoms a low battery in the wireless mice I've used. The fact that the stickiness is intermittent makes this seem a bit less likely to me, but I think it doesn't rule it out.

Offline

#8 2020-09-09 03:24:39

Salkay
Member
Registered: 2014-05-22
Posts: 462

Re: Laggy, sticky mouse input

@Z2h-A6n No, definitely a good question, but yes, I did check the batteries already.

Offline

#9 2020-09-09 05:58:57

seth
Member
Registered: 2012-09-03
Posts: 16,213

Re: Laggy, sticky mouse input

Looks like https://bbs.archlinux.org/viewtopic.php?id=186844 ("solved" by replacing the mouse)
The mouse (meaning the remote device) probably goes into power saving mode and re-pairs with its dongle on interaction and that pairing seems too slow.

If you click it, that will probably be delayed as well, but the moment the click takes action you can normally move the mouse?

Offline

#10 2020-09-09 13:07:39

Salkay
Member
Registered: 2014-05-22
Posts: 462

Re: Laggy, sticky mouse input

@seth yes I guess that's plausible, but I'm suppose there's no way to tell for sure if it's a software or hardware problem.

I've had the mouse for a few years, and it's only exhibited this behaviour now, so I don't think it goes into power-saving mode by design.

It's plausible however that this is a new problem with the mouse. It's intermittent, and rare, which doesn't necessarily mean it's not a hardware issue, but it's certainly unclear!

Having said that, if the initial mouse movement is "saved" and occurs a split second later, doesn't that suggest it's a software issue? If it's (hardware) auto-sleeping, then presumably that original movement would be lost. I would have thought if the mouse were power-saving and incapable of transmitting the signal, it would also be incapable of capturing the movement. Also, when I experience the problem, I trigger it quickly, i.e. every few seconds, so presumably power-saving wouldn't kick in that rapidly.

I haven't tried clicking to test yet.

Last edited by Salkay (2020-09-09 13:10:55)

Offline

#11 2020-09-09 13:51:20

seth
Member
Registered: 2012-09-03
Posts: 16,213

Re: Laggy, sticky mouse input

The theory is that the nouse wakes up (because it registers the motion - it cannot no track motion during PS, just not wifi around) and starts pairing with it's dongle. The motion is cached until the pairing is complete and then unrolled.

Afaiu it's the same model and shows the same symptoms across 6 years - so if there's a bug, it must have survived all that time.
If the behavior is new to you, you should cross-test w/ the LTS kernel to see whether it's indeed a regression.

Offline

#12 2020-09-09 13:52:57

Ropid
Member
Registered: 2015-03-09
Posts: 882

Re: Laggy, sticky mouse input

Maybe this problem is caused by swapping? I remember seeing something like what you describe, and I think that was caused by stuff having been swapped out. What's the memory usage when the problem happens? Do you see swap being in use in the output of "free -h"?

Last edited by Ropid (2020-09-09 13:54:09)

Offline

#13 2020-09-09 23:02:41

Salkay
Member
Registered: 2014-05-22
Posts: 462

Re: Laggy, sticky mouse input

seth wrote:

The theory is that the nouse wakes up (because it registers the motion - it cannot no track motion during PS, just not wifi around) and starts pairing with it's dongle. The motion is cached until the pairing is complete and then unrolled.

Ah okay, that makes sense.

seth wrote:

Afaiu it's the same model and shows the same symptoms across 6 years - so if there's a bug, it must have survived all that time.
If the behavior is new to you, you should cross-test w/ the LTS kernel to see whether it's indeed a regression.

Yes, I actually did try with the LTS kernel (as per my original post). Unfortunately it made no difference. There were a few recent (at the time) updates to KDE and Nvidia, so it might also be a regression there, but I didn't test those. (I find it very fiddly to revert those packages.)


Ropid wrote:

Maybe this problem is caused by swapping? I remember seeing something like what you describe, and I think that was caused by stuff having been swapped out. What's the memory usage when the problem happens? Do you see swap being in use in the output of "free -h"?

Thanks for the suggestion, but I don't use swap on this system. I have 32 GB RAM, and it's never close to being full, apart from the occasional memory leak from Firefox, KDE Plasma, Handbrake, etc.!

Offline

#14 2020-09-10 06:23:51

seth
Member
Registered: 2012-09-03
Posts: 16,213

Re: Laggy, sticky mouse input

xorg-server and xorg-input-* packages might be inolved, but I don't see how KDE or the nvidia blob can interere here.
You could install and try https://wiki.archlinux.org/index.php/Ge … pose_mouse to see whether it also happens on the console (and if so, rule out the GUI packages as culprit)

Offline

#15 2020-09-10 06:52:18

Salkay
Member
Registered: 2014-05-22
Posts: 462

Re: Laggy, sticky mouse input

Thanks @seth. It's a bit hard to troubleshoot in that fashion, because it's so intermittent. I also feel like it's becoming less frequent since my original post, occurring once every few days. Hence, even if the issue were still present on the console, it's likely that I'd have to wait a few days before I'd notice it. I'll keep it in mind if it becomes extremely frequent though.

Offline

#16 2020-09-16 09:11:41

Flapper
Member
Registered: 2019-02-10
Posts: 18

Re: Laggy, sticky mouse input

I'm getting the same sort of messages in Xorg.0.log, but I'm using USB keyboard and mouse.
I don't notice any mouse lag, but when the screenlocker has been active, the keyboard doesn't respond, until I click the mouse in another window then back.

[127259.117] (EE) event2  - Logitech USB Optical Mouse: client bug: event processing lagging behind by 17ms, your system is too slow
[135572.419] (EE) event3  - Logitech USB Keyboard: client bug: event processing lagging behind by 23ms, your system is too slow
[135766.312] (EE) event3  - Logitech USB Keyboard: client bug: event processing lagging behind by 23ms, your system is too slow
[135810.023] (EE) event3  - Logitech USB Keyboard: client bug: event processing lagging behind by 34ms, your system is too slow

Offline

#17 2020-09-16 09:22:45

Salkay
Member
Registered: 2014-05-22
Posts: 462

Re: Laggy, sticky mouse input

Flapper wrote:

I'm getting the same sort of messages in Xorg.0.log, but I'm using USB keyboard and mouse.

I suspect that these messages are unrelated, because I get them even when the mouse is behaving properly.

Flapper wrote:

I don't notice any mouse lag, but when the screenlocker has been active, the keyboard doesn't respond, until I click the mouse in another window then back.

Hmmm, that sounds pretty weird, but quite different to what I'm getting.

Offline

Board footer

Powered by FluxBB