Difference between revisions of "Installing Ubuntu 8.04 (Hardy Heron) on a ThinkPad T61p"

From ThinkWiki
Jump to: navigation, search
(What works out of the box)
(Suspend with Nvidia binary drivers)
Line 65: Line 65:
 
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.
 
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.
  
 +
== Suspend ==
 +
Suspend is supposed to work out of the box if you're not using the Nvidia binary drivers. If you are using them, the following instructions will fix suspend to ram. Suspend to disk (hibernate) is not working at this time.
 +
 +
{{NOTE|These instructions worked on my t61p with type number 6460. I'm not sure if this will work on machines with other type numbers.}}
 +
 +
To get suspend to ram working, you need to edit a configuration file, which apparently has some bad information in it.
 +
 +
{{cmduser |sudo gedit /usr/share/hal/fdi/information/10freedesktop/20-video-quirk-pm-lenovo.fdi}}
 +
 +
Find the following section:
 +
      ...
 +
      <!-- T61 (8895), intel card 32bit works with S3_MODE, but 64bit needs VBE_MODE
 +
      T61p (6460), does not work with the NVidia driver-->
 +
      <match key="system.hardware.product" prefix_outof="6457;6460;6465">
 +
<merge key="power_management.quirk.s3_bios" type="bool">true</merge>
 +
<merge key="power_management.quirk.vbemode_restore" type="bool">true</merge>
 +
      </match>
 +
 +
      <!-- These Thinkpads don\'t need a quirk: 6459 (T61p), 7664 (T60) see s2ram -->
 +
      <match key="system.hardware.product" prefix_outof="6459;7664;8918">
 +
<merge key="power_management.quirk.none" type="bool">true</merge>
 +
      </match>
 +
 +
      <!-- Lenovos non-ThinkPads -->
 +
      ...
 +
 +
Remove the <code>6460;</code> from the <code>&lt;match key="system.hardware.product" prefix_outof="6457;6460;6465"&gt;</code> line and add the following lines right before the <code>&lt;!-- Lenovos non-ThinkPads --&gt;</code> line:
 +
      &lt;match key="system.hardware.product" prefix_outof="6460\"&gt;
 +
&lt;merge key="power_management.quirk.s3_bios\" type="bool"&gt;false&lt;/merge&gt;
 +
&lt;merge key="power_management.quirk.vbemode_restore" type="bool"&gt;true&lt;/merge&gt;
 +
      &lt;/match&gt;
 +
 +
Based on [https://bugs.launchpad.net/ubuntu/+source/hal-info/+bug/235284 Bug #235284 in hal-info (Ubuntu)]
 
== Bluetooth ==
 
== Bluetooth ==
 
If installed, bluetooth must be enabled with the command:
 
If installed, bluetooth must be enabled with the command:

Revision as of 09:33, 10 July 2008

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.

Suspend

Suspend is supposed to work out of the box if you're not using the Nvidia binary drivers. If you are using them, the following instructions will fix suspend to ram. Suspend to disk (hibernate) is not working at this time.

NOTE!
These instructions worked on my t61p with type number 6460. I'm not sure if this will work on machines with other type numbers.

To get suspend to ram working, you need to edit a configuration file, which apparently has some bad information in it.

$ sudo gedit /usr/share/hal/fdi/information/10freedesktop/20-video-quirk-pm-lenovo.fdi

Find the following section:

     ...
     <!-- T61 (8895), intel card 32bit works with S3_MODE, but 64bit needs VBE_MODE 
	      T61p (6460), does not work with the NVidia driver-->
     <match key="system.hardware.product" prefix_outof="6457;6460;6465">
	<merge key="power_management.quirk.s3_bios" type="bool">true</merge>
	<merge key="power_management.quirk.vbemode_restore" type="bool">true</merge>
     </match>

     <!-- These Thinkpads don\'t need a quirk: 6459 (T61p), 7664 (T60) see s2ram -->
     <match key="system.hardware.product" prefix_outof="6459;7664;8918">
	<merge key="power_management.quirk.none" type="bool">true</merge>
     </match>

     <!-- Lenovos non-ThinkPads -->
     ...

Remove the 6460; from the <match key="system.hardware.product" prefix_outof="6457;6460;6465"> line and add the following lines right before the <!-- Lenovos non-ThinkPads --> line:

     <match key="system.hardware.product" prefix_outof="6460\">
	<merge key="power_management.quirk.s3_bios\" type="bool">false</merge>
	<merge key="power_management.quirk.vbemode_restore" type="bool">true</merge>
     </match>

Based on Bug #235284 in hal-info (Ubuntu)

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