Difference between revisions of "Installing Ubuntu 9.10 (Karmic Koala) on a ThinkPad X61"

From ThinkWiki
Jump to: navigation, search
(Keys)
(Zoom key not seen by X)
Line 110: Line 110:
 
The "Zoom" key (Fn-Space) cannot be assigned a function in GNOME.
 
The "Zoom" key (Fn-Space) cannot be assigned a function in GNOME.
  
The key combination <i>is</i> seen and reported by ACPI.
+
The key combination <i>is</i> seen and reported by ACPI
 
<pre>
 
<pre>
 
$ acpi_listen
 
$ acpi_listen
 
ibm/hotkey HKEY 00000080 00001014
 
ibm/hotkey HKEY 00000080 00001014
 
</pre>
 
</pre>
 
+
but it does not show up in the output of <tt>input-events</tt>.
It does not show up in the output of <tt>input-events</tt>.
 
  
 
{{QUOTE|Steve Langasek|[https://bugs.launchpad.net/ubuntu/hardy/+source/linux/+bug/217504 Ubuntu bug report log 217504]|X can only handly 256 distinct keycodes due to a protocol limitation, and due to evdev the keycodes are now standardized to match the Linux input layer - with no keycode below 256 that could reasonably be substituted for KEY_ZOOM. As a workaround, you can add your own fdi file to /etc/hal/fdi/information that maps this key to a different keycode (see /usr/share/hal/fdi/information/10freedesktop/30-keymap-module-thinkpad-acpi.fdi for an example of how this is currently done).}}  
 
{{QUOTE|Steve Langasek|[https://bugs.launchpad.net/ubuntu/hardy/+source/linux/+bug/217504 Ubuntu bug report log 217504]|X can only handly 256 distinct keycodes due to a protocol limitation, and due to evdev the keycodes are now standardized to match the Linux input layer - with no keycode below 256 that could reasonably be substituted for KEY_ZOOM. As a workaround, you can add your own fdi file to /etc/hal/fdi/information that maps this key to a different keycode (see /usr/share/hal/fdi/information/10freedesktop/30-keymap-module-thinkpad-acpi.fdi for an example of how this is currently done).}}  

Revision as of 16:23, 26 November 2009

I installed Ubuntu 9.10 on the same ThinkPad X61 model 7673-CTO that I installed Ubuntu 8.10 on last year.

This time I installed from DVD+R using the Ultrabay Slim Multi-Burner III Drive in the UltraBase X6.

In the coming days I will test various features and extend this page.

DMI info for this model

# dmidecode -s system-manufacturer
LENOVO
# dmidecode -s system-product-name
7673CTO
# dmidecode -s system-version
ThinkPad X61

Kernel misdetects memory

Right at the beginning there was an important obstacle to overcome. The installed kernel would panic on boot.

I ran memtest+ from the installation disc to see if I had a memory problem. It reported errors above 4 GiB. That's odd, because I only have 4 GiB of RAM installed.

I surmised that the new kernel, version 2.6.31-14-generic-pae, errs in reckoning the amount of installed RAM. And indeed, the solution to the kernel panic was to add mem=4096M to the kernel boot parameter list.

Adding the tp-smapi module

$ sudo aptitude install tp-smapi-source
$ sudo module-assistant build tp-smapi-source
$ sudo module-assistant install tp-smapi-source
$ sudo modprobe thinkpad_ec tp_smapi hdaps

Edit the file /etc/modules to add these lines:

 thinkpad_ec
 tp_smapi
 hdaps

Ubuntu 9.10 contains version 0.40 of tp-smapi.

There is currently (19 November 2009) no hdaps-utils package in Karmic and so no hdaps-gl application.

Increasing battery life

To make the battery last longer by reducing the number and depth of charge cycles, edit /etc/sysfs.conf to add the lines:

 # Make battery live longer
 devices/platform/smapi/BAT0/start_charge_thresh = 50
 devices/platform/smapi/BAT0/stop_charge_thresh = 90

To effect the change either reboot or do:

$ sudo su 
# echo 50 > /sys/devices/platform/smapi/BAT0/start_charge_thresh
# echo 90 > /sys/devices/platform/smapi/BAT0/stop_charge_thresh

Docking

The ThinkPad X61 can be docked in the UltraBase X6.

Unlike with the previous versions of Ubuntu, if the X61 is removed from the UltraBase X6 then the X61 does not freeze.

However, I find that when the X61 is returned to the UltraBase the USB devices attached to the UltraBase do not work.

No /proc/acpi/ibm/dock

As with Intrepid and Jaunty the file /proc/acpi/ibm/dock does not exist even though the thinkpad-acpi module is loaded and the X61 is booted while docked in the UltraBase X6. So, instructions in the thinkpad-acpi README and elsewhere that make reference to this file cannot be followed.

/sys/devices/platform/dock.*

Under /sys/devices/platform there are directories dock.0 through dock.3 with these contents:

/sys/devices/platform$ ls -l dock.0
total 0
-r--r--r-- 1 root root 4096 2009-11-22 18:59 docked
-r--r--r-- 1 root root 4096 2009-11-22 19:22 flags
-r--r--r-- 1 root root 4096 2009-11-22 19:22 modalias
drwxr-xr-x 2 root root    0 2009-11-22 19:22 power
lrwxrwxrwx 1 root root    0 2009-11-22 18:59 subsystem -> ../../../bus/platform
-r--r--r-- 1 root root 4096 2009-11-22 19:22 type
-rw-r--r-- 1 root root 4096 2009-11-22 19:59 uevent
-r--r--r-- 1 root root 4096 2009-11-22 19:22 uid
--w------- 1 root root 4096 2009-11-22 19:22 undock

Surprisingly, the content of the docked file does not depend on whether or not the machine is docked in the Ultrabase X6.

docked contents
n content
0 1
1 0
2 1
3 1

/proc/acpi/ibm/bay

Formerly when the thinkpad_acpi module was loaded there was a /proc/acpi/ibm/bay file with the following contents (with the X61 docked in the UltraBase X6 with a Ultrabay Slim Multi-Burner III Drive in the Ultrabay Slim port).

# cat bay
status:         occupied
commands:       eject

However, this file no longer exists in Karmic.

Keys

Zoom key not seen by X

The "Zoom" key (Fn-Space) cannot be assigned a function in GNOME.

The key combination is seen and reported by ACPI

$ acpi_listen
ibm/hotkey HKEY 00000080 00001014

but it does not show up in the output of input-events.

Steve Langasek wrote on Ubuntu bug report log 217504:
X can only handly 256 distinct keycodes due to a protocol limitation, and due to evdev the keycodes are now standardized to match the Linux input layer - with no keycode below 256 that could reasonably be substituted for KEY_ZOOM. As a workaround, you can add your own fdi file to /etc/hal/fdi/information that maps this key to a different keycode (see /usr/share/hal/fdi/information/10freedesktop/30-keymap-module-thinkpad-acpi.fdi for an example of how this is currently done).

Bug report: https://bugs.launchpad.net/ubuntu/hardy/+source/linux/+bug/267682

Table of keycodes for special keys and key combinations in Karmic

For input-events the following command was used:

# input-events 4
/dev/input/event4
   bustype : BUS_I8042
   vendor  : 0x1
   product : 0x1
   version : 43860
   name    : "AT Translated Set 2 keyboard"
   phys    : "isa0060/serio0/input0"
   bits ev : EV_SYN EV_KEY EV_MSC EV_LED EV_REP

waiting for events

The suffix "(*)" indicates that the value has changed since Ubuntu 8.10.

key combination extra function symbol showkey scancode showkey keycode input-events acpi_listen xev GNOME keyboard shortcuts
⟦◁̸ (loudspeaker icon with stroke) down: e0 20
up: e0 a0
113 KEY_MIN_INTERESTING (*) (none) 121 XF86AudioMute
⟦◁ ▾ (loudspeaker icon, down arrow) down: e0 2e
up: e0 ae
114 KEY_VOLUMEDOWN (*) (none) 122 XF86AudioLowerVolume
⟦◁ ▴ (loudspeaker icon, up arrow) down: e0 30
up: e0 b0
115 KEY_VOLUMEUP (*) (none) 123 XF86AudioRaiseVolume
ThinkVantage down: e0 1f e0 9f 148 (*) (none) (*) ibm/hotkey HKEY 00000080 00001018 156 XF86Launch1
Fn up: e0 63 e0 e3 143 KEY_WAKEUP (*) (none) 151 XF86WakeUp
Fn-F1 (none) 466 (none) (*) ibm/hotkey HKEY 00000080 00001001 (none) (none)
Fn-F2 padlock down: e0 12 e0 92 152 (none) (*) ibm/hotkey HKEY 00000080 00001002 160 (*) XF86ScreenSaver
Fn-F3 battery down: e0 71 e0 f1 236 (none) (*) ibm/hotkey HKEY 00000080 00001003 244 (*) XF86Battery (*)
Fn-F4 down: e0 5f e0 df
(but sometimes nothing?)
142 (none) (*) ibm/hotkey HKEY 00000080 00001004 150 (*) XF86Sleep
Fn-F5 radiating computer down: e0 73 e0 f3 238 (*) (none) (*) ibm/hotkey HKEY 00000080 00001005 246 (*) XF86WLAN (*)
Fn-F6 (none) 471 (none) (*) ibm/hotkey HKEY 00000080 00001006 (none) (none)
Fn-F7 screen, line, computer down: e0 56 e0 d6 227 (none) (*) ibm/hotkey HKEY 00000080 00001007 235 (*) XF86Display (*)
Fn-F8 trackpoint, line, trackpad down: e0 79 e0 f9 192 (none) (*) ibm/hotkey HKEY 00000080 00001008 200 (*) 0xc8 (*)
Fn-F9 computer, ⏏ down: 6f ef 194 (none) (*) ibm/hotkey HKEY 00000080 00001009 202 (*) 0xc9 (*)
Fn-F10 down: e0 63
up: e0 e3
143 KEY_WAKEUP (*) (none) 151 (*) XF86WakeUp
Fn-F11 (none) 476 (none) (*) ibm/hotkey HKEY 00000080 0000100b (none) (none)
Fn-F12 screen, arrow, diskpack down: e0 25 e0 a5
(but sometimes nothing?)
205 (none) (*) ibm/hotkey HKEY 00000080 0000100c 213 (*) XF86Suspend (*)
Fn-Home ☀▴ down: e0 54 e0 d4 225 (none) (*) video LCD0 00000086 00000000 (*) 233 (*) XF86MonBrightnessUp
Fn-End ☀▾ down: e0 4c e0 cc 224 (none) (*) video LCD0 00000087 00000000 (*) 232 (*) XF86MonBrightnessDown
Fn-PgUp illuminated overhead lamp (none) (none) (none) (none) (none) (none)
Fn-Space screen with magnifying glass ("zoom" symbol) (none) 372 (none) (*) ibm/hotkey HKEY 00000080 00001014 (none) (none)
Fn- barred right arrowhead ("next" symbol) down: e0 19
up: e0 99
163 KEY_NEXTSONG (*) (none) 171 XF86AudioNext
Fn- right arrowhead, double bar ("play/pause" symbol) down: e0 22
up: e0 a2
164 KEY_PLAYPAUSE (*) (none) 172 XF86AudioPlay
Fn- barred left arrowhead ("prev" symbol) down: e0 10
up: e0 90
165 KEY_PREVIOUSSONG (*) (none) 173 XF86AudioPrev
Fn- ∎ ("stop play" symbol) down: e0 24
up: e0 a4
166 KEY_STOPCD (*) (none) 174 XF86AudioStop
◂ ⎗ (left arrowhead, page icon) down: e0 6a
up: e0 ea
158 KEY_BACK (*) (none) 166 XF86Back
⎘ ▸ (page icon, right arrowhead) down: e0 69
up: e0 e9
159 KEY_FORWARD (*) (none) 167 XF86Forward

Hotkey mask when the above table was compiled:

$ cat /sys/devices/platform/thinkpad_acpi/hotkey_mask
0x00fdffff
$ cat /sys/devices/platform/thinkpad_acpi/hotkey_all_mask
0x00ffffff
$ cat /sys/devices/platform/thinkpad_acpi/hotkey_recommended_mask
0x008c7fff
$ cat /sys/devices/platform/thinkpad_acpi/hotkey_report_mode
1

Compare Default meanings of special keys.

Suspend & resume

In Intrepid suspend & resume was unusable because the machine frequently hung sometime after resume. Furthermore the WLAN card was unusable after resume.

Having tried it only once I can report that in Karmic suspend & resume does work properly. After resume the Atheros WLAN card is re-enabled and NetworkManager reconnects to my wireless network. That's progress!

No beep

After installation the system beep does not work. In Intrepid this could be fixed by starting the Volume Control application and unmuting Beep.

In Karmic that application does not appear to exist so I don't know how to unmute the beep. Investigating....