Installing Ubuntu on a ThinkPad R60e
Contents
Overview
There are no particular problems installing Ubuntu on a R60e.
versions
Most of the information here is based on a clean install of 6.06.1 with upgrade to Ubuntu 7.04 via Ubuntu 6.10. Significant changes that apply to Edgy (6.10) and Feisty (7.04) are noted here. The current development version 'Gutsy Gibbon' can be installed from the 'Tribe 5 alternate CD'; significant changes likely affect the final release (7.10) will also be noted here.
Ubuntu 6.10 "Edgy Eft"
If the wireless kill switch is active during boot, that is wireless and bluetooth are switched off, there is a high probability that a "soft lockup on CPU0" will occur during boot. Boot appears to be ok provided the wireless is on during boot. See Bug 63418.
The problem with the wireless kill switch seems to have been fixed in kernel 2.6.20.
Ubuntu 7.10 "Gutsy Gibbon" The version of Xorg in Gutsy includes RandR version 1.2 this entails some significant revision of the config of X for two screens described below. See also Xorg RandR 1.2
Partition and Boot
If the Windows and Service Partitions are to be retained then the Gnome Partition Editor can be used from the live cd to shrink the Windows partition (sda1). The IBM recovery partition is placed at the end of the HD disk and contains a cut down version of WinNT. Note that the Recovery partion is not located on a cylinder boundary and is placed between 'unused' disk areas, 3MB in front and 7MB behind. These appear to contain the diagnostics programs and should not be moved or resized if the diagnostics and R&R programs are required.
To repartion: boot to Windows and immediately create a Rescue and Recover disk set. The first disc of the set must be a CD (though if you put a DVD in it will be formatted and writen as a CD disc); this is a bootable disc. The second stage of the disc writing process will write to either one DVD or 5 CDs. Restoring from these disks will restore to factory state, which means the entire hard drive is reformatted. After the disc set is created it is not possible to create a second set. (Although if you update the R+R program you can create a new backup CD/DVD.)
However, if you have a USB HD you can also create a Rescue and Recovery copy on that. I have not tried (sucessfully) but I it should be possible to boot and restore from a USB HD recovery set and preserve any new partitions provided that: the windows partition is not too small, and the Recovery partition is preserved.
boot with Ubuntu live CD, use Gnome Partition editor to shrink the IBM_PRELOAD (sda1) partition.
reboot to Windows and let it run chkdsk
boot Ubuntu Live CD and install
The live CD will install GRUB to the MBR. For most users with a simple dual boot (Linux + Win) this will be fine; the installer will identify both IBM_PRELOAD and the service partition and provide boot options for both. (If you have need of a more complex boot arrangement, such as multiple linux versions then install using the Ubuntu alternate install CD.) Edit /boot/grub/menu.lst to add the hide and unhide lines (this will prevent Windows showing the Service Partition).
# This entry automatically added by the Debian installer for a non-linux OS # on /dev/sda1 title Microsoft Windows XP Professional hide (hd0,1) root (hd0,0) savedefault makeactive chainloader +1
# This entry automatically added by the Debian installer for a non-linux OS # on /dev/sda2 title IBM/Lenovo Maintenance unhide (hd0,1) root (hd0,1) savedefault makeactive chainloader +1
Kernel
For current versions (from 6.10) the default kernel linux-image-generic will fully support SMP and CoreDuo processors so installing a kernel should not be necessary. Restricted modules are required for the Intel wireless card.
Xorg.config for two screens
For Ubuntu Gutsy (7.10 alpha) see section below and Xorg RandR 1.2
Intel 945GM
The config options are described in the driver man page $ man i810
. The following sections are for a configuration with the laptop screen as the primary display and an second display on the D-SUB15 analog VGA port. The second display is expected to be a flat panel or a data projector ('beamer').
There are some tradeoffs with Xorg.conf, the version below is intended to give the best available resolution with a variety of external screens without the need to change xorg.conf. See the notes at the end of this section for some other optimisations.
Section "Device" Identifier "Intel 945GM Internal LCD" Driver "i810" BusID "PCI:0:2:0" Screen 0 Option "MonitorLayout" "CRT,LFP" VideoRAM 126976 EndSection
Section "Device" Identifier "Intel 945GM External D-SUB15" Driver "i810" BusID "PCI:0:2:0" Screen 1
# some additional possibilities (see man i810 for cryptic explanations) # Option "CheckLid" "yes" # Option "Clone" "no" # Option "CloneRefresh" "60" # Option "FlipPrimary" "no" # Option "DisplayInfo" "yes" # Option "Rotate" "0" # Option "DevicePresence" "true" # Option "LinearAlloc" "0" # Option "Legacy3D" "no" # Option "AperTextSize" "32768" EndSection
Resolution and timing
X and the graphics adaptor will detect an external screen if present and attempt to auto negotiate an appropriate resolution and refresh rate. It is unclear from the Xorg/XFree documentation how the useable video modes are selected/rejected but it appears that if a monitor is connected to the VGA connector the highest available VESA resolution will not be selected unless it has a refresh rate of 75Hz or more. As the optimum refresh rate for a flat panel display is usualy 60Hz, and often the highest (native) resolution only available at this rate, it may be necessary to set a mode line for best performance.
In the case of a data projector, these appear designed to accept inputs for resolutions and refresh rates far in excess of their native SVGA or XGA capabilities and automaticaly convert down, which may entail a loss of image quality. Thus, for these also, forcing a reasonable resolution and refresh rate is desirable.
The possible modes for a connected monitor can be discovered by looking at the X log file $ sudo nano -w /etc/X11/xorg.conf
or by running $ xvidtune
.
Section "Modes" Identifier "V75" ModeLine "VGA 75" 31.50 640 656 720 840 480 481 484 500 ModeLine "SVGA 75" 49.50 800 816 896 1056 600 601 604 625 ModeLine "XGA 75" 78.80 1024 1040 1136 1312 768 769 772 800 Modeline "SXGA 75" 135.00 1280 1296 1440 1688 1024 1025 1028 1066 EndSection Section "Modes" Identifier "V60" Modeline "XGA 60" 65.00 1024 1048 1184 1344 768 771 777 806 ModeLine "SXGA 60" 108.00 1280 1328 1440 1688 1024 1025 1028 1066 ModeLine "UXGA 60" 160.00 1600 1664 1856 2160 1200 1201 1204 1250 EndSection
The monitor
Most recent monitors will supply X with data on available built in modes, and this will overide the HorizSync and VertRefresh values in the config file. However some projectors do not supply this information and fail to display unless the HorizSync and VertRefresh are configured.
Section "Monitor" Identifier "LCD on D-SUB15" Option "DPMS" HorizSync 31-75 VertRefresh 59-75 UseModes "V60" UseModes "V75" EndSection
Section "Screen" Identifier "External Screen" Device "Intel 945GM External D-SUB15" Monitor "LCD on D-SUB15" DefaultDepth 24 SubSection "Display" Depth 24 # Modes "1024x768" "1280x1024" "1600x1200" "640x480" "600x800" Modes "XGA 60" "SXGA 60" "UXGA 60" "VGA 75" "SVGA 75" EndSubSection EndSection
Section "Screen" Identifier "Laptop LCD" Device "Intel 945GM Internal LCD" Monitor "Lenovo 15in LCD" DefaultDepth 24 SubSection "Display" Depth 24 Modes "1024x768" # Virtual 1600 1200 # ViewPort 0 0 EndSubSection EndSection
Section "ServerLayout" Identifier "Default Layout" Screen 0 "Laptop LCD" Absolute 0 0 Screen 1 "External Screen" RightOf "Laptop LCD" # Screen 1 "External Screen" Absolute 1024 0 InputDevice "Generic Keyboard" InputDevice "Configured Mouse" EndSection
Note 1 With this layout the mouse will move off the right hand edge of the laptop screen and make an entrance on the left of the external monitor. If you can't find the mouse it may be on the other screen, try moving it top left.
Note 2 The gnome desktop can be configured for each monitor. But it is not possible to transfer a window from on display to the other. Trying to start Firefox on one desktop when it is opened on another monitor will give a message: "Firefox is already running, but is not responding. To open a new window you must first close the existing Firefox process, or restart your system".
Xinerama To be able to drag windows from one screen to another and fix the problem in Note 2, enable Xinerama extension. However with Xinerama enabled the resolution of the external display will default to XGA, the same as the laptop screen. The Gnome menu System:Preferences:Screen Resolution will respond with: "The X Server does not support the XRandR extension. Runtime resolution changes to the display size are not available", nor will Gnome provide a separate desktop task bar etc. note [here] This problem can be overcome by defining the preferred resolution - and only that resolution - for the screen and server layout. eg.
Section "Monitor" Identifier "Dell 2001FP" DisplaySize 408 306 Option "DPMS" HorizSync 31-80 VertRefresh 56-76 ModeLine "1600x1200" 160.00 1600 1664 1856 2160 1200 1201 1204 1250 EndSection
Section "Screen" Identifier "External UXGA" Device "Intel 945GM External D-SUB15" Monitor "DELL 2100FP" DefaultDepth 24 SubSection "Display" Depth 24 Modes "1024x768" "1280x1024" "1600x1200" "640x480" "600x800" EndSubSection EndSection
Section "ServerLayout" Identifier "Default Layout" Screen 0 "Laptop LCD" Absolute 0 0 # To move windows across screen we need Xinerama and will have to force # the screen reolution if we want more than 1024x768 (XGA) Option "Xinerama" "true" Screen 1 "External UXGA" RightOf "Laptop LCD" Screen 1 "External Screen" Absolute 1024 0 InputDevice "Generic Keyboard" InputDevice "Configured Mouse" EndSection
This may be a better config if you always use the same external screen, but less satisfactory if you need to connect to a variety of external screens.
Ubuntu 7.10 with Intel_Graphics_Media_Accelerator_950
With X version 7.3 and xrandr version 1.2 the configuration of X for more than one screen is simplified. This section only covers Ubuntu 7.10 and the R60e for other hardware and distributions see Xorg RandR 1.2
X RandR is used to set the size, orientation and reflection of the screen display outputs.
xrandr is the command line interface to the RandR X extension. As usual with X good documentation is hard to find, to start somewhere try
$ xrandr --help
$ man xrandr
$ man intel
If upgrading from earlier versions your old xorg.conf file may contain much that is now obsolete, so in what follows I will assume that you are starting with a fresh version of /etc/X11/xorg.conf whichh can be generated by
# sudo dpkg-reconfigure -phigh xserver-xorg
and then restarting X. The resulting /etc/X11/xorg.conf should include something like
Section "Device" Identifier "Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller" Driver "intel" BusID "PCI:0:2:0" # ADD THIS IF YOUR LAPTOP DOES NOT HAVE A TV CONNECTOR or DOCKING STATION Option "monitor-TV" "TV" EndSection Section "Monitor" Identifier "Generic Monitor" Option "DPMS" EndSection # ADD THIS IF YOUR LAPTOP DOES NOT HAVE A TV CONNECTOR or DOCKING STATION Section "Monitor" Identifier "TV" Option "Ignore" "True" EndSection Section "Screen" Identifier "Default Screen" Device "Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller" Monitor "Generic Monitor" DefaultDepth 24 ... SubSection "Display" Depth 24 Modes "1600x1200" "1280x1024" "1024x768" "800x600" "640x480" # ADD A VIRTUAL LINE TO PROVIDE FOR THE LARGEST SCREENS YOU WILL HOTPLUG Virtual 2048 2048 EndSubSection EndSection Section "ServerLayout" Identifier "Default Layout" Screen "Default Screen" InputDevice "Generic Keyboard" InputDevice "Configured Mouse" InputDevice "stylus" "SendCoreEvents" InputDevice "cursor" "SendCoreEvents" InputDevice "eraser" "SendCoreEvents" InputDevice "Synaptics Touchpad" EndSection
The example above contains some modifications:
- The Virtual line. It is a limitation of the Intel driver that frame buffer size cannot be changed once X has started. Therefore in order to hotplug a variety of screens this should be set the allow for the largest combination of display resolutions you plan to use. For the Intel 945 chip in the R60e a virtual size larger than 2048 will disable DRI. (If you do not need 3D graphics that is not important.) By default the Virtual size is set to that of the largest display that is connected when X starts. (Note this means that if an external VGA is connected but not switched on it will still influence the virtual display size.)
xrandr is a Xinerama mode, the mouse and application windows move about the entire virtual screen, the physical monitors provide a display port view of a portion of that space. So if you want the laptop LCD and an external monitor to show different information the virtual size must be larger than the default.
- The Monitor and Device sections for Monitor-TV. The R60e does not have a TV out socket though the graphics chip provides this capability. Disabling the TV will prevent the screen of the external monitor blanking for a few seconds whenever the xrandr program is used. (Later versions of the Intel driver may have a fix for this problem.)
Using $ xrandr
There is a Graphical Configuration Tool, (displayconfig-gtk) included with {{Ubuntu 7.10. At present it dosn't work too well. If installing from a tribe 5 CD then this will be found in the menu: 'System: Administration: Screens and Graphics'. If you have been upgrading from earlier releases you may need to install from 'Applications: Add/Remove: System Tools'
The command line $ xrandr
however does work quite well. Note that Gnome places the menu bar on screen 0 and that limitations of the Intel chip and driver mean this Screen 0 (the external VGA monitor) will always be the default display if it is connected. This applies even if the external monitor is switched off but the cable connected: if you have a blank laptop monitor check if you have anything plugged in to the VGA port.
So, if you start X with an external monitor connected that will be the only display until you use xrandr to change things.
Open a terminal window to use the command line: 'Applications:Accessories:Terminal'
First look at the 'help' and 'man' pages.
$ xrandr --help
$ man xrandr
To query what we have (nothing connected to VGA)
$ xrandr -v
Server reports RandR version 1.2
$ xrandr -q
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 1920 x 1440
VGA disconnected (normal left inverted right)
LVDS connected 1024x768+0+0 (normal left inverted right) 304mm x 228mm
1024x768 60.0*+ 50.0
800x600 60.3
640x480 60.0 59.9
TV disconnected (normal left inverted right)
If you see the 'TV disconnected' line but have neither TV connector nor docking station (eg Thinkpad R60e) then add to the Monitor and Device sections of xorg.conf as noted above. This will prevent the external (VGA) flashing off for a few seconds every time xrandr is used. (Newer versions of the intel driver may fix this.)
With the external monitor connected, powered on and a Virtual 2624x2048
$ xrandr -q
Screen 0: minimum 320 x 200, current 2624 x 1200, maximum 2624 x 2048
VGA connected 1600x1200+1024+0 (normal left inverted right) 367mm x 275mm
1600x1200 60.0*+
1920x1440@60 60.0
1600x1200@60 60.0
640x480@60 60.0
640x480 60.0
LVDS connected 1024x768+0+0 (normal left inverted right) 304mm x 228mm
1024x768 60.0*+ 50.0
800x600 60.3
640x480 60.0 59.9
More information for bug reports
$ xrandr --verbose
$ xrandr --output LVDS --auto
gets two screens but both at 1600x1200 cloned
$ xrandr --output LVDS --mode 1024x768 --output VGA --off
gets laptop only at 1024x768
Without a virtual set in xorg.conf
$ xrandr --output VGA --right-of LVDS --mode 1600x1200
xrandr: screen cannot be larger than 1600x1600 (desired size 2624x1200)
$ xrandr --output VGA --mode 1600x1200 --pos 0x400
creates two screens with the laptop screen at bottom of the 1600x1600 window
$ xrandr --output LVDS --mode 1024x768 --pos 0x400
moves laptop screen to top of window, so both share same top line
$ xrandr --output VGA --mode 1600x1200 --pos 0x768
xrandr: screen cannot be larger than 1600x1600 (desired size 1600x1968)
edit xorg.conf and ensure we have Virtual 2048 2048. Try again and it works: we have a laptop screen in a virtual position at the top of a 2048x2048 frame with the VGA monitor below.
Next edit xorg.conf and set Virtual 2624 2048
$ xrandr --output VGA --mode 1600x1200 --pos 1024x0
- References
- VGA Analog VGA output
- LVDS Laptop panel
- RandR 1.2 protocol specifications
- Linux Graphics Drivers from Intel
- Ubuntu source for Intel
- FreeDesktop.org Xorg archive
- How video cards work
Screen Brightness control
In 7.04 there is a problem with the Fn+home Fn+End screen brightness controls Bug 87028.
The workaround is to disable video.o
echo blacklist video | sudo tee -a /etc/modprobe.d/local
Unfortunately this only fixes the blanking screen, using the Fn+Home and Fn+End provides values of bright and dim but no intermediate values Bug 61184. A fix has been posted. First check what you have
# lshal|grep smbios.system smbios.system.version = 'ThinkPad R60e' (string) smbios.system.product = '06574TG' (string) smbios.system.manufacturer = 'LENOVO' (string)
then edit /usr/share/hal/fdi/policy/10osvendor/10-laptop-panel-mgmt-policy.fdi
# sudo nano -w /usr/share/hal/fdi/policy/10osvendor/10-laptop-panel-mgmt-policy.fdi
The original release 7.04 had a <device> block for LENOVO that tested the version string for X, T, and Z model ThinkPads but not R. A subsequent update to hal has modified the file to <deviceinfo version="0.2"> and removed the Lenovo specific code. Add to the file
<device> <match key="info.category" string="laptop_panel"> <match key="/org/freedesktop/Hal/devices/computer:smbios.system.manufacturer" string="LENOVO"> <match key="/org/freedesktop/Hal/devices/computer:smbios.system.version" contains="ThinkPad R"> <merge key="laptop_panel.brightness_in_hardware" type="bool">true</merge> </match> </match> </match> </device>
save the file then
# sudo /etc/dbus-1/event.d/20hal restart
and restart X (Ctrl+Alt+Backspace) Note: the onscreen bar display will not display the changed level.
Sound
There is an option in the BIOS setup to disable the modem which seems a good idea if the modem is not needed. Do not do this, if the modem is disabled then sound will not work with Ubuntu (6.06 and Edgy knot2). (Sound does however work in WinXP with the modem disabled)
Mouse and TrackPoint
see How to configure the TrackPoint Note however that to modify sensitivity and scroll rate on R60e with Ubuntu 6.06 the commands are:
# echo -n 96 > /sys/devices/platform/i8042/serio0/speed # echo -n 200 > /sys/devices/platform/i8042/serio0/sensitivity
This needs to be typed in a root window; using sudo gives a permission denied.
Wireless
You need to install linux-restricted-modules-generic, which contains the kernel module ath_pci. ath_pci is loaded automatically at system startup.
Feisty (7.04) includes network-manager, although useful for roaming it dosn't work well for networks which do not broadcast ESSID.
Suspend-to-RAM
There seems to be a bug in edgy in relation to cpufreq governors. See Bug 70602 for details and a workaround.
Had to add following script to let the laptop go into supsend after the lid was closed:
#!/bin/sh #/etc/acpi/local/lid.sh.post grep -q closed /proc/acpi/button/lid/*/state if [ $? = 0 ] ; then /etc/acpi/sleep.sh fi
7.04 (Feisty)
Both Sleep (fn+4) and Hibernate (fn+12) appear to work.
Modem
If not used: see above re sound
If used: install mwave then it should work.
to be continued
Bluetooth [setup appears ok, untested due to lack of bluetooth device]
FnF2 lock Screen working
FnF3 Display Battery Condition
FnF4 Sleep can be configured in Gnome power save option, but seems to disable fn+F12 hibernate; 'blank screen' sets screensaver (6.04 Dapper). Works without additional configration (7.04 Feisty).
FnF5 toggle Wireless/Bluetooth on/off
FnF7 Switch Screen? (no ibm/hotkey shown with $ acpi_listen
only effective if cloned displays?)
FnF8 TrackPoint? No Effect (ibm/hotkey HKEY 00000080 00001008)
FnF9 (ibm/hotkey HKEY 00000080 00001009) (Easy Eject in WinXP)
FnF12 Suspend to disk, seems to work, but not entirely reliable, some scrambling of text console display during restart Sometimes restart hangs after reading disk, need to deactivate/reactivate wireless. (6.06 Dapper). Works ok? (7.04 Feisty).
FnHome screen brighter (ibm/hotkey HKEY 00000080 00001010) (see notes above to fix regressions since 6.06 Dapper)
FnEnd screen dims (no ibm/hotkey shown with $ acpi_listen
)
FnPgUp ThinkLight on/off
External Sources
- This guide is listed at the TuxMobil Linux laptop and notebook installation survey (IBM/Lenovo).