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.

Flash Video in Linux and Webcam

You also experienced problems when trying to use a webcam from a flash application in your Firefox browser?
It claimed about not being able to detect the cam, whereas VLC finds and uses it perfectly.

Well, there's a known compatibility limitation between the underlying video-for-linux (v4l) layer.
Modern Linux systems use version 2, whereas the Flash applets seem to be comfortable only with version 1.

There's a possibility to force Firefox to use the version 1 of v4l, by launching it this way:
LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so firefox &

Now the Flash applet should be able to detect and use your webcam.

More details can be found in this article I found.