How to fix an Ubuntu crash

by redshift

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.