Severe design flaw in Natty's Upgrade Process

Ubuntu's latest version 11.04 (Natty Narwhal) arrived a few days ago, some people hate it already before launched, high expectations by others.
Personally, I waited for that version several months already, hoping that it will resolve the slow problems I had on my personal laptop, as described on my previous post. Even changing the Kernel version, never solved the problem completely.
Here my update experience on three systems (all were 10.10).

Desktop PC

Machine gots stuck and hang during the upgrade process.
After rebooting, when trying the use the new Grub entry, it claims that my hardware doesn't support Unity.
After a second boot, entering the Previous Linux entry, my old 10.10 system started up perfectly and advised about a partial upgrade.
The upgrade continued smooth and left my system at the end with a running Natty.
Only my Chromium isn't usable any longer, but that's another story.

Dell home laptop

The 2nd, a smooth upgrade, without any problem.
First I downloaded the ISO image, and mounted the burned CD as software source, so most of the packages hadn't to be downloaded from the net.
After upgrade, the slow problem was gone, finally I have a fast system again, even compiz effects are usable again.
Great, all my expectations have been reached.

Lenovo office laptop

My last system hang too during the update process, it blocked with the screen-saver and I wasn't able to enter the desktop, so I couldn't see where exactly it got stuck.
Rebooting the system, first showed that Grub hadn't been updated yet, and even worse, my old system didn't booted up.
My root partition didn't mount correctly.
Inspecting with the SystemRescueCD (I have an entry to it's ISO in my Grub boot menu as explained in this post) revealed that the filesystem hadn't been damaged, all files where there.
After some investigation, I found this discussion about a serious design flaw in the Upgrade Process which could lead to that situation.
I could recover with the mentioned commands as seen below.

Recovering from not ready yet or not present root partition

mount -w -o remount /dev/sda1 /
dpkg --configure -a
Only one package made trouble, winbind, so I removed it with aptitude purge winbind, then run the dpkg command again and finally rebooted into a running Natty system.

Slow laptop with Ubuntu Maverick 10.10

Having installed Ubuntu Maverick on three systems, one desktop and two laptops, I really started to wonder, why during the past weeks my Dell laptop got slower and slower.
Opening two applications almost let the system being unusable.
Even worse, the frequency scaling of the CPU stopped working and was running at full speed all the time, heating the laptop, but going slow nevertheless.
First I thought it was a problem of the CPU scaling, so I installed cpufreqd, which at least slowed down the CPU a bit, very little.

Still wondering, ..., why?
I had installed my Dell laptop from zero, so I also thought it might have to do with the graphics driver, as compiz was impossible to use as well.

Then I started investigating a little further and I found several posts from users with the same symptoms, and everything pointed to a kernel 2.6.35 problems, the version that ships with Ubuntu 10.10

People said that upgrading to next kernel version solved that problem, so I tried that and it worked.
Now, I have a quicker system again.
Guess, I could have waited for Ubuntu 11.04, but if you have the same problem, and want to quick up your system, download a higher kernel version from here (2.6.36 rc7 for 32Bit, 2.6.36 rc8 for 64Bit systems).

Install instructions

wget -nc -q -P /tmp http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.36-rc7-maverick/linux-{headers,image}-2.6.36-020636rc7{-generic,}_2.6.36-020636rc7.201010070908_{all,i386}.deb
sudo dpkg -i /tmp/linux-{headers,image}-2.6.36-020636rc7{-generic,}_2.6.36-020636rc7.201010070908_{all,i386}.deb
Software Update will offer you updates from kernel 2.6.35 which you might install without problem, as grub boot process will still find the newer 2.6.36 kernel and offers and boot that as the default one from the list anyway.

Nightly icon cache update for Gnome

Sometimes it happened on my Ubuntu system, that a newly added application didn't had its icon.
This can happen due to an not updated icon cache of GTK.
This can be fixed with the command
gtk-update-icon-cache
, which rebuilds the GTK+ icon cache.

So why don't do this automatically in the background on a daily basis (during the night)?

Install instructions

Just execute the following commands, which will put a script into /etc/cron.daily so that the cache is fixed and the missing icon appears overnight.
sudo -i
echo '#!/bin/sh
#
# 

for theme in $(find /usr/share/icons -mindepth 1 -maxdepth 1 -type d)
do 
    if [ -f "$theme/index.theme" ]
    then gtk-update-icon-cache -f -q "$theme"
    fi
done

exit 0' > /etc/cron.daily/update-icon-cache
chmod a+x /etc/cron.daily/update-icon-cache

Open URL in Firefox with middle mouse button

Often I copy an URL somewhere and want to open it in a new tab in Firefox.
Normal steps:
  • Open a new tab with Ctrl-T
  • Click into the URL address bar
  • Paste the URI and press Enter
Wouldn't it be nice to make all these steps in one, f.ex. by clicking with the middle mouse button on the current tab.

Firefox has this possibility, but you can't enable it from the normal preference dialog.
Instead you have to alter the configuration parameters directly.

Install instructions

  • Navigate to about:config
  • Put middlemouse.contentLoadURL in the filter bar
  • Press the right mouse button over the option and select toggle, so it's value is true.
Now lets test it:
  • select and copy this text: www.ubuntu.com 
  • press the middle mouse button in the window where you're reading this post
  • A new browser tab should appear with the Ubuntu site.