Sometimes, randomly (as far as I can tell) I can't click anything (can still move the pointer). I have to restart the computer to have it running again. Same thing is happening on 2 computers, one is Xubuntu, another is Lubuntu. One is 18.04, another is 20.04. But it also happened on plain Ubuntu as well. What's going on? It gets really annoying. One mouse is Logitech, another one is from Microsoft. Both are wireless. Btw, important note, the mousepad stops responding to clicks as well during that time. Thanks a lot.
edit: usually happens after I login after logging out / suspending the computer.
I get this issue on systems that use the onboard graphics. Typically an application, often Chrome when moving the window, will get stuck and the window manager stops responding. When this happens,
CTRL-ALT-F1
and runtop
, and the window manager and the application will both be pegging the CPU. Often I can just kill the application that is causing this issue, thenCTRL-ALT-F7
back over to the UI and the mouse works again. If it takes a long time toCTRL-ALT-F1
it's usually a good indicator your CPU is maxed.To the excellent comments from my colleagues, can you check what is the status of your memory?.
The reason is that you can expect random processes to be killed if memory is starving, but also I've seen core parts of the system going mad (or stressed) under heavy swap to disk.
I don't think is a hardware problem, as you can move the mouse, I think the x manager gets a lock and doesn't accept more commands, but we need to get some information to see clearly.
Can you also check the logs to see if the Kernel has killed any process or you have something hang?.
Also check dmesg, is a good place to see problems with the USB devices and the swap:
Do you see anything extrange in:
Do you use NFS or iSCSI or ZFS? Certain timeouts on network sharings are locking. Also certain hard drive errors, which I doubt as it is happening in two different computers.
When this happens can you go to the terminal with CTRL + ALT + F1 , F2 F3 F4 F5 or F6?.
Have you observed if this happens after the screen is auto locked?. The energy saving sometimes is troublesome. Is your USB receiver connected to the computer or to an external monitor with USB? (energy saving).
Cheers
I've had a similar problem with a single computer. What fixed it was putting the USB dongle on an extension USB cord (~3 ft.) so that dongle (1) is away from the computer, and (2) has relatively clear path of transmission to the mouse.
I am guessing that the computer generates electrical noise that can interfere with the signal. Also, before moving it, there was a thick wooden table top between the dongle and the mouse. Haven't had any problems since.
I also wonder whether, if both your computers are running at the same, there could be further interference. However, better dongle placement could help with that too.
Many people have had this problem and reloading the mouse drivers is a common solution.
From this answer I posted awhile back:
This bug is reported in launchpad: Elantech touchpad stops working after suspend. After suspend the OP tries
# modprobe -r psmouse
and# modprobe psmouse
and it doesn't work. But what if psmouse was removed before suspend and inserted after suspend?If this works manually then you can automate by creating a new file in the
/lib/systemd/system-sleep/
directory containing:It is known after a suspend the psmouse module can't be removed. We also know it can be removed and inserted before a suspend. So this technique removes it before suspend. After resume insert it and hopefully the kernel won't reject it.
The
sleep 2
command is from my own problems where systemd and kernel (via gnome or APM) were both sleeping and waking up. I needed to redirect pulseaudio sound back to the TV due to a bug introduced in Ubuntu 16.04/pulseaudio 8.0. The 2 second delay was necessary for kernel and systemd to finish waking up. Still haven't figured out the dual suspend and dual resume yet....