Installing Kubuntu8.04 KDE 4.1 remix on a ThinkPad X60s
Contents
- 1 Installation of Kubuntu 8.04 KDE 4.1 remix on a ThinkPad X60s
- 1.1 Summary
- 1.2 Installation
- 1.3 Fixes after installation
- 1.3.1 KDE 4.1 repository
- 1.3.2 Change the KDE menu back to classic mode
- 1.3.3 Turn on desktop effects
- 1.3.4 Fonts
- 1.3.5 Fonts for KDE3 apps
- 1.3.6 Fonts for apps which run with root permissions
- 1.3.7 Terminal Settings
- 1.3.8 Grub boot screen
- 1.3.9 Sound
- 1.3.10 Hotkey problem
- 1.3.11 Hibernate
- 1.3.12 Bluetooth
- 1.3.13 HDAPS
- 2 External Sources
Installation of Kubuntu 8.04 KDE 4.1 remix on a ThinkPad X60s
Summary
What works out of the box
- Graphics card incl 3D acceleration
- Wifi (incl with KNetworkManager)
- Suspend to RAM
- CPU scaling
- Sound
- Volume and mute keys (but no visual feedback)
- Thinklight keyboard illumination key (Fn+PgUp)
- VGA out to external monitor (plug in, restart X, use KRandRTray to control the two displays)
- SDHC card reader
- USB
- Ethernet
What needs to be fixed
- Hibernate / Suspend to DISK
- Fn keys (e.g. brightness controls) generate ACPI events, but acpi_fakekey is broken
What has not yet been tested
- Infrared
- Modem
- TPM
- PCMCIA
- Integrated fingerprint reader (sudo apt-get install thinkfinger-tools)
Installation
Back up everything you don't want to lose.
Update the BIOS if you're comfortable with doing that. In BIOS turn on virtualisation options VT and VT-d (full virtualisation using the kernel-based virtual machine kvm -- confirmed working!)
Installation was done from a USB CD/DVD drive from the Kubuntu 8.04 Live CD (KDE 4 remix) from kubuntu.org. You can do the partitioning using the live CD (there is an auto or manual partitioning tool in the installer, but you could also use fdisk or QTparted also). In particular take care if you want to keep the preinstalled Windows XP and Windows recovery partitions (or blow them away if you don't -- feels good doesn't it?). In any case you need to reduce the size of the Windows XP partition (perhaps to zero) to free some space, and create new partitions for Kubuntu and a swap partition (at least as large as the installed RAM so that suspend to disk can work). Previously the laptop had been booted into Windows so the FAT32 partition would get converted into NTFS.
Fixes after installation
KDE 4.1 repository
The KDE 4 remix cd gives you KDE 4.0, but KDE 4.1 is considerably better, so change this right away:
Add "deb http://ppa.launchpad.net/kubuntu-members-kde4/ubuntu hardy main" to the file /etc/apt/sources.list. Then type
sudo apt-get update && sudo apt-get dist-upgrade
and answer the questions in which you are prompted. If you do not have kubuntu-kde4-desktop installed, simply type
sudo apt-get update && sudo apt-get install kubuntu-kde4-desktop
and answer the questions. Both of these options are to be typed at the command prompt.
Install kdeplasma-addons
sudo apt-get install kdeplasma-addons
Restart KDE for the improved KDE 4.1 desktop.
Upgrade all other software to the latest version with apt-get or adept-manager.
Make your life easier -- right click on the KDE menu icon and click "Switch to Classic Menu Style". You might need to unlock the widgets on the panel first.
Turn on desktop effects
The X60s is capable of running the beautiful Kwin compositing effects, so in System Settings click Desktop then Desktop Effects / General tab click "Enable Desktop Effects".
Fonts
By default the fonts look good, but it's worth learning how to make them absolutely perfect. It's not hard. The X60s is capable of displaying pin-sharp fonts, so don't accept any fuzzy antialiasing.
In System Settings/Font Installer you may want to install the true-type fonts from your Windows partition in the Fonts directory (do it system wide with the Administrator mode).
Then in System Settings/Appearance/Fonts, set all fonts to Tahoma 8 point (except fixed font = Courier New 8 point) and set "Use-antialiasing"=disabled, "Force Fonts DPI"=96 DPI (the LCD is actually 106x105 DPI, but at small sizes the number of pixels available for each character has a significant effect on the rendering -- Tahoma 8 looks good at 96 DPI).
In Konqueror choose the best TT fonts in Settings/Configure Konqueror, and set minimum font size=7, medium font size=8.
Now restart KDE to see the difference.
See also Optimal Use of Fonts on Linux and this font discussion.
Fonts for KDE3 apps
KDE3 apps (for example KNetworkManager) may still not have the correct fonts in KDE4. Try adding the following to ~/.kde/share/config/kdeglobals:
[General] fixed=Courier New,8,-1,5,50,0,0,0,0,0 font=Tahoma,8,-1,5,50,0,0,0,0,0 menuFont=Tahoma,8,-1,5,50,0,0,0,0,0 taskbarFont=Tahoma,8,-1,5,50,0,0,0,0,0 toolBarFont=Tahoma,8,-1,5,50,0,0,0,0,0
and create ~/.kde/share/config/kcmfonts
[General] dontChangeAASettings=false forceFontDPI=96
Fonts for apps which run with root permissions
For example adept-manager (which is also a KDE3 app). First set the fonts with
kdesudo /usr/lib/kde4/bin//systemsettings
and for KDE3 apps also set up /root/.kde/share/config/kdeglobals and /root/.kde/share/config/kcmfonts as above.
Terminal Settings
In ~/.bashrc, uncommment the following line for a colour prompt:
force_color_prompt=yes
Get the version of vim with colour syntax highlighting:
sudo apt-get install vim
and in /etc/vim/vimrc uncomment the line
syntax on
Grub boot screen
When you are happy with the way GRUB boots (and your usual OS is first in the list) then shorten the timeout in /boot/grub/menu.lst so that it boots up faster:
timeout 2
Uncomment the following line for a colour boot screen:
color cyan/blue white/blue
Sound
In System Settings / Sound move the AD198x Digital #1 output up to the top preference for the sound outputs if necessary.
Hotkey problem
ACPI events from the Fn keys are seen properly in /var/log/acpid and feed through into the files in /etc/acpi which generate acpi_fakekey calls, which are then lost. See this launchpad page. It's best to use the default ubuntu kernels (i.e. NOT MarcoBazzani's patched kernel binaries!) unless you are compiling your own stock kernels anyway. Fix it another way, for example like this for Fn+F4 suspend and Fn+F12 hibernate -- hooking up directly to the sleep and hibernate scripts.
cd /etc/acpi sudo mv sleepbtn.sh{,.orig} sudo mv hibernatebtn.sh{,.orig} sudo ln -s sleep{,btn}.sh sudo ln -s hibernate{,btn}.sh
The brightness keys can be fixed in a similar way with a couple of scripts which change the LCD brightness instead of calling acpi_fakekey:
sudo mv video_brightnessup.sh{,.orig} sudo mv video_brightnessdown.sh{,.orig}
and edit video_brightnessup.sh like this:
#!/bin/bash BRIGHTNESS_OUTPUT="/proc/acpi/video/VID/LCD0/brightness" CURRENT=$(grep "current:" $BRIGHTNESS_OUTPUT |awk '{print $2}') case "$CURRENT" in 100) echo -n 100 > $BRIGHTNESS_OUTPUT; ;; 90) echo -n 100 > $BRIGHTNESS_OUTPUT; ;; 80) echo -n 90 > $BRIGHTNESS_OUTPUT; ;; 70) echo -n 80 > $BRIGHTNESS_OUTPUT; ;; 60) echo -n 70 > $BRIGHTNESS_OUTPUT; ;; 50) echo -n 60 > $BRIGHTNESS_OUTPUT; ;; 40) echo -n 50 > $BRIGHTNESS_OUTPUT; ;; 30) echo -n 40 > $BRIGHTNESS_OUTPUT; ;; *) #default case echo -n 100 > $BRIGHTNESS_OUTPUT; ;; esac
and video_brightnessdown.sh like this
#!/bin/bash BRIGHTNESS_OUTPUT="/proc/acpi/video/VID/LCD0/brightness" CURRENT=$(grep "current:" $BRIGHTNESS_OUTPUT |awk '{print $2}') case "$CURRENT" in 100) echo -n 90 > $BRIGHTNESS_OUTPUT; ;; 90) echo -n 80 > $BRIGHTNESS_OUTPUT; ;; 80) echo -n 70 > $BRIGHTNESS_OUTPUT; ;; 70) echo -n 60 > $BRIGHTNESS_OUTPUT; ;; 60) echo -n 50 > $BRIGHTNESS_OUTPUT; ;; 50) echo -n 40 > $BRIGHTNESS_OUTPUT; ;; 40) echo -n 30 > $BRIGHTNESS_OUTPUT; ;; 30) echo -n 30 > $BRIGHTNESS_OUTPUT; ;; *) #default case echo -n 100 > $BRIGHTNESS_OUTPUT; ;; esac
And immediately you will find that Fn+Home and Fn+End move the brightness up and down correctly.
If the problem with acpi_fakekey is ever fixed, just restore the original files.
By the way if you ever want to use laptop mode for this, note that the value of $BRIGHTNESS_OUTPUT in that file should be "/proc/acpi/video/VID/LCD0/brightness" not "/proc/acpi/video/VID/LCD/brightness".
Other Fn keys for which scripts could be written:
Fn+F2: lock screen --> could set this to do the KDE screen lock Fn+F3: show a battery display (cat /proc/acpi/battery/BAT0/info) Fn+F5: working I think, cycling Wifi and Bluetooth on/off. Feedback? BT LED lights. Fn+F7: should switch which screens are on VGA->LCD+VGA->LCD (use /proc/acpi/ibm/video ?) Fn+F8: ? mouse utility, ?switch between the rubber mouse and touchpad (non-existent on X60s) Fn+F9: ? start utility Fn+spacebar: screen zoom
Hibernate
Failing for me. Suspend works.
Bluetooth
Fn+F5 cycles Bluetooth and Wifi on/off. There's a new version in development for KDE4, but the KDE3 kdebluetooth seems to work for OBEX file transfer.
sudo apt-get install kdebluetooth
HDAPS
Hard disk active protection system. Load the relevant modules (see Tp_smapi):
sudo modprobe tp_smapi sudo modprobe hdaps_ec
Then to see your laptop position:
sudo apt-get install hdaps-utils hdaps-gl