37

I sometimes experience whole Ubuntu freezes (from 14.04 to 16.04, I upgrade by a clean installation), just mouse can move (that's why this question is different from others). I think this is caused by one of the cores stop working when 100% load by unresponsive Desktop Environment. There isn't any magic key combination like Ctrl+Alt+Del or Ctrl+Shift+Esc known from Windows. The only thing I could do is hold power button for 5-10 seconds and hard shut down. Is there any other recommended solution?

Could I e.g. with some keyword combination reset CPU or kill all additional services or reset Unity or force soft reboot or I don't know what else could help?

muru
  • 197,895
  • 55
  • 485
  • 740
aleskva
  • 1,647
  • 3
  • 13
  • 22
  • 2
    Can you access another tty? Ctrl + Alt + F1 (changing F1 to F1-F6 to access the terminal that you want) –  Jun 06 '16 at 13:20
  • @bc2946088 I'll try next time – aleskva Jun 06 '16 at 13:23
  • @Parto I ask about killing unresponsive OS (or Desktop Environment), not application – aleskva Jun 06 '16 at 13:25
  • 1
    I don't think it's a duplicate, atleast of that link @Parto. They're talking about individual applications within Unity they want to stop. Not when Unity itself goes unresponsive. –  Jun 06 '16 at 13:25
  • @aleskva Cool. Misunderstood, close vote withdrawn. – Parto Jun 06 '16 at 13:27
  • But if you'll find any duplicate about my question, I'll appreciate your suggestion – aleskva Jun 06 '16 at 13:28
  • This question is about a situation when mouse moves, but anything else does not respond. I'm trying to find the most "soft" solution. In the similar question you mentioned there are just answers for hard reboots and so. But maybe it is possibly a duplicate, maybe the moving mouse is the same like complete freeze (with mouse). Could you explain, why is this possibly a duplicate? – aleskva Jun 06 '16 at 18:55
  • I think reading the answers at that link, explains why this is probably a likely duplicate. Especially that excellent community wiki answer. – gravity Jun 06 '16 at 19:21
  • Just adds a link to other answer, which is here too – aleskva Jun 06 '16 at 21:38
  • 1
    The reason this is a duplicate is because the mouse moving is a red herring. It just means you have hardware cursor support, which means mouse movement bypasses the OS entirely. – rich remer Jun 07 '16 at 04:34
  • Does anyone know the cause of this freezing? On my Ubuntu 16.04 laptops this started happening about two months ago, after a system update. Seems to only happen when Youtube is running in Chrome. – Ryan Budney Apr 20 '18 at 19:34
  • It usually does when your RAM usage is rapidly increased to high percentage values like 90+ % (Flash Player is really memory-consuming and prone to increase RAM usage really quickly). In these cases Ubuntu can not release memory or move memory from RAM to SWAP as fast as needed and RAM is approaching 99 %, which leads to partially freeze computer/OS/DE. When RAM usage increases really really fast, and Ubuntu is totally not managing to release/move to SWAP data in RAM, RAM usage can exceed 99 % to 100 %, which leads the whole computer to fully freeze – aleskva May 12 '18 at 11:56
  • Maybe you could try to reinstall Chrome and Flash Player (if not included in Chrome - I'm not sure I don't use Chrome anymore) and before watching YouTube videos try to close unneeded windows/kill unnecessary processes in behind. You could also revise startup processes or apps and maybe look live to gnome-system-monitor – aleskva May 12 '18 at 12:02
  • It might sound crazy, but when you have such situation - just try right-click anywhere. In my case that helps! I dunno why this happens and why right-click works, but at least it works! – Alexander Gorg Nov 18 '20 at 10:03

2 Answers2

35

Well there is a magic key combination (to reboot):

While holding Alt and the SysReq (Print Screen) keys, type REISUB

For more details visit this answer : https://askubuntu.com/a/36717/497359

Severus Tux
  • 9,866
  • 3
    ConflictBoy solution is preferrable if it works. Also I believe it's possible to disable kernel's "magic keys", in which case this wont work. – Bakuriu Jun 06 '16 at 17:05
  • @Bakuriu Yes, I just posted this answer as the Op was asking "magic key combination" similar to ctrl+alt+del in his question, ConflitBoy solution is preferable indeed. – Severus Tux Jun 06 '16 at 17:09
  • 1
    @Bakuriu: Ubuntu disables many of the magic sysrq key combos by default (like Memory, Processes, and other info dumps). At least Umount, Sync, and reBoot are left enabled in a default install, though. (I use them in that order when things are totally locked and I can't get in with ssh or a text console. remount-ro implies any necessary syncing, and then sync after the filesystems are already read-only makes sure that nothing can be dirtied between then and reBoot.) If you've had bad USB hardware, then it's easy to form a mental association between computer crapping out and typing USB :P – Peter Cordes Jun 08 '16 at 07:53
  • I have got those separate, so SysReq or Print Screen? And I can use them only with fn key pressed, will this work too? – aleskva Jun 22 '16 at 02:07
  • okay, I googled out it is SysReq and it will work with fn too – aleskva Jun 22 '16 at 02:08
  • This combination does not allow one to selectively kill processes in order to try to get things to unfreeze again right? – Kvothe Aug 13 '20 at 19:54
29

Switch to the console: CTRL + ALT + F1

After login, you can see which processes are running using this command:

ps -ef

If you see a process which has high CPU usage, you can kill it.

sudo kill <pid>

Of course, you can simply restart the PC too:

sudo reboot
muru
  • 197,895
  • 55
  • 485
  • 740