Saturday, 10 March 2012

Ubuntu update killed my laptop

[SOLVED] open a terminal and paste in the following lines, (works if you still have the 2.6.31-14 kernel)

sudo su -
kern_img=$(grep 2.6.31-14 /boot/grub/grub.cfg |grep menuentry|grep -v recovery|sed -e "s/' .*/'/" -e 's/menuentry //')
sed -i "s/GRUB_DEFAULT.*/GRUB_DEFAULT=$kern_img/" /etc/default/grub
grep 2.6.31-14 /etc/default/grub || sed -i "s/GRUB_DEFAULT.*/GRUB_DEFAULT=0/" /etc/default/grub


This entry seemed to be getting a lot of hits so I've added a very quick-n-dirty hack that solved the problem for me. If you do not have the 2.6.31-14 kernel installed then try booting into another kernel that isn't the 2.6.32-39-generic provided by Ubuntu

The story starts, (and ends) here:

It finally happened to me; my Ubuntu luck ran out: I noticed that the update-manager had turned up last night, so I set it going and went to sleep. The next morning it prompted me for a reboot, which I did and now my laptop is broken. (I'm deliberately being vague because this is how it would appear to a normal user.)

So what happened? synaptic tells me that the following happened:
adobe-flash-properties-gtk ( to

adobe-flashplugin ( to
chromium-browser (17.0.963.56~r121963-0ubuntu0.10.04.1) to 17.0.963.65~r124586-0ubuntu0.10.04.1
chromium-browser-l10n (17.0.963.56~r121963-0ubuntu0.10.04.1) to 17.0.963.65~r124586-0ubuntu0.10.04.1
chromium-codecs-ffmpeg (17.0.963.56~r121963-0ubuntu0.10.04.1) to 17.0.963.65~r124586-0ubuntu0.10.04.1
<consolekit (0.4.1-3ubuntu2) to 0.4.1-3ubuntu3
libc-bin (2.11.1-0ubuntu7.8) to 2.11.1-0ubuntu7.10
libc-dev-bin (2.11.1-0ubuntu7.8) to 2.11.1-0ubuntu7.10
libc6 (2.11.1-0ubuntu7.8) to 2.11.1-0ubuntu7.10
libc6-dev (2.11.1-0ubuntu7.8) to 2.11.1-0ubuntu7.10
libc6-i686 (2.11.1-0ubuntu7.8) to 2.11.1-0ubuntu7.10
libck-connector0 (0.4.1-3ubuntu2) to 0.4.1-3ubuntu3
libpam-ck-connector (0.4.1-3ubuntu2) to 0.4.1-3ubuntu3
<linux-generic ( to
linux-headers-generic ( to
linux-image-generic ( to
linux-libc-dev (2.6.32-38.83) to 2.6.32-39.86
python-pam (0.4.2-12.1ubuntu1) to 0.4.2-12.1ubuntu1.10.04.1
tzdata (2011n-0ubuntu0.10.04) to 2012b-0ubuntu0.10.04
tzdata-java (2011n-0ubuntu0.10.04) to 2012b-0ubuntu0.10.04

Installed the following packages:
linux-headers-2.6.32-39 (2.6.32-39.86)
linux-headers-2.6.32-39-generic (2.6.32-39.86)
linux-image-2.6.32-39-generic (2.6.32-39.86)

So what are the symptoms? VLC has turned into a slide-show. smplayer has turned into an audio player and totem is even worse than normal. chromium-browser is slow, runs between 90 and 100% CPU.  top tells me that 0k of swap is being used and I have 549880k free RAM. I'm having to use Epiphany and links, (text browser) to search for solutions. So the first thing that I wanted to rule out was chromium as the problem, (it didn't feel like the problem, and VLC developing problems after an upgrade that did not change any of the VLC files seems to confirm this.) So I tried Firefox (10.04.4) and sure enough that was much slower than yesterday and flash video was like watching a slide-show, (though I note that the audio was fine... until firefox crashed!) I uninstalled firefox 10.04.4 and tried to install firefox-3.6. That didn't seem to work so I tried Opera, (which I had installed.) It was a little better but still flash was unusable. 

It is at this point where my heart sunk as I realised that I would be spending my weekend fixing my laptop, (and probably installing a new distro.) I feel that Ubuntu has let the side down enough that I should look for something else, (even though this time I think it is libc.) update-manager already knows how much disk space will be consumed by the update. It may take some work but it should be possible for update-manager to check the power of a computer and not upgrade if it is going to burn the CPU too hot. (This would require the beta testers to compare the CPU/RAM usage.) But the simplest solution would be a rollback button, (and for those pedantic-types you can call it an "undo-update" button.)

Before I do that I would like to find a faster solution, (apt-get rollback-upgrade would be perfect, but it does not exist.)

So lets reboot into an older linux-image (or "try an older kernel" as I would put it.) Still the same problems. So is it a problem with adobe-flashplugin or libc, (agh). Lets go for the soft option of:

aptitude remove adobe-flash-properties-gtk* adobe-flashplugin*
aptitude install flashplugin-installer

then see where we are... Firefox is still crashing and flash video is still a slide-show, (and I've noticed that NetworkManager has vanished from my Panels bar, rhythmbox no longer minimises to the bar, (or even has an icon on the bar when running), and the keyboard short-cut for terminal has been deleted, (what? I use that every day. Come ON ubuntu why remove that without any warning?)
[got the networkManager and rhythmbox icon back with: Right click bar > +Add to panel > Notification area]

Maybe preload and openbox can get me out of this mess: nice try but nope, (though I think I would like openbox were I not in the middle of fixing a broken laptop.)

So it feels like everything is burning CPU - so maybe libc has some sort of debug mode enabled. I still don't know if it is a problem with gnome 2.30.2 or ubuntu 10.04.4 or libc. Maybe it is a problem with apparmor:

aptitude remove apparmor-utils apparmor -y; reboot

we will see on the other side.. still nope

maybe ubuntu has broken cpu frequency scaling:

aptitude install cpufrequtils cpufreqd -y

and... we have a winner, (two hours later, after searching blogs and logs and checking the BIOS for speedstep (I have a Centrino Duo and SpeedStep was enabled)), I booted into 2.6.31-14 and I have a working laptop. (Still have to see if it was all the hacking about or the kernel before submitting a kernel bug report to launchpad.)

With all this time burnt on trying to fix CPU stepping I still don't know which distro to move to.. maybe back to Slackware?

No comments:

Post a Comment

About this blog

Sort of a test blog... until it isn't