751

All operating systems freeze sometimes, and Ubuntu is no exception. What should I do to regain control when...

  • just one program stops responding?
  • nothing at all responds to mouse clicks or key presses?
  • the mouse stops moving entirely?
  • I have an Intel Bay Trail CPU?

In what order should I try various solutions before deciding to pull the power plug?

What should I do when starting up Ubuntu fails? Is there a diagnostic procedure I can follow?

4

47 Answers 47

1
2
3

Replace with the latest Linux kernel 2.6.35 or up that will solve your problem. Follow these steps from this link.

2
  • Ah! I'll give it a shot. The guide posted is for 2.6.34 but you said I needed to install 2.6.35. Which one should I do? Jan 22, 2011 at 11:45
  • Bummer. Looks like I already have it installed. uname -r reveals 2.6.35-24-generic Jan 22, 2011 at 11:48
1

I have found that the culprit in my case was plain and simple overheating. I live in a warmer climate and if I am not running airconditioning my laptop starts locking up. Pointing a fan directly at it resolved the problem.

1

One of the solutions I found that stopped my computer from freezing was to stop the cpu scheduler setting itself to ondemand. This is found in the /etc/init.d/ondemand script.

I just renamed the file.

sudo mv /etc/init.d/ondemand /etc/init.d/ondemand.bk

This breaks all the symbolic links to ondemand. So it won't start up at boot time. This will put some error messages into your log.

A better way is to use update-rc.d. I was lasy and have not tried these commands.

sudo update-rc.d -f ondemand remove  

Or:

sudo update-rc.d ondemand stop 2 3 4 5 S

To start it again:

sudo update-rc.d ondemand Start 2 3 4 5 S  

Although starting it again caused my computer to free again. So I left it disabled.

2
  • And how do I get it back afterward with the "better way"?
    – RobinJ
    Aug 17, 2011 at 5:45
  • @Robinj I did not start it again as it kept causing my computer to freeze. But you could use the update-rc.d command to update the links again.
    – nelaaro
    Aug 17, 2011 at 6:26
1
  1. Press Ctrl+alt+t to get the terminal, then find the hanging process (ps -ef | grep ) then kill it using pid found (kill -9 )

  2. Press Ctrl+alt+F2 (in some cases fn key also to be pressed) to enter single user mode. Login and restart lightdm/kdm service

sudo service start lightdm.

  1. Graceful reset press alt+print screen+r+e+i+s+u+b

  2. If still issue, then power off button is last resort :)

0

I had a custom built PC keep freezing on me. I put the temperature sensors in the gnome panel and was able to see if the CPU, HDD, Motherboard (basically any system temp) were getting hot at the time of the lock.

Your ATI card might be running hot and you need increased airflow.

0

If you are using motherboard of intel 8xx, then I would strongly recommend to migrate to Ubuntu 10.10 Maverick Meerkat, I think they have solved the Xorg related bugs.

I had faced the same problems but once I installed Ubuntu 10.10 Maverick Meerkat, I have never faced any Xfreeze issue.

0

Before you try the next key combination, please remember that Ctrl+Alt+F7 brings you back. Remember? Really? OK, then: If the Ubuntu GUI doesn't show up or freezes just use Ctrl+Alt+F1 to switch to a terminal.

You should have pressed Ctrl+Alt+F7 to see this message again.

It is the easiest solution, but not permanent, after that your Ubuntu can continue to freeze, but you can repeat this process every time, when Ubuntu freezes. :)

1
  • It's not really a solution to the problem: more of a workaround...
    – Fabby
    Dec 30, 2014 at 3:17
0

