Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

I have Ubuntu 11.04 installed, and all the updates.

My computer freezes if I just start Ubuntu and wait a while, whether or not I have a program running. It is completely dead. I cannot access a virtual terminal with ctrl + alt + f2 or f3.

Environment:

  • I have set Power manager to "never suspend"
  • I have disabled the screensaver.

Regression:

  • I have tried the proprietary drivers for ATI HD6310 GPU, and also tried with them disabled.
  • I have tried using Unity and also classic Ubuntu (no special effects).

Apart from waiting until the software catches up with the hardware, is there anything else that I can do to stop my computer freezing under Ubuntu?

share|improve this question
    
what are the computer specs? Do other distros freeze? Does it freeze if you run from a liveCD (any distro)? Is this a new development or is it something that started happening recently? –  gregnotcraig Oct 8 '11 at 3:47
add comment

marked as duplicate by Braiam, Jorge Castro, karel, Avinash Raj, Eric Carvalho Mar 11 at 9:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers

You may have bad memory or some other bad hardware. Boot your machine then select memtest86 from the grub menu. Let all the tests run to completion; this will take quite a long time even on a fast box.

Memory tests test other hardware than just your ram. Also tested are your CPU, memory controller and motherboard. Excessive electrical interference inside your case could cause your freeze and might be detected by memtest86.

Your hard drive manufacturer will have a free download for a drive diagnostic utility in the form of a boot floppy or cd image. Boot off it then run all the nondestructive tests. If you have a convenient way to back up your whole drive, try the destructive tests as well, then restore from your backup.

Run lspci and lspci -n then search the Linux Kernel Bugzilla as well as Google for bugs related to your PCI devices. Do the same for your motherboard and BIOS revision.

If you are experiencing a known kernel or driver bug the best you may be able to do is ask in the kernel Bugzilla if a fix is available yet.

If all your hardware checks out OK and it's not a known bug, file a new bug report with Ubuntu as well as the kernel Bugzilla. Include the output of uname -a,lspci, lspci -n, your motherboard model and revision - that will be printed on the motherboard -- and your BIOS vendor and revision.

share|improve this answer
add comment

Have a look at:

$ dmesg | less

If there is some problem with your hardware, or a bug in a driver, the kernel, or a module is loaded with the wrong parameters, you'll see a complaint in dmesg.

It might be the X11 server hanging and not the kernel. If that's the case, while the console will freeze the operating system will still be running just fine. You would then be able to log in over the network from SSH. This will work even if you are using wireless; run ifconfig in a terminal before the freeze to find out your IP address.

If it is a kernel hang, it would help a bit to diagnose it to check whether or not it answers pings. Sometimes crashed kernels do answer pings, which indicates that it's still handling interrupts and not totally dead. Knowing the answer to this won't fix your hang but could help isolate the cause of it.

You might have a bad build of some of your software. If that's the case most likely it would be a bad driver module that was not adequately tested after it was built by Ubuntu's release team. It could also be a bad build of an individual kernel or X11 server source file.

Bad builds that cause freezes or crashes are usually caused by code generation bugs in GCC. Code generation bugs are fairly rare but I have seen them happen. They can also occur more frequently due to incorrect build settings in Makefiles, or erroneous configure scripts that then generate bad build settings.

If you are a coder, try compiling a debug build of the kernel from source. Do a "make menuconfig" first (or the Ubuntu/Debian way of doing that for building .deb packages, whatever that may be), then enabling some of the kernel debugging options such as the Magig SysRq Key and kernel debugger.

Boot off that kernel, then if you still get the hang use the SysRq key to get into the debugger and do a stack trace. Post the stack trace here, and, if you think it really is a kernel bug, attach the stack trace to a kernel bugzilla and Ubuntu bug report.

If you aren't a coder, see if you can find someone who is to help you do that. Just about anyone who develops software on Ubuntu could build a custom kernel for you.

share|improve this answer
add comment

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