Ubuntu 9.04 (Jaunty Jackalope) customized for performance on a Nexoc Osiris E705III (Clevo M570RU-U) laptop

Ubuntu 9.04 (Jaunty Jackalope) customized for performance on a Nexoc Osiris E705III (Clevo M570RU-U) laptop

I am going to describe how I have customized Ubuntu  in my notebook in order to make it faster and more responsive.

I like Debian because of its fantastic package manager and the many thousands of precompiled packages and I like Ubuntu because of the fact that most hardware is configured out-of-the-box (or nearly).

However, when I installed the beta version of Ubuntu 9.04 (Jaunty Jackalope) on my Nexoc Osiris E705III (Clevo M570RU-U) laptop, I encountered a very serious bug.

To make a long story short, the file system is labeled as read-only and when updating the kernel via Synaptic and the system becomes unusable. Apparently, this bug is specific to the 64-bit Jaunty kernel 2.6.28-11 and it only pertains to certain hardware configurations. The problem is solved by letting fsck run upon reboot and accepting all changes. Apparently the bug has not yet been fixed as for April 25 2009, one day after the official release of the stable version. An alternative solution proposed in the bug track system comments is compiling from source the Linux kernel 2.6.29.1 (the latest at the time of this writing). This is what I actually did.

In addition to building the kernel, I have also installed LXDE Desktop Environment and performed a few other tweaks which, together, render the system very stable, faster and more responsive.

In general, the steps I followed are mutually independent and therefore can be performed separately.

This post was written only for me to remember what I did, if you decide to follow these instructions, please, be aware that you are doing it at your own risk.

STEPS:

1) Compilation of the 2.6.29.1 kernel
2) Installation of the proprietary NVIDIA drivers
3) Tuning swappiness
4) Installing the prerelease 64-bit version of the Adobe Flash Player plugin
5) Installing the LXDE Desktop Environment

Compilation of the 2.6.29.1 kernel (adapted from this blog)

1. Download the  full kernel (2.6.29.1 at the time of this writing): # wget -c http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.29.1.tar.bz2
2. # sudo -i
3. $ apt-get install build-essential kernel-package ncurses
4. $ mv linux-2.6.29.1.tar.bz2 /usr/src/
5. $ cd /usr/src
6. $ tar xvfj linux-2.6.29.1.tar.bz
7. $ ln -s linux-2.6.29.1 linux
8. $ cd linux
9. $ cp /boot/config-2.6.28-11-generic .config (we wil use your existing working configuration as a basis for building the new kernel)
10. $ make menuconfig
11. General setup –> change from SLUB to SLAB – Choose SLAB allocator (SLAB).
12. Processor type and features: uncheck Tickless System (Dynamic Ticks), set Processor family (mine is Core 2), set Preemption model to Preemptable kernel (Low Latency desktop), set Timer frequency (1000 Hz).
13. Exit and save the new .config file
14. $ make-kpkg clean
15. $ make-kpkg –append-to-version=-vanilla kernel_image –initrd binary (”-vanilla” is descriptive text only, you can change it or leave it out entirely). This will take a while.
16. $ cd .. (go up one directory to where the new files are after compiling is completed)
17. $ dpkg -i linux-image-2.6.29.1*.deb linux-headers-2.6.29.1*.deb (installs the kernel and modules)
18. $ update-initramfs -u
19. Now you can reboot into your new kernel. However, if you had previously installed the proprietary NVIDIA drivers, you will be better off downloading the latest version, as explained below, before rebooting.

As I had previously installed the NVIDIA proprietary drivers for the old kernel, I see some configuration errors at stage 17 and 18, due to the fact that the package manager can not install the NVIDIA modules for the new kernel. You can ignore them.

Installation of the proprietary NVIDIA drivers

1. I downloaded the drivers from the NVIDIA website. In my case: #  wget -c http://us.download.nvidia.com/XFree86/Linux-x86_64/180.51/NVIDIA-Linux-x86_64-180.51-pkg2.run (keep in mind that I have installed the x86_64 version of Ubuntu)
2. Then I rebooted into the new kernel.
3. If the X-server is not longer working, do not worry and go to a console. If it is, go to a console anyway by pressing CTRL+ALT+F1
4. # sudo -i
5. In order to prevent possible conflicts I removed the NVIDIA modules: $ apt-get remove nvidia*
6. $ /etc/init.d/gdm stop
7. Cd into the directory where you have downloaded the NVIDIA drivers to
8. $ sh ../NVIDIA-Linux-x86_64-180.51-pkg2.run (and follow the instructions, I answered “yes” to all the questions)
9. Reboot

Tuning swappiness

I will reduce swappiness to 15, which means that swap memory (slow for it is in the hard drive) will only be used when 85% or more of the RAM is in use.

1. # sudo gedit /etc/sysctl.conf (add the line “vm.swappiness = 15” and save the file)
2. # sudo swapoff -a
3. # sudo swapon -a

Installing the 64-bit prerelease version of the Adobe Flash Player plugin

1. If you had already installed the 32-bit plugin and you have a 64-bit OS, you can remove it: # sudo apt-get remove nspluginwrapper
2. Download the new plugin: # wget -c http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-10.0.22.87.linux-x86_64.so.tar.gz
3. # tar zxvf libflashplayer-10.0.22.87.linux-x86_64.so.tar.gz
4. # mkdir ~/.mozilla/plugins
5. # mv  libflashplayer.so ~/.mozilla/plugins/
6. Restart Firefox

This will only install the plugin for Mozilla-based browsers and the current user. If you wish, you can also install it system-wide for all users.

Installing the LXDE Desktop Environment

Gnome and KDE are very nice, but the are becoming bigger and bigger. If you want or need a really lighter desktop environment, LXDE can be a good choice. It is not as fashionable and fully-featured as the main stream desktops are, but it is faster and requires less resources, which may be crucial for low-end and old systems.

1. Install LXDE: # sudo apt-get instal lxde
2. LXDE has its own network manager (lxnm), however, installation of lxnm currently requires uninstallation of the Gnome network manager. If, provisionally or definitively, you prefer to keep using the Gnome network manager, do not install lxmn and just make the Gnome network manager available for LXDE # sudo gedit /etc/xdg/autostart/nm-applet.desktop (change the line “OnlyShowIn=GNOME;XFCE” to “OnlyShowIn=GNOME;XFCE;LXDE” and save).
3. You can now logout and choose an LXDE session before logging in again