Installing Ubuntu 8.04 (Hardy Heron) on a ThinkPad T61p

From ThinkWiki
Revision as of 04:18, 7 July 2008 by Argilo (Talk | contribs) (What works out of the box)
Jump to: navigation, search

What works out of the box

  • Video driver
  • Wireless (Intel 3945ABG or 4965AGN)
    • Only tested G mode
  • Video (VESA)
    • Hardware Drivers panel offers to install NVidia proprietary drivers on first boot
  • Touchpoint and trackpad
  • Volume control buttons
  • Screen brightness control

Display / Video

To enable 3D acceleration, the proprietary NVidia driver must be installed. The first time you boot into Ubuntu, you should get an alert asking if you want to install the binary driver. If not, it can be installed from the Hardware Drivers panel at System --> Administration --> Hardware Drivers.

If you want more options for configuring your video card than is provided by the Ubuntu control panels, you can install the NVidia Control Panel with

$ sudo apt-get install nvidia-settings

which will add the NVidia X Server Settings panel to the Administration menu.

Alternately, the NVidia driver and Control Panel can be installed using EnvyNG (envyng-gtk in Synaptic). Simply start it up (System Tools --> EnvyNG) and ask it to install the NVidia driver.

Unfortunately, there are some annoying bugs in the NVidia driver. The most annoying one is that after resuming from suspend, you will often get a blank white screen. To get past it, simply type in your password and press enter, and you will be returned to your desktop. Fortunately, Ubuntu has released a workaround for this bug, so it should go away once you update all your packages to the latest versions.

Another problem is that the driver does not report the correct refresh rate to Compiz, resulting in rough animation. To fix this, install the compizconfig-settings-manager package, then go to System --> Preferences --> Advanced Desktop Effects Settings. Click on General Options, go to the Display Settings tab, uncheck the Detect Refresh rate box and drag the Refresh Rate slider to 60. Also, check the Sync To VBlank box.

Next, Compiz animations are also choppy due to NVidia's PowerMizer feature, which slows down the GPU to conserve power when it is not in use. This works well for 3D games which constantly use 3D acceleration, but poorly for Compiz which uses the GPU in small bursts. To solve this problem, I made a couple of shell scripts which keep the GPU at its highest speed while running on AC power. The first one is named "powermizer-loop" and does most of the work:

#!/bin/sh

while true; do
    
    powerstate=`cat /proc/acpi/ac_adapter/AC/state | awk '{print $2}'`
    
    if [ $powerstate = "on-line"  ]; then
       nvidia-settings -q all > /dev/null
    fi
    sleep 25;
done

The second is named "powermizer-off" and starts up powermizer-loop when I log in, ensuring that only one copy runs at a time:

#!/bin/sh

killall powermizer-loop
~/powermizer-loop &

I put both of these scripts in my home directory and made them executable by doing:

chmod 755 powermizer-loop powermizer-off

Then to make powermizer-off run on login, I opened System --> Preferences --> Sessions, clicked on Add, and entered the command "/home/argilo/powermizer-off".

Of course, performance still suffers when running on battery, but hopefully NVidia will fix this problem in a future version of their driver.

One final bug is that EDID (Extended Display Identification Data) is misdetected, which causes problems with font sizes and greatly reduces the number of resolutions available in the NVidia X Server Settings application. (For example, I was unable to set my laptop's screen to 1024x768 for use with a projector during a presentation.) To correct this problem, I added the following lines to /etc/X11/xorg.conf in the "Screen" section:

Option "UseEdidDpi" "FALSE"
Option "DPI" "96 x 96"
Option "UseEdidFreqs" "FALSE"
Option "HorizSync" "40-70"

The first two lines fix the font size issue, and the last two lines fix the resolution problem. I'm not sure if the 40-70 values are actually correct, since I just took them from someone else's xorg.conf, but they seem to work.

NVidia seems to have corrected the EDID misdetection bug in the latest version of their driver, but it's not available in Hardy and I'm not aware of any easy way to install it.

Bluetooth

If installed, bluetooth must be enabled with the command:

$ echo enable | sudo tee /proc/acpi/ibm/bluetooth

Replace enable with disable to turn it off.

You can now connect devices by following the instructions at Ubuntu Help Bluetooth Setup page