At random times, Ubuntu 10.04 freezes, and I have to do a hard shutdown. It was upgraded from 9.10 which didn't freeze. First, is this is common problem with a quick answer, and if not, what can I do to diagnose it? I've tried checking application/kernel logs, but nothing gives me a clue as to what caused the problem. My guess, is that since the OS froze, no logs could be updated.

Ideas?

SOLUTION:

Solved it.

My particular problem was my graphics card (integrated Radeon 9000 series). netconsole revealed I was getting the error: "reserve failed for wait". After trial-and-error, I manually configured my video card and disabled hardware acceleration. Completely fixed the issue.

Here is what I did:

Manually Created xorg.conf

Ubuntu automatically configures xorg.conf and doesn't use a file. To edit this file, you have to tell Ubuntu to explicitly create one and then edit it. Here are the steps:

  1. Restart system
  2. Hold Shift as GRUB boots
  3. Select root terminal in GRUB login menu
  4. Execute: X -config xorg.conf.new
  5. Copy: cp xorg.conf.new /etc/X11/xorg.conf

Disable Hardware Acceleration

The following is specific to my Radeon card, but I'm sure other cards have a similar setup.

  1. Edit xorg.conf
  2. Find "Device" section for graphics card
  3. Uncomment "NoAccel" option and set to "True"
  4. Save + reboot

Hope that helps.

link|improve this question
Sometimes the display can freeze but the underlying processes are still going, so checking the logs was (and always is) a good idea. Do you actually notice that the timestamps in the logs stop increasing when the system freezes? – David Zaslavsky Aug 15 '10 at 3:16
What sort of interval between freezes are we talking about? – Oli Aug 15 '10 at 9:18
The interval is typically a day or two. Some weeks I'm not able to spend much time on the computer, but if I were to aggregate it on continuous usage, I'd say every four hours. – j0rd4n Aug 15 '10 at 10:39
feedback

12 Answers

up vote 9 down vote accepted

To diagnose the freezes you should be able to use the net console (or serial serial console for that matter). Follow the set up instructions outlined here.

link|improve this answer
I'll give that a shot and post-back the results. – j0rd4n Aug 19 '10 at 22:12
This worked like a champ. Identified the problem as my graphics card: "radeon .... reserve failed for wait". Now I know what to look for. – j0rd4n Nov 28 '10 at 21:47
feedback

If you have to do a hard shutdown I'd be wondering if the memory (RAM) was failing. On your next boot, try running memtest86. To do this:

  • while booting, hold down a shift key
  • the GRUB menu will appear
  • use the cursor keys to select the last option "memtest86"
  • press enter

You'll get a basic display and it will try reading and writing lots of values to all of your RAM. As long as there are no failures, you'll see a green status. If there is any failure it will turn red. In that case you'll need to replace at least one stick of your RAM.

There is also community documentation of diagnosing hardware failures.

link|improve this answer
Good suggestion! I didn't know this was available. I tried it, but I passed all of the tests. – j0rd4n Aug 19 '10 at 22:14
feedback

The first thing to look at is if it is just X that's frozen, or the whole system. Enable ssh and then ssh into the system. If you can't ssh into it, then it's probably a kernel lock up. If you can ssh in, then it might be just a gpu lockup.

Next try restarting X.

service gdm restart

If that works, then it's perhaps an X bug. If it still doesn't work, then you may have a GPU lockup in the kernel drm driver. It would be useful to know at this point whether you're running the -ati (open source) driver, or -fglrx (closed source) driver.

link|improve this answer
Thanks! My desktop randomly freezes as well. Running 'service gdm restart' always brings it up. Most of the times the desktop seems to freeze when Firefox is running. Any ideas on how I can debug/fix this ? – suhridk Sep 28 '10 at 10:35
Well, generally when I find myself using the word 'random' in describing a bug, I take that as a clue that I need to do a bit more to better characterize the bug. E.g., how often does it happen, are there any things that seem more likely to trigger it than others, if any other symptoms occur in conjunction, etc. – Bryce Oct 1 '10 at 1:28
You should also consider your hardware and driver. Some drivers like -intel are more likely to have freeze bugs than other drivers like -ati. Hardware also can play a factor, such as if you put a high end ATI card into a box with a sketchy power supply. Bad RAM, buggy motherboards, overheating, power irregularities, etc. all can result in freezes. – Bryce Oct 1 '10 at 1:34
Looking through the other commenters on this page, you can see suggestions all over the map. Freezes are an unfortunately common end result of a whole variety of different kinds of problems. They can be software, hardware, or a combination of the two. This is why it is extremely important that the original reporter provide as detailed and thorough a report as possible. This is also why two people both experiencing similar freezes really have to be treated as completely separate bugs, unless their HW and SW are exactly the same. – Bryce Oct 1 '10 at 1:41
Freezes on different drivers are debugged in different ways. For instance, -intel has a set of debugging tools you can install that allow you to capture GPU dumps. See wiki.ubuntu.com/X/Troubleshooting/Freeze for details. – Bryce Oct 1 '10 at 1:42
feedback

You might get some extra information when you switch to the TTY view. Press Ctrl-Alt-F1 to get this, use Ctrl-Alt-F7 (or maybe F8) to get back to the GUI. You can have different sessions on most of the F-keys but that's different question altogether.

link|improve this answer
I tried that but the entire system is locked. Keyboard is completely unresponsive. – j0rd4n Aug 19 '10 at 22:13
feedback

Replace with the latest Linux kernel 2.6.35 or up that will solve your problem. Follow these steps from this link http://www.ramoonus.nl/2010/05/linux-kernel-2-6-34-installation-guide-for-ubuntu-linux-10-04/

link|improve this answer
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? – j0rd4n Jan 22 '11 at 11:45
Bummer. Looks like I already have it installed. uname -r reveals 2.6.35-24-generic – j0rd4n Jan 22 '11 at 11:48
feedback

I was having similar issues with 10.04. X would hang and and nothing but a reset would fix it. I updated my nvidia drivers to the latest version and I haven't had issues since.

link|improve this answer
Using ATI video drivers...but it might be worth looking into. Thanks! – j0rd4n Aug 19 '10 at 22:13
feedback

I've had this happen more frequently now with updated Ubuntu, though I think it happened occasionally before. From my research, it appears that the wireless driver causes this. I haven't replaced it with the alternate yet to see if it fixes it, but there seems to be chatter on the net that indicates that this is a cause. Do you have a wireless card or do you used an ethernet cable?

link|improve this answer
feedback

If you are using motherboard of intel 8xx then it may be due x bugs in lucid (10.04). There are some possible solutions for the bug. I did manage to fix mine with "Workaround B: Switch to -vesa".

link|improve this answer
feedback

Might be worth selecting the memory test at the boot menu, to see if your issue is with a bad stick of memory. I've had weird issues like lockups, that were because of a bad stick of RAM.

link|improve this answer
feedback

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.

link|improve this answer
feedback

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

Of course if your living in a cooler clime you can disregard (unless of course your running your heat high?)

link|improve this answer
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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