Wednesday, May 11, 2011

Installing Ubuntu 11.04 (Natty Narwhal) on an 8 year old P4

Today I decided to give Natty a go on my archaic Pentium 4. There were issues, and it just made sense to record them for future reference. Who knows, it might even help someone...

Hardware

ProcessorIntel Pentium 4 @ 1.7GHz
Memory512MB SDRAM
Graphics cardNvidia 5700LE 256MB
MonitorBenQ G2420HD (1920 x 1080) (Please don't laugh)
MotherboardASUS P4B-M (Intel 845 chipset)
WiFiDLink Wireless 150 (DWA 125)

The following issues were observed and resolved after a standard installation of Ubuntu 11.04. Most of the modifications were performed while using standard Gnome (Ubuntu Classic session).

Note: I won't claim that this is the best way to solve these issues. I've simply recorded my experience. What worked for me, may not work for you. But you won't know unless you try.
  1. Slow Wifi

    This was a problem with Ubuntu 10.10 as well and I remembered how to get this to work this time round.
    1. Disable IPV6

      Add the following line to /etc/sysctl.conf
      net.ipv6.conf.all.disable_ipv6=1
    2. Blacklist unnecessary USB WiFi driver modules

      Add the following lines to /etc/modprobe.d/blacklist.conf
      blacklist rt2800lib
      blacklist rt2800usb
      blacklist rt2x00lib
      blacklist rt2x00usb
  2. Incorrect resolution

    The resolution 1920 x 1080 was unavailable with the default nouveau driver. The fix was simple. I just installed the proprietary nvidia drivers by selecting System > Administration > Additional Drivers

  3. The "Automatically unlock this keyring whenever I'm logged in" option for the default keyring was disabled

    With the WiFi up and running, I added the password for my wireless network to the default Gnome keyring. However, the "Automatically unlock this keyring whenever I'm logged in" option for the default keyring was disabled. As a result, I had to enter the default keyring password each time I logged in. This was quite annoying.

    This problem was solved as follows:
    1. Open Passwords and Encryption Keys

      System > Preferences > Passwords and Encryption Keys
    2. Set the login keyring as default

      In the passwords tab, right-click "Passwords: login" and select "Set as default"
    3. Delete the default keyring

      In the passwords tab, right-click "Passwords: default" and select Delete
    4. Log out and back in

      On logging in again, I was prompted for my network password and this was now added to the login keyring.

  4. No Unity

    Despite the old hardware, I was hoping to try out Unity before installing Natty on my more modern systems. As expected, Ubuntu told me that Unity was not supported on my system. So, I went about trying to find a way out.
    I discovered this thread which provided a work-around for some newer cards. It was worth a shot. As mentioned in the thread above, I added
    UNITY_FORCE_START=1
    to the file /etc/environment.
    Next, I logged out and back in to an Ubuntu session. I had Unity! The side panel was visible but the icons were all black. I'd call the display "spotty", for lack of a better word. Not much fun without the right hardware.

    Next, I thought I'd have a go at unity-2d. So I installed it from the repository:
    $ sudo apt-get install unity-2d
    Unity-2d does work, and it works quite well too. But it uses a lot of resources and feels a bit sluggish.

    Then, while I was at it, I thought I might as well try out LXDE too. And I'm glad I did.
    $ sudo apt-get install lxde
    LXDE just feels right on this hardware. It's a lot snappier than standard Gnome and unity-2d.

    Here's a comparison of memory usage reported by top and the System Monitor application immediately after a reboot.
    EnvironmentMemory usage
    topSystem Monitor
    unity-2d440MB209MB
    Standard Gnome380MB180MB
    LXDE370MB147MB

  5. WiFi on LXDE

    WiFi was not enabled by default when I logged in to an LXDE session. This was an easy fix. All I had to do was
    1. Open Preferences > Desktop Session Settings
    2. Check Network Manager in the Automatically Started Applications tab

  6. No flash / java / codecs

    This was, arguably, the most easily available information in this entire exercise. Simply install "Ubuntu Restricted Extras" from Applications > Ubuntu Software Center.
Thanks to linux, this system might just live another couple of years.