Cursor freezes - keystrokes to release?
Solution 1
Just open the Terminal using Ctrl+Alt+T and type the following commands:
modprobe -r psmouse
for removing it
modprobe psmouse
for adding it
Solution 2
The first thing to try is to press Ctrl+Alt+F1. If the GUI is frozen but the keyboard driver is still responding, this will switch to a text console. You can log in to that text console and access your system and try to solve the problem. You can return to the GUI screen with Ctrl+Alt+F7 (some distributions may use a different number).
If that doesn't work, your computer may still be running, but with the console completely hosed. Then you can still access it over the network, provided you have an SSH server running. Log in from another computer (PC/tablet/phone/…) and try to solve the problem.
If you have no way to access your computer because the console is unavailable and you didn't have an SSH server, you can try killing the whole GUI session with the magic SysRq key Alt+SysRq+K: press and hold Alt, press and release SysRq, press and hold K, and finally release Alt. Depending on your distribution, this may or may not show a new GUI login prompt after a few seconds. If you don't, use Ctrl+Alt+F1 to switch to a text console, and Alt+SysRq+K to switch the keyboard to the text console mode. On a default Ubuntu installation, I think the command to restart the GUI login prompt is service gdm restart
.
If that doesn't work and you just want to reboot, you can use the magic sysrq keys E, U, B:
- Press Alt+SysRq+E to kill all processes but leave them the opportunity to do an emergency save.
- Wait a couple of seconds, then press Alt+SysRq+U to allow all file changes to be written to disk.
- Wait a couple of seconds, then press Alt+SysRq+B to reboot.
(Do not use or try to remember the popular “REISUB” sequence. The R and S do nothing in this sequence, and the I defeats the purpose of the previous E.)
As to what is causing the GUI freeze, the most common culprit is a buggy 3D video driver. 3D video drivers are very complex and video card makers don't provide good support, so the drivers tend to be buggy. Often, the 3D effects are provided by the Compiz program, and killing the compiz
process unfreezes the interface. To kill the Compiz process, once you have a command line access, run
pkill compiz
If you find that you often have freezes due to Compiz, switch to a different desktop environment that doesn't use Compiz. The Ubuntu default (Unity) requires Compiz, but most don't. Try KDE or LXDE (without enabling Compiz of course).
Solution 3
I was having the same problem (Ubuntu 20.04); I turned off animations (using TWEAKS) and now everything is fine.
Solution 4
Try with:
sudo su
echo 1 > /proc/sys/kernel/sysrq
Then press the keystroke Alt+PrtScr+K, this could kill your X session.
Solution 5
I was facing the same problem then i just turned off SWAP and now system is running fine.
Related videos on Youtube
Dot Ukay
Updated on September 18, 2022Comments
-
Dot Ukay almost 2 years
Occasionally the mouse cursor will freeze - I have to reboot.
In Ubuntu is there a keystroke combination such as Ctrl+Alt+Del which would enable me to continue working without having to reboot?
-
Dot Ukay about 9 yearsI tried this & it does work - in as much as it causes the computer to reboot. I was hoping for a way to unfreeze without rebooting.
-
Erman over 5 yearsThis key combination (Alt+SysRq+B) restart the computer.
-
Marco Roy about 5 yearsThanks for this! Turns out a single process (Archive Manager) had completely frozen the mouse. Killing it resolved the issue immediately! 👍
-
Jordan Arseno almost 5 yearsworked for me, thanks!
-
Vicrobot almost 5 yearsI don't know why but that console after ctrl+f1+alt, is not accepting even the correct password.
-
Gilles 'SO- stop being evil' almost 5 years@Vicrobot Maybe your console has a different keyboard layout. Check at the username prompt. The text console and the GUI use completely different keyboard layout mechanisms. Some distributions arrange to set the same default for both, but not all do.
-
dmSherazi almost 5 yearssolves my case where the mouse freezes after the system goes to sleep
-
kodmanyagha over 4 yearsnot worked for me. probably my problem is different.
-
Admin about 2 yearsWorked for me thank you! I needed
sudo
.