Difference between revisions of "Installing Gentoo on a ThinkPad X60 Tablet"

From ThinkWiki
Jump to: navigation, search
(Touch Screen)
(Gentoo General: suspend2-sources no longer exist. They are now tuxonice-sources.)
 
(23 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
= Gentoo General =
 
= Gentoo General =
When installing gentoo make shure to use the suspend2-sources instead of the gentoo-sources,
 
and that the USE flags are set correctly.
 
In {{path|/etc/make.conf}}:
 
VIDEO_CARDS="i810 vesa"
 
INPUT_DEVICES="keyboard mouse wacom"
 
# X60
 
USE="$USE acpi fbsplash hdaps"
 
Now you can emerge the suspend2-sources, which will enable the nice splash when booting the machine.
 
emerge suspend2-sources
 
  
 
Some general apps are needed, these are installed:
 
Some general apps are needed, these are installed:
Line 19: Line 10:
 
  rc-update add hdapsd default
 
  rc-update add hdapsd default
 
  /etc/init.d/hdapsd start
 
  /etc/init.d/hdapsd start
CONFIG_NVRAM
 
tpb
 
  
 
= Sound =
 
= Sound =
 +
NOTE: If you get an hda_intel probe error on boot, you have to enable modem support in bios (don't ask why!).
 +
 
In the kernel configuration:
 
In the kernel configuration:
 
  Device Drivers  --->
 
  Device Drivers  --->
Line 53: Line 44:
  
 
Get the rotate script from ref. A, and make some adjustments:
 
Get the rotate script from ref. A, and make some adjustments:
  cd /usr/bin
+
  cd /usr/local/bin
 
  wget http://luke.no-ip.org/x60tablet/examples/rotate
 
  wget http://luke.no-ip.org/x60tablet/examples/rotate
 
  chmod +x rotate
 
  chmod +x rotate
Line 63: Line 54:
  
 
Put yourself into the wheel group, and setup sudo to make you run xsetwacom without password.
 
Put yourself into the wheel group, and setup sudo to make you run xsetwacom without password.
 +
 +
{{HINT|For the compiz-fusion to work you will need to start it like this:
 +
<nowiki>LIBGL_ALWAYS_INDIRECT=true compiz-fusion --replace --indirect-rendering ccp</nowiki>}}
  
 
TODO: xhost +
 
TODO: xhost +
Line 75: Line 69:
 
     <*> User level driver support
 
     <*> User level driver support
 
   USB support  --->
 
   USB support  --->
   <*> Wacom Intuos/Graphire tablet support
+
   < > Wacom Intuos/Graphire tablet support
 +
 
 +
The Wacom Intus/Graphire USB Tablet should not be activated, the X60 Tablet is not an USB device.
  
 
Emerge setserial;
 
Emerge setserial;
Line 81: Line 77:
 
and add the following (magic) line to {{path|/etc/conf.d/local.start}}:
 
and add the following (magic) line to {{path|/etc/conf.d/local.start}}:
 
  setserial /dev/ttyS0 port 0x0200 irq 5 autoconfig
 
  setserial /dev/ttyS0 port 0x0200 irq 5 autoconfig
 +
 +
If you get 'Cannot set serial info: Invalid argument' your kernel may have slightly broken serial support (suspend2-sources-2.6.22-r2, gentoo-sources-2.6.22-r5), this is fixed in gentoo-sources-2.6.22-r9.
 +
 +
{{WARN|Xorg 7.3 works with current linuxwacom (0.7.8-3, 0.7.9-1), but in a strange way. Keep Xorg 7.2 unless you are going to use your pen only as mouse and only in the normal rotation.}}
 +
'''Re to ATTENTION!''' I reply to myself. In the linuxwacom 0.7.8 branch they added the support for the multitouch feature. However this "feature" makes the usage of pen almost impossible (see [http://sourceforge.net/forum/forum.php?thread_id=1777969&forum_id=236872 this forum]). I prepared a patch which removes this feature and wrote an ebuild which can apply this patch: [https://bugs.gentoo.org/show_bug.cgi?id=147537 Bugzilla Bug 147537]. However still I have small problems in Xorg 7.3: [http://sourceforge.net/tracker/index.php?func=detail&aid=1823908&group_id=69596&atid=525124 bug 1823908]
  
 
Now add the following lines to your xorgcfg generated {{path|/etc/X11/xorg.conf}}:
 
Now add the following lines to your xorgcfg generated {{path|/etc/X11/xorg.conf}}:
Line 110: Line 111:
 
  InputDevice    "Eraser" "SendCoreEvents"
 
  InputDevice    "Eraser" "SendCoreEvents"
  
TODO: xournal
+
=== Xournal ===
 +
The ebuild in [http://bugs.gentoo.org/show_bug.cgi?id=143177 Bug 143177] works fine for verion 0.4.1
 +
 
 +
== Touch Screen ==
  
It works for me with Xorg 7.3 (xserver 1.4) from the box. I just occasioanlly discovered that it works. One of the reasons may be that I deleted all "InputDevice" section from the xorg.conf except the ones for the wacom pen. My ServerLayout looks like this:
+
It works for me from the box. I just unexpectedly discovered that it works. However in the "left" and "right" rotations of the screen the pointer appears approximately 3cm from the touch point. I do not know how to solve this.
  
Section "ServerLayout"
+
However it causes a lot of problem so I prepared a sollution (see the reply to attention above: [http://www.thinkwiki.org/wiki/installing_Gentoo_on_a_ThinkPad_X60_Tablet#Pen]).
        Identifier      "Default Layout"
 
        Screen          0      "SCRint" 0 0
 
        InputDevice    "Cursor" "SendCoreEvents"
 
        InputDevice    "Stylus" "SendCoreEvents"
 
        InputDevice    "Eraser" "SendCoreEvents"
 
        Option          "AIGLX" "true"
 
EndSection
 
  
 
== Trackpoint ==
 
== Trackpoint ==
Line 140: Line 137:
 
All left is to read your fingerprint for your user. Run tf-tool --add-user <login>, then reboot and see if it works.
 
All left is to read your fingerprint for your user. Run tf-tool --add-user <login>, then reboot and see if it works.
 
If using gdm, it should work smoothly.
 
If using gdm, it should work smoothly.
 +
 +
==Thinkpad buttons==
 +
You can enable them in the kernel either built-in or as a module:
 +
 +
Location:                                                            │
 +
  -> Device Drivers                                                  │
 +
    -> Character devices
 +
      <M> /dev/nvram support
 +
 +
In case you chose the module you will need to autoload it since it is not loaded by the udev:
 +
  echo nvram >> /etc/modules.autoload.d/kernel-2.6
 +
 +
By default the /dev/nvram device is configured for root only access. In order to change it permanentely add the corresponding rule to udev. For example I did:
 +
  echo "KERNEL==\"nvram\", GROUP=\"users\"" >> /etc/udev/rules.d/50-local.rules
 +
 +
After that you can either configure them using app-laptop/tpb or KDE user can relay on the KMilo application configurable in the
 +
"Control Center -> System Administration -> IBM Thinkpad Laptop".
  
 
= Network =
 
= Network =
Line 163: Line 177:
 
  Networking  --->
 
  Networking  --->
 
   <*> Generic IEEE 802.11 Networking Stack
 
   <*> Generic IEEE 802.11 Networking Stack
   <*> IEEE 802.11i CCMP support
+
   <M> IEEE 802.11i CCMP support
   <*> IEEE 802.11i TKIP encryption
+
   <M> IEEE 802.11i TKIP encryption
  
 
Now, emerge ipw3945, wireless-tools > 22 and wpa_supplicant, and add ipw3945d to the default runlevel by issuing:
 
Now, emerge ipw3945, wireless-tools > 22 and wpa_supplicant, and add ipw3945d to the default runlevel by issuing:
Line 199: Line 213:
 
and configure your display name in the device section in {{path|/etc/bluetooth/hcid.conf}}:
 
and configure your display name in the device section in {{path|/etc/bluetooth/hcid.conf}}:
 
  name "Your Displayname"
 
  name "Your Displayname"
 +
 +
Now we are ready to start
 +
rc-update add bluetooth default
 +
/etc/init.d/bluetooth start
  
 
= External Connections =
 
= External Connections =
Line 221: Line 239:
  
 
B) [http://www.comptechdoc.org/os/linux/howlinuxworks/linux_hlkeycodes.html] Keycode Table
 
B) [http://www.comptechdoc.org/os/linux/howlinuxworks/linux_hlkeycodes.html] Keycode Table
 +
 +
 +
[[Category:Gentoo]]

Latest revision as of 15:08, 10 May 2008

Gentoo General

Some general apps are needed, these are installed:

emerge thinkpad
echo "thinkpad" >> /etc/modules.autoload.d/kernel-2.6

TODO:

echo "app-laptop/hdapsd" >> /etc/portage/package.keywords
emerge hdapsd app-laptop/tp_smapi
rc-update add hdapsd default
/etc/init.d/hdapsd start

Sound

NOTE: If you get an hda_intel probe error on boot, you have to enable modem support in bios (don't ask why!).

In the kernel configuration:

Device Drivers  --->
 Sound  --->
  Advanced Linux Sound Architecture  --->
   PCI devices  --->
    <*> Intel HD Audio

Now emerge alsa-utils and add alsasound to the default runlevel:

emerge -av alsa-utils
rc-update add alsasound default
/etc/init.d/alsasound start

Unmute the sound using alsamixer by pressing the m key on the Master and PCM sliders (MM=Muted / 00=Not muted)

Display

In the kernel configuration:

Device Drivers  --->
 Character devices  --->
  <*> Direct Rendering Manager
   <*> Intel 830M, 845G, 852GM, 855GM, 865G (i915 driver)  --->

Now run xorgcfg which should start smoothly. Do your personal changes (none), and save the files to their default location. Edit /etc/X11/xorg.conf and add the following lines:

Section "dri"
   Mode 0666
EndSection

Now for the rotation to work, we need to emerge some stuff, and make some editing. First, emerge some apps (note: wee need linuxwacom >= 0.7.8)

echo "x11-drivers/linuxwacom" >> /etc/portage/package.keywords
emerge linuxwacom sudo xhost xrandr

Get the rotate script from ref. A, and make some adjustments:

cd /usr/local/bin
wget http://luke.no-ip.org/x60tablet/examples/rotate
chmod +x rotate
sed "s/cursor/Cursor/" -i rotate
sed "s/stylus/Stylus/" -i rotate
sed "s/eraser/Eraser/" -i rotate
sed 's/"%s set %s Rotate %s"/"sudo su -c \\"DISPLAY=:0.0 %s set %s Rotate %s\\""/' -i rotate
sed "s/'normal': 'NONE', 'left': 'CCW', 'right': 'CW', 'inverted': 'HALF'/'normal': '0', 'left': '2', 'right': '1', 'inverted': '3'/" -i rotate

Put yourself into the wheel group, and setup sudo to make you run xsetwacom without password.

Hint:
For the compiz-fusion to work you will need to start it like this:
LIBGL_ALWAYS_INDIRECT=true compiz-fusion --replace --indirect-rendering ccp

TODO: xhost +

Input

Pen

In the kernel configuration:

Device Drivers  --->
 Input device support  --->
  <*> Event interface
  [*] Miscellaneous devices  --->
   <*> User level driver support
 USB support  --->
  < > Wacom Intuos/Graphire tablet support

The Wacom Intus/Graphire USB Tablet should not be activated, the X60 Tablet is not an USB device.

Emerge setserial;

emerge setserial

and add the following (magic) line to /etc/conf.d/local.start:

setserial /dev/ttyS0 port 0x0200 irq 5 autoconfig

If you get 'Cannot set serial info: Invalid argument' your kernel may have slightly broken serial support (suspend2-sources-2.6.22-r2, gentoo-sources-2.6.22-r5), this is fixed in gentoo-sources-2.6.22-r9.

ATTENTION!
Xorg 7.3 works with current linuxwacom (0.7.8-3, 0.7.9-1), but in a strange way. Keep Xorg 7.2 unless you are going to use your pen only as mouse and only in the normal rotation.

Re to ATTENTION! I reply to myself. In the linuxwacom 0.7.8 branch they added the support for the multitouch feature. However this "feature" makes the usage of pen almost impossible (see this forum). I prepared a patch which removes this feature and wrote an ebuild which can apply this patch: Bugzilla Bug 147537. However still I have small problems in Xorg 7.3: bug 1823908

Now add the following lines to your xorgcfg generated /etc/X11/xorg.conf:

Section "InputDevice"
   Identifier  "Cursor"
   Driver      "wacom"
   Option      "Device" "/dev/ttyS0"
   Option      "Type" "cursor"
   Option      "ForceDevice" "ISDV4"
EndSection
Section "InputDevice"
   Identifier  "Stylus"
   Driver      "wacom"
   Option      "Device" "/dev/ttyS0"
   Option      "Type" "stylus"
   Option      "ForceDevice" "ISDV4"
EndSection
Section "InputDevice"
   Identifier  "Eraser"
   Driver      "wacom"
   Option      "Device" "/dev/ttyS0"
   Option      "Type" "eraser"
   Option      "ForceDevice" "ISDV4"
EndSection

And the following three lines in the end of the ServerLayout section:

InputDevice    "Cursor" "SendCoreEvents"
InputDevice    "Stylus" "SendCoreEvents"
InputDevice    "Eraser" "SendCoreEvents"

Xournal

The ebuild in Bug 143177 works fine for verion 0.4.1

Touch Screen

It works for me from the box. I just unexpectedly discovered that it works. However in the "left" and "right" rotations of the screen the pointer appears approximately 3cm from the touch point. I do not know how to solve this.

However it causes a lot of problem so I prepared a sollution (see the reply to attention above: [1]).

Trackpoint

Works.

Fingerprint Reader

This actually is surprisingly easy to make work:) Just emerge thinkfinger >= 0.3;

echo "sys-auth/thinkfinger" >> /etc/portage/package.keywords
emerge thinkfinger

and add the following line in /etc/pam.d/system-auth:

auth       sufficient   pam_thinkfinger.so

The first section in the file should now look like the following:

auth       required     pam_env.so
auth       sufficient   pam_thinkfinger.so
auth       sufficient   pam_unix.so try_first_pass likeauth nullok

All left is to read your fingerprint for your user. Run tf-tool --add-user <login>, then reboot and see if it works. If using gdm, it should work smoothly.

Thinkpad buttons

You can enable them in the kernel either built-in or as a module:

Location:                                                             │
  -> Device Drivers                                                   │
    -> Character devices
     <M> /dev/nvram support

In case you chose the module you will need to autoload it since it is not loaded by the udev:

 echo nvram >> /etc/modules.autoload.d/kernel-2.6

By default the /dev/nvram device is configured for root only access. In order to change it permanentely add the corresponding rule to udev. For example I did:

 echo "KERNEL==\"nvram\", GROUP=\"users\"" >> /etc/udev/rules.d/50-local.rules

After that you can either configure them using app-laptop/tpb or KDE user can relay on the KMilo application configurable in the

"Control Center -> System Administration -> IBM Thinkpad Laptop".

Network

Ethernet

In the kernel configuration:

Device Drivers  --->
 Network device support  --->
  Ethernet (1000 Mbit)  --->
   <*> Intel(R) PRO/1000 Gigabit Ethernet support

Configure the ethernet card in /etc/conf.d/net:

config_eth0="dhcp"
eth0_dhcpcd="-t 4"

Wireless

Note: Make sure that the hardware disable-switch isn't disabled - it is placed at the front/bottom of the laptop (don't make the same mistake as i did!)

In the kernel configuration:

Device Drivers  --->
 Network device support  --->
  Wireless LAN (non-hamradio)  --->
   [*] Wireless LAN drivers (non-hamradio) & Wireless Extensions
Networking  --->
 <*> Generic IEEE 802.11 Networking Stack
  <M> IEEE 802.11i CCMP support
  <M> IEEE 802.11i TKIP encryption

Now, emerge ipw3945, wireless-tools > 22 and wpa_supplicant, and add ipw3945d to the default runlevel by issuing:

echo "net-wireless/wireless-tools" >> /etc/portage/package.keywords
emerge ipw3945 wireless-tools wpa_supplicant
rc-update add ipw3945d default
/etc/init.d/ipw3945d start

Configure the wireless card in /etc/conf.d/net:

config_eth1="dhcp"
eth1_dhcpcd="-t 4"
eth1_modules="wpa_supplicant"
wpa_supplicant_eth1="-Dwext"

If you are a kismet user it should be configured as follows in /etc/kismet.conf:

suiduser=<login>
source=ipw3945,eth1,ipw3945

VPN

To come...

Bluetooth

In the kernel configuration:

Networking  --->
 <*> Bluetooth subsystem support  --->
  <*> L2CAP protocol support
  <*> RFCOMM protocol support
   [*] RFCOMM TTY support
      Bluetooth device drivers  --->
       <*> HCI USB driver

Now emerge bluez-utils;

emerge bluez-utils

and configure your display name in the device section in /etc/bluetooth/hcid.conf:

name "Your Displayname"

Now we are ready to start

rc-update add bluetooth default
/etc/init.d/bluetooth start

External Connections

ACPI

Just emerge the acpi daemon:

emerge acpid
rc-update add acpid default
/etc/init.d/acpid start

Extra Features

History

5. July - Initial release.

24. July - Added Gentoo General, Sound, Some kernel configuration for the 2.6.21 kernel and new keycodes.

2. September - All sections are has been polished, and should work properly. Only the last ones are missing.

External Sources

A) Linux on the X60 Tablet

B) [2] Keycode Table