For those who:

  • have screen freezes but applications are still working
  • and you can do Ctrl + Alt + F1
  • and you have no other option but to restart (service lightdm restart doesn't work)
  • and you have too many applications open and don't want to lose your session

Maybe you can:

  • go do the Ctrl + Alt + F1
  • run pm-suspend (will suspend the machine)
  • start the machine; you should get the machine back to the state before the screen freezes (at least for me it did)

I've tried all solutions suggested above, but none of them work or part of it worked but I was still forced to restart the machine and lose all running applications. This is not the best solution but at least I don't lose the applications I need when working.

0

I have a simple fix for random freezes happening under Ubuntu 12.04 (kernel 3.5.0-41) on HP DV7, just use unity_2d :

sudo vi /etc/lightdm/lightdm.conf

Replace user-session=ubuntu with user-session=ubuntu-2d

sudo reboot

More info on http://cleanstructions.blogspot.fr/2013/10/fix-random-freezes-ubuntu-1204.html

Memtest passed many times and it just happened from one day to the other, possibly after an upgrade. I just couldn't investigate the kernel panic, the whole system was locked and logs (when available) were not displaying anything relevant to me.

Has anyone has an idea about what is wrong with my graphics card for not supporting open GL anymore?

0

In my case compiz causes the freezing; I can move mouse cursor, but mouse clicks do nothing. The keyboard works, so, my recipe is restarting compiz

  1. Press Ctrl + Alt + F1

  2. Run this command:

    killall -9 compiz
    
  3. Press Ctrl + Alt + F7

0

First of all use the top command in the terminal to see the PID of the unresponsive program Top Function in Terminal Then kill -9 "pid" without the quotes.

If the nothing at all responds to your click and key strokes or your mouse stops working then press Ctrl+Alt+F1 and restart the display manager by running:

sudo service lightdm start     # Ubuntu 12.04/14.04  

or

sudo systemctl start graphical.target     # Ubuntu 16.04 and later

If it fails, don't worry. Pressing Ctrl+Alt+F7 will bring you back to your desktop environment.

0

Installing the wrong graphics driver was the root of the problem for me.

Using nouveau, stopped the freezing, but it was slow.

I realized by using nvidia-detect that the graphics driver I should install was nvidia-304 for Geforce GT 8500.

1
  • Please could you restructure your answer to be more informative. Dec 30, 2016 at 10:10
0

After suffering with this for over a year I worked around the problem by using Xfce as the desktop environment. I simply installed it using APT: sudo apt-get install xfce4

I have a 2009 PC with in-built graphics and it intermittently had problems every time graphics settings were adjusted (whether via Ubuntu's auto updates or not I'm not sure).

I suppose I could have given Unity 2D a try but Xfce works.

0

I have Ubuntu 12.04 LTS installed on Lenovo Thinkpad core i5, it kept on freezing completely and I had to manually restart it by power cycle. I solved it by updating my Ubuntu kernel to latest version. It might fix your problem too. Here are the instructions to do that:

1- Go here: http://kernel.ubuntu.com/~kernel-ppa/mainline/ Download 3 (maybe 4) debs to a folder somewhere:

  • linux-headers-VERSION-NUMBER_all.deb

  • linux-headers-VERSION-NUMBER_amd64.deb

  • linux-image-VERSION-NUMBER_amd64.deb

  • linux-image-extra-VERSION-NUMBER_amd64.deb # if available

2- Install the debs with whatever package manager front-end you use (for example, Gdebi), or use these commands:

cd /path/to/folder/where/you/put/the/debs
sudo dpkg -i *.deb

Source: How to update kernel to the latest mainline version without any Distro-upgrade?

0

On my laptop when it freezes, I'm able to do control + alt + fn + f7, then control + alt + fn+ f2. This gets to the shell, then I login with my username and password. To go back to the desktop I do chvt 8 this gets me back to my current desktop. To find out the active tty's type w then chvt to the current one.

That way you can resume your work without rebooting or losing anything.

0

I just needed to power-cycle the machine after installing the candidate kernels from https://wiki.ubuntu.com/SecurityTeam/KnowledgeBase/SpectreAndMeltdown. No hardware problems here but beware of such side effects when running on non-stable kernels.

0

If you are able to switch between applications, and not able to use them (for example, unable to change tabs in a browser or scroll) Ubuntu 18.04 LTS, just click the log out button and press Cancel instead of logging out. This will restore the original unfrozen state.

1
2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .