The Technosopher

Practical computer tips, with a smattering of digital philosophy

Ubuntu freezing, locking up, or having odd power management issues? Update!

Posted by technosopher on November 2, 2009

Following a roughly year-long struggle to ferret out and fix a variety of periodic glitches (kernel panics; acpi features going haywire after six suspends; etc.) in my Ubuntu installation on my Toshiba laptop, I’m happy to report that I seem to have finally banished the last of the gremlins for good.  My approach to fixing these various issues, refined and tested extensively over the course of the past year, can be summed up in a single word: updating.

Time and time again, I’ve been amazed at how much a simple update to a single system driver has improved my overall quality-of-computing.  Updating my iwl3945 wireless networking driver from linuxwireless.org caused my periodic problems with random kernel panics to all but vanish; later, updating it again fixed some odd power problems with my antenna.  Repeatedly applying the latest graphics drivers from the official x-updates and xorg-edgers repositories first fixed my dual-monitor setup, then fixed the destruction of the graphics stack performance issues that accompanied the official 9.04 release.  And manually installing the 2.6.31 kernel seems to have banished my power management (suspend and resume) woes, allowing me to avoid having to reboot my laptop for obscenely long periods of time on end (current uptime: 8 days, 21 hours).

Granted, installing updates is hardly a particularly novel or ground-breaking idea, and doing so certainly doesn’t require much in the way of advanced technical skill.  But for those who don’t know, it’s important to understand that critical system files (including drivers, and obviously the kernel) are undergoing active development all the timebut updates to such files generally aren’t pushed out to users between official release cycles (every six months in the case of Ubuntu).  Consequently, if you’re running into a bizarre pattern of behavior that you can’t explain, but seems to be related to some specific program, piece of hardware, or system (kernel) daemon, it’s definitely worth checking to see if there’s an updated version of that program/driver/kernel available – because there probably is, and applying it may very well fix whatever problems you’ve been having.  And even if a given update doesn’t help with your particular issue, it’ll undoubtedly fix other stability and/or security flaws you haven’t yet encountered, and is very unlikely to make the original problem worse.  I’ve only run into problems of the latter kind once, which were (a) fairly easy to fix, and (b) almost entirely my own fault.

As mentioned above, the components which I’ve found to be the best candidates for periodic, out-of-cycle updates are graphics drivers, networking drivers, and the kernel.  Because I had to do quite a bit of scrounging to figure out how to update each of these, I figured I’d compile my findings here for your future reference:

Networking

You’ll first need to figure out what driver your wireless card is currently using.  In Ubuntu, you should be able to do this by right-clicking on the networking icon on the main taskbar, and selecting <Connection Information>.  Next, go the linuxwireless.org site, find the appropriate entry in the list of available drivers, and click on it.  This should bring you to a page with detailed instructions about how to update your driver.

Graphics

Add the following line(s) to /etc/apt/sources.list (the second bunch may be somewhat unstable; use with discretion):

#Relatively recent X-updates
deb http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu jaunty main
deb-src http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu jaunty main

#Bleeding-edge X-updates
deb http://ppa.launchpad.net/xorg-edgers/ppa/ubuntu jaunty main

Then run aptitude update, aptitude upgrade

Kernel

Go to http://kernel.ubuntu.com/~kernel-ppa/mainline/, scroll down to the bottom of the page, and find the highest-numbered folder without an “-rc*” at the end of its name (eg, choose v2.6.31.5 over 2.6.32-rc3).  Enter the folder, and then download the linux-headers-2.6****.deb and linux-image-2.6****.deb files that are appropriate for your system (there are 32 and 64-bit versions available), and linux-image-2.6****all.deb

Then run dpkg -i

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>