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?


Just open the Terminal using Ctrl+Alt+T and type the following commands:

modprobe -r psmouse for removing it

modprobe psmouse for adding it

| improve this answer | |
  • 1
    worked for me, thanks! – Jordan Arseno Jul 24 '19 at 17:57
  • 2
    solves my case where the mouse freezes after the system goes to sleep – dmSherazi Aug 5 '19 at 15:35
  • not worked for me. probably my problem is different. – kodmanyagha Feb 20 at 8:54
  • What exactly is your case? – champion-runner Feb 22 at 18:55

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:

  1. Press Alt+SysRq+E to kill all processes but leave them the opportunity to do an emergency save.
  2. Wait a couple of seconds, then press Alt+SysRq+U to allow all file changes to be written to disk.
  3. 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).

| improve this answer | |
  • 1
    This key combination (Alt+SysRq+B) restart the computer. – Erman Mar 19 '19 at 16:46
  • Thanks for this! Turns out a single process (Archive Manager) had completely frozen the mouse. Killing it resolved the issue immediately! 👍 – Marco Roy May 29 '19 at 21:23
  • I don't know why but that console after ctrl+f1+alt, is not accepting even the correct password. – Vicrobot Jul 30 '19 at 12:34
  • 1
    @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. – Gilles 'SO- stop being evil' Jul 30 '19 at 14:51

Try with:

sudo su

echo 1 > /proc/sys/kernel/sysrq

Then press the keystroke Alt+PrtScr+K, this could kill your X session.

| improve this answer | |
  • I 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. – Dot Ukay May 2 '15 at 14:38

If you can still reach a console or terminal, maybe you could try this solution. Otherwise I believe sebelk's solution is probably a good start. If killing the X server is not sufficient and you can't reboot properly the machine, then in the same idea as sebelk, you could at least try to raise elephants to reboot more properly.

| improve this answer | |

I was facing the same problem then i just turned off SWAP and now system is running fine.

| improve this answer | |

I was having the same problem (Ubuntu 20.04); I turned off animations (using TWEAKS) and now everything is fine.

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.