How to fix an Ubuntu crash

Ok, this isn’t specifically related to Ubuntu, but I’m hoping it can help someone. Maybe you won’t have to spend a week cursing at your computer like I have.

Here’s a summary of the problem. I wanted to try Ubuntu to see what all the hype was about. I downloaded the latest LiveCD for 8.10 (Intrepid Ibex) and booted it up. Liking what I saw, I started the install process. From that point, until just before the install was completed, my computer would lock up hard. Every time.

It’s important to note that the same computer never crashes in Gentoo or even *gasp* Windows. Also, the “alternative mode” (text) installer works fine, and booting into Ubuntu recovery mode (single user) works fine as well.

If I just used the LiveCD without installing, sometimes it would be OK – but it would always lock up eventually. Usually this would happen when there was a high level of activity, but occasionally it would freeze when sitting idle as well.

At first, I thought it was caused by the hard drive I was installing to, because I’ve had some issues with it in the past. After unplugging every drive, and having the OS crash with the same frequency, that was quickly eliminated. This also eliminated problems with the drive controller.

Then I thought it had to be an incompatibility between Ubuntu and my motherboard chipset, which is an nVidia nForce 570 SLI. I tried all kinds of advice on disabling apic (noapic and nolapic kernel options) to no avail. I tried noacpi, but that disabled my keyboard and mouse and I don’t have any PS/2 ones lying around. I tried updating my BIOS to the latest version – no dice.

Then I thought it was an incompatibility with the video card, an nVidia GeForce 7950 GT. After all, it works in the alternative installer and recovery mode, so it has to be something graphical, right? Nope. I tried the “nv” and “vesa” drivers for Xorg with the same results. Any difference in time-to-crash was coincidental.

I tried to think of issues I’ve had in Windows in the past. Then, of course, it hit me. Whenever I tried to turn on AMD’s Cool’n’Quiet feature, the system became very unstable. I had to go through a lot of pain to remove that driver without crashing the system.

The equivalent software in Linux is powernowd, also known in Gnome (and, therefore, Ubuntu) as “CPU Frequency manager”, which takes advantage of the different CPU power-stepping features to slow down your processor when you don’t need it. This fits the pattern of crashing on high activity (when the CPU steps up) and occasionally at idle (when the CPU steps down after high activity).

The fix: Go to System -> Administration -> Services and uncheck the option for powernowd. This will permanently stop the daemon. You can also run “/etc/init.d/powernowd stop” on Ubuntu and several other distributions to stop the daemon temporarily. (Distributions vary as to how to permanently stop a daemon. In Gentoo, for example, you’d run “rc-update del powernowd default”.)

So, it seems that the chipset on many motherboards (mine is an Asus M2N-SLI Deluxe), or perhaps the processor (mine is an AMD Athlon 64 X2 5200+), is incompatible with power stepping. The same advice applies to Ubuntu 8.04 (Hardy Heron) and probably previous releases as well.

Comments

9 responses to “How to fix an Ubuntu crash”

  1. redshift Avatar

    This wiki page on ACPI is handy in learning about the ACPI boot options. That would have saved me a little time, even though it wasn’t the issue.

    Like

  2. Travis Avatar
    Travis

    Almost spent a week cursing at my computer until I found this page. Thank you, so much.

    Like

  3. Amir Avatar
    Amir

    My brand new ubuntu 8.10 fully updated. vmlinuz-2.6.27-9-generic is crashing badly. No error message, no logging no crash report nothing. I’ve just removed this service which is a CPU Frequency Manager, I hope this will solve my problem as well. So far so good. Thanks for this tip.
    Amir

    Like

  4. Morten K. Poulsen Avatar

    My computer is a Lenovo ThinkPad T61, and my stability issues with Ubuntu 8.10 with Linux 2.6.27 (crashes every ~5 minutes) were not resolved by disabling power management.

    The problem turned out to be caused by the iwlagn driver (for the Intel 4965 wireless chipset), and were fixed by installing linux-backports-modules-intrepid.

    Like

  5. redshift Avatar

    Thanks for the update! Maybe we can get a few more tips on here, since this seems to rate fairly high in the googles.

    Like

  6. Viao Avatar
    Viao

    i have a slightly different issue. i was running fine with ubuntu 9.x on a HP ML370G2 server, just finished getting apache, php, mysql and joomla installed and running, was going throught the setup process for installing hobbit (xymon) and i couldnt get users/groups to open. so i rebooted.

    and now, all i get is a spinning circle of death everytime i boot.

    any suggestions?

    V.

    Like

  7. Eliza-Nikole Avatar
    Eliza-Nikole

    I’ve been having this type of problem with my boyfriend’s eee pc 900!! God, i hope this works. I’ve spent about 4 weeks cursing at it… But, thanks! 😀

    Like

  8. Alexandre de Oliveira Avatar

    Look, my Ubuntu 9.04 crashes just like yours. However, I don’t have PowerNow daemon installed.

    I will install it via apt-get and see what happens.

    Like

  9. chakresh Avatar
    chakresh

    hi,
    it shall be highly generous if any one can help me out with my problem
    i have ubuntu 11.04 installed last night accidently switched off my system (hp dv4 3016tx) . since then whenever i reboot i get a black screen .. 😦 what to do?

    Like

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s