Sunday, 1 September 2013

5 years on, a distro upgrade (Xubuntu 12.04 LTS)

tl; dr  I replaced Kubuntu 8.04 LTS with Xubuntu 12.04 LTS on my old Toshiba Portege R100 laptop, and it works well. The install process was not quite seamless, but no worse than the last time time I did it 5 years ago.

My Toshiba Portege R100 came out in 2004, and I bought second-hand in 2008 for £200. It was a quality machine when new, and so has survived well and continues to go strong, albeit with reduced battery life.  It does seem a little underpowered for today's bloated browsers, but I still like the form factor (still slim, not so young any more) and it works enough well if you don't open too many tabs.

However, so much software from my Kubuntu 8.04 LTS install was complaining about needing upgrading, and with the 3 years of Long Term Support not anticipating my very slow adoption cycle; it became clear that keep this machine on a useful life, I needed a new install.

I recently upgraded to Kubunutu 12.04 LTS on my desktop through distro upgrades from 10.04 (only minor problems), but I knew that the laptop needed something lighter than KDE 4, while I could find alternatives for kompare and kate.  My choice then was between Lubunutu and Xubunutu.  After a bit of research, I decided that my 512MB ram should handle Xubuntu well enough, and I really wanted the LTS which is not available for the present Lubunutu release.

Also, I couldn't face the multiple upgrades (and likely issues) required to get from 8.04 to 12.04, so in this case I decided on a fresh install (on the Linux partition, the original XP still dual boots on the NFTS partition).   So I opted for a fresh install of Xubuntu 12.04 LTS.

Installation steps and issues encountered

1)  I got the live CD iso via torrent, and as before wrote it to my NTFS partition with Unetbootin which boots the iso image using Grub4dos (which gets chained from grub in MBR / old Kubunutu) This is so called "Frugal Mode", I guess after people that don't want to use a blank CD.  In my case, there is no CD drive and USB sticks are not bootable by the BIOS.  The first attempt gave me something with did not boot correctly into the live CD.  After some failed attempts at suggested fixes with chdsk, I updated Unetbootin to the latest version instead of using my 5 year old version (I should have done this time), and the second attempt booted fine.

2) When I tried to the install from the "NTFS aka live CD", I ran into problems (which I did not encounter last time) because the installer tries to unmount the fake /cdrom which the install process is running from.  This should not be necessary, but it thinks that everything must be unmounted before it can make changes to the partition table (but in fact I only wanted to reformat the partition not in use from ext3 to ext4).   This is a known bug in ubiquity.  The various suggested solutions using forced umounts and mounts at the right times made me nervous; I did not want to risk damaging the NTFS partition.  In the end I opted for this solution which fools the installer into thinking /cdrom is not mounted.   This worked, and the install proceed to complete smoothly.

3) At this stage, I had a clean install in which everything important worked.  There were no problems with screen resolution or suspend as I had 5 years ago.   Everything that follows covers solutions to minor niggles.

4) To get the Toshiba hardware utilties toshset and fnfxd to work, one has to patch the toshiba_acpi kernel module to correct functionality (which involves recompiling part of the kernel).  The kernel developers, have in their wisdom decided to remove something that worked fine to see if anyone noticed (people did, but it has not yet been put back).   In the meantime, someone has started to maintain an external package which puts it back for you and saves a lot of tricky manual work (but one should note that there is some risk here of instability if the package is not maintained):

sudo apt-add-repository ppa:keks9n/main
sudo apt-get update
sudo apt-get install toshiba-acpi-fix
# Now the kernel module has been rebuilt with the patch:
sudo modprobe -v -a toshiba_acpi        #insert the module temporarily 
lsmod | grep toshiba
sudo echo toshiba_acpi >> /etc/modules  #insert the module permanently

After that, toshset works fine.  However, fnfxd / fnfx-client is old and not well maintained.
It seems to be able to change brightness only after it has been set once by another intervention, e.g. toshset, or

echo 7 | sudo tee /sys/class/backlight/toshiba/brightness

To make this permanent I added this line to /etc/rc.init

echo 7 | tee /sys/class/backlight/toshiba/brightness

After setting the up the /etc/fnfxd/fnfxd.conf file, most of my desired Fn-hotkeys (brightness, suspend mute, screen out toggle) now work except volume up / down (which can be mapped to another combination using the Xfce keyboard shortcuts) becuase fnfxd doesn't know how to interact with modern mixers that don't use /dev/mixer, and I cant get custom commands (e.g. amixer sset 'Master' 2+) to work with the fndx-client and ~/.fnfxrc.

5) Remove the annoying Pidgin / Thunderbird notification icon

sudo apt-get remove indicator-messages

6) Fix screen resolution change when Xfce power manager changes the screen birghtness.  This appears related to (but less severe than) previous problems with power state changes.  It is fixed by changing the screen settings for grub2 (slightly different to before) in /etc/default/grub (no more menu.1st in grub2) to

sudo update-grub

While we are at we can also make the boot menu delay time shorter.

Other quick reference on installing nonstandard packages or fixing standard ones


sudo apt-add-repository "deb $(lsb_release -sc) partner"
sudo apt-get update
sudo apt-get install skype


sudo apt-get install openafs-krb5 openafs-client krb5-user module-assistant openafs-modules-dkms
sudo dpkg-reconfigure openafs-client  # this might need to be done more than once


sudo apt-get install xfce4-sensors-plugin
sudo chmod u+s /usr/sbin/hddtemp

Redshift or f.lux (still not working)

sudo add-apt-repository ppa:kilian/f.lux
sudo apt-get update
sudo apt-get install fluxgui

sudo apt-get install gtk-redshift
# manually create the ~/.config/redshift.conf file to avoid a bug when redshift crashes looking for location provider

But even after these fixes, Redshift doesn't appear to do anything, and neither does xflux.

Things not working perfectly

The following might be fixed by an appropriate Xorg configuration, but it is difficult to know how to get the right settings, and is a lot of trial and error with a unknown chance of success...  I actually found that running Xorg -configure as root was causing segfaults, so I didn't have much success.   After trying various things I reverted to the default configuration, which uses no xorg.conf file.

  • Switching to an external monitor (via the hotkeys) can cause screen doubling that can be worked around by forcing a redraw using Ctlr-Alt-F1 to switch to an alternate terminal followed by Ctlr-Alt-F7 to get back.   Trying old xorg.conf files (or from elsewhere) seems not to help this problem.
  • f.lux and Redshift run, but they don't appear to do anything.  The xflux error messages requiring 24 bit depth with can removed by using my old xorg.conf which has a DefaultDepth setting, but it still doesn't appear to do anything.   

Thanks for reading:  Comments are welcome, especially if you have ideas about how to get Redshift working.


Dariusz Panasiuk said...

thx, your notes helped with my doudou linux instalation

Dariusz Panasiuk said...
This comment has been removed by the author.