Size: 6777
Comment:
|
← Revision 36 as of 2015-03-30 20:26:54 ⇥
Size: 10378
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
<<Include(Tag/Unsupported)>> |
|
Line 5: | Line 7: |
This page covers the additional hardware setup required after installing Ubuntu 9.04 Jaunty to make the Thinkpad X61 Tablet Fully Functional. All directions are given in the HAL, fdi, and acpi thus avoiding the xorg.conf file completely. | This page covers the additional hardware setup required after a default installation of Ubuntu 9.10 Karmic Koala to make the ThinkPad X61 Tablet fully functional. All instructions are given avoiding creation of an xorg.conf file. |
Line 32: | Line 34: |
Middle Mouse Button, | Middle Mouse Button Scrolling, |
Line 40: | Line 42: |
Works out of the box, just needs some calibration. | The Wacom touchscreen works out of the box, but loses accuracy at the edges of the screen. To fix this the touchscreen needs to be calibrated. |
Line 52: | Line 54: |
Unfortunately HAL assigns names to wacom devices in a way that the recent wacomcpl from jaunty cant find them, to help wacomcpl to find them: | Unfortunately HAL assigns names to wacom devices in a way that the current wacomcpl cant find them, to help wacomcpl to find them we need to create a rule to rename the outputs as wacomcpl expects. |
Line 57: | Line 59: |
sudo gedit /etc/init.d/wacomtohal }}} |
gksudo gedit /etc/hal/fdi/policy/wacom.fdi }}} |
Line 61: | Line 64: |
#! /bin/sh ## find any wacom devices for udi in `hal-find-by-property --key input.x11_driver --string wacom` do type=`hal-get-property --udi $udi --key input.x11_options.Type` ## rewrite the names that the Xserver will use hal-set-property --udi $udi --key info.product --string $type done }}} then run : {{{ sudo chmod +x /etc/init.d/wacomtohal sudo update-rc.d wacomtohal defaults 27 }}} now reboot and launch wacomcpl |
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- --> <deviceinfo version="0.2"> <device> <match key="input.x11_driver" contains="wacom"> <match key="input.x11_options.Type" contains="stylus"> <merge key="info.product" type="string">stylus</merge> </match> <match key="input.x11_options.Type" contains="eraser"> <merge key="info.product" type="string">eraser</merge> </match> <match key="input.x11_options.Type" contains="touch"> <merge key="info.product" type="string">touch</merge> </match> </match> </device> </deviceinfo> }}} Now reboot and launch wacomcpl. You should now be able to see the devices and calibrate them. |
Line 83: | Line 89: |
sudo gedit ~/.xinitrc | gksudo gedit ~/.xinitrc |
Line 103: | Line 109: |
=== Making Wacomcpl Settings Restore on Resume === If you lose your configuration after resume from standby or hibernate follow these instructions to create a binary daemon that will restore your settings: In Terminal {{{ gedit monitor_wacom.c }}} Enter the following code: {{{ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <assert.h> char method_line[1024]; int main(int argc, char **argv) { if (argc != 2) { printf("Usage: %s [script to run]\n", argv[0]); return 1; } FILE* in = popen("dbus-monitor --session type='signal',interface='org.gnome.ScreenSaver',member='ActiveChanged'", "r"); while (1) { char buf[1024]; assert(fgets(buf, 1023, in)); if (buf[0] == 's' /* early exit optimization */ && strstr(buf, "ActiveChanged") != NULL) { assert(fgets(buf, 1023, in)); if (strstr(buf, "false") != NULL) { /* resumed */ assert(system(argv[1]) == 0); } else { /* put to sleep */ } } } } }}} Save and Close In Terminal: {{{ gcc -O2 monitor_wacom.c -o .monitor_wacom }}} Go to System>Preferences>Startup Applications and create a new entry named whatever you want. Its command should be: {{{ /home/yourusername/.monitor_wacom /home/yourusername/.xinitrc }}} Reboot. |
|
Line 171: | Line 116: |
No Solution Yet. | == Creating Rotation Commands == Every time the rotation changes we need to change: 1. Display Orientation 2. Wacom Tablet Orientation 3. Left, Right, Up, and Down Tablet Buttons To do this we will create scripts to do all of this at once Create a file called /usr/bin/rotatenormal {{{ gksudo gedit /usr/bin/rotatenormal }}} And fill it with: {{{ xrandr -o normal xsetwacom set stylus Rotate none sudo setkeycodes 0x71 103 0x6f 108 0x6e 105 0x6d 106 }}} Then create a file called /usr/bin/rotateright {{{ gksudo gedit /usr/bin/rotateright }}} And fill it with: {{{ xrandr -o right xsetwacom set stylus Rotate cw gksudo setkeycodes 0x71 105 0x6f 106 0x6e 108 0x6d 103 }}} Then create a file called /usr/bin/rotateinverted {{{ gksudo gedit /usr/bin/rotateinverted }}} And fill it with: {{{ xrandr -o inverted xsetwacom set stylus Rotate half sudo setkeycodes 0x71 108 0x6f 103 0x6e 106 0x6d 105 }}} Then create a file called /usr/bin/rotateleft {{{ gksudo gedit /usr/bin/rotateleft }}} And fill it with: {{{ xrandr -o left xsetwacom set stylus Rotate ccw sudo setkeycodes 0x71 106 0x6f 105 0x6e 103 0x6d 108 }}} Next we need to add a sudo exception so the user can run the setkeycodes in the script Type: {{{ sudo visudo }}} Go to the bottom and add {{{ <username> ALL=NOPASSWD: /usr/bin/setkeycodes }}} Where <username> is the username of the user we are enabling rotate for. Repeat this line for all users you wish to permit, or add a group by replacing <username> with %<groupname> where <groupname> is the name of the group you would like to add. Finally we need to make these commands executable with chmod in a terminal {{{ sudo chmod +x /usr/bin/rotateright sudo chmod +x /usr/bin/rotateleft sudo chmod +x /usr/bin/rotatenormal sudo chmod +x /usr/bin/rotateinverted }}} Now the you should be able to type rotatenormal, rotateright, rotateleft, and rotateinverted into terminal and the screen should rotate correctly. == Enabling the Button == First create a file to store the current rotation data {{{ gksudo gedit /usr/bin/rotationmode }}} fill this file with: {{{ 0 }}} and make it editable, but not executable {{{ sudo chmod 666 /usr/bin/rotationmode }}} Now we will write the script to rotate the screen {{{ gksudo gedit /usr/bin/rotatebutton }}} And fill it with: {{{ mode=`cat /usr/bin/rotationmode` if test 0 = $mode then echo 1 > /usr/bin/rotationmode rotateright fi if test 1 = $mode then echo 2 > /usr/bin/rotationmode rotateinverted fi if test 2 = $mode then echo 3 > /usr/bin/rotationmode rotateleft fi if test 3 = $mode then echo 0 > /usr/bin/rotationmode rotatenormal fi }}} Make it executable: {{{ sudo chmod +x /usr/bin/rotatebutton }}} Now typing {{{rotatebutton}}} in terminal should go through all of the rotations To map the command to the button go to System>Preferences>Keyboard Shortcuts, click the Add button at the bottom, name it whatever you want and use the command {{{rotatebutton}}}. Then bind the key by clicking in the shortcut column and pressing the tablet rotate key. |
Line 177: | Line 260: |
sudo gedit /etc/hal/fdi/policy/mouse-wheel.fdi | gksudo gedit /etc/hal/fdi/policy/mouse-wheel.fdi |
Line 196: | Line 279: |
The ThinkVantage button does not work only in that it is not bound to anything. To bind it go to System>Preferences>Keyboard Shortcuts and set it to perform any command. = Magnify Fn Button = No Solution Yet. = Fingerprint Reader = No Solution Yet. = Automatic Screen Rotation = To Be Posted. = ThinkVantage ActiveProtection = No Solution Yet. = Useful Task: Disable Bluetooth on Startup = These instructions will disable the bluetooth radio being activated during the boot. The radio can then be activated at the users discresion using Fn F5 (Radio Fn Button). edit /etc/rc.local and add: {{{ chmod 666 /proc/acpi/ibm/bluetooth echo "disable" > /proc/acpi/ibm/bluetooth }}} before the exit0 line *note chmod 666 makes this file editable by everyone, this may compromise security, try different settings to find the one that suits your needs (655 may work) *note proc is depreciated and may not work in future releases |
The ThinkVantage button does not work, only in that it is not bound to anything as there is no ThinkVantage in linux. To bind it go to System>Preferences>Keyboard Shortcuts and set it to perform any command. = Setup Magnify Fn Button = No Solution Yet. = Setup Fingerprint Reader = No Solution Yet. = Setup Automatic Screen Rotation = Due to changes in the way that Ubuntu handles the input acpi for the lid swivel no longer functions. The following uses a depreciated method to poll the hardware. First follow the instructions under Setup Rotate Button as we will call those files Next create a file called autorotate: {{{ gksudo gedit /usr/bin/autorotate }}} And fill it with: {{{ pastmode=`cat /sys/devices/platform/thinkpad_acpi/hotkey_tablet_mode` while [ true ] do nowmode=`cat /sys/devices/platform/thinkpad_acpi/hotkey_tablet_mode` if test 1 = $pastmode then if test 0 = $nowmode then rotatenormal echo 0 > /usr/bin/rotationmode pastmode=0 fi fi if test 0 = $pastmode then if test 1 = $nowmode then rotatemode=`cat /usr/bin/rotationmode` if test 0 = $rotatemode then rotateright echo 1 > /usr/bin/rotationmode pastmode=1 else pastmode=1 fi fi fi sleep 5 done }}} And make it executable {{{ sudo chmod +x /usr/bin/autorotate }}} Now add this to the list of startup programs by going to System>Preferences>Startup Applications, click the add button, name it whatever you want and use the command autorotate. = Setup ThinkVantage ActiveProtection = No Solution Yet. = Useful Task: Enable Laptop Mode = Laptop mode is a power saving tool that allows the hard drive to spin down to conserve battery power. This is disabled by default as it has been known to cause problems on some computers, but it appears to work on the X61t. *Warning: Laptop mode stores data in ram teporarily until it needs to write to disk. Power Loss in laptop mode could lead to significant data loss. *Warning: Excessive spin-up spin-down cycles will wear out your hard drive much more quickly than normal use. Be careful when configuring laptop mode settings. *Warning: Do Not Use Laptop Mode if you have a SSD. It is for platter drives only. Edit /etc/default/acpi-support {{{ gksudo gedit /etc/default/acpi-support }}} Set: {{{ENABLE_LAPTOP_MODE=true}}} Configure Laptop Mode {{{ gksudo gedit /etc/laptop-mode/laptop-mode.conf }}} |
|
Unsupported Version |
Introduction
This page covers the additional hardware setup required after a default installation of Ubuntu 9.10 Karmic Koala to make the ThinkPad X61 Tablet fully functional. All instructions are given avoiding creation of an xorg.conf file.
What Works
Forward / Back Buttons, Audio Buttons, Brightness Fn Buttons, Radio Fn Button, Suspend Fn Button, Power Fn Button, Lock Fn Button, Hibernate Fn Button, Tablet L/R/U/D Buttons, Tablet Enter Button, Tablet Esc Button, Media Fn Buttons NumberLock Fn Button, Tablet Pen, Wireless Radio, Bluetooth Radio,
What Almost Works
Tablet Toolbox Button - causes lock or suspend, Tablet Touch – Requires Calibration,
What Does Not Work
Tablet Control-Alt-Delete Button, Tablet Rotate Button, Middle Mouse Button Scrolling, ThinkVantage Button, Magnify Fn Button, Fingerprint Reader, Automatic Screen Rotation, ThinkVantage ActiveProtection,
Fixing Touch
The Wacom touchscreen works out of the box, but loses accuracy at the edges of the screen. To fix this the touchscreen needs to be calibrated.
Wacomcpl
The Wacom Tablet in the X61t is a serial Wacom tablet. It can be configured by using wacomcpl. Wacomcpl is part of the wacom-tools package and can be retrieved in apt:
sudo apt-get install wacom-tools
After this wacomcpl can be run by typing: wacomcpl in Terminal.
Helping wacomcpl
Unfortunately HAL assigns names to wacom devices in a way that the current wacomcpl cant find them, to help wacomcpl to find them we need to create a rule to rename the outputs as wacomcpl expects.
Open a terminal and type :
gksudo gedit /etc/hal/fdi/policy/wacom.fdi
and paste this code in:
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- --> <deviceinfo version="0.2"> <device> <match key="input.x11_driver" contains="wacom"> <match key="input.x11_options.Type" contains="stylus"> <merge key="info.product" type="string">stylus</merge> </match> <match key="input.x11_options.Type" contains="eraser"> <merge key="info.product" type="string">eraser</merge> </match> <match key="input.x11_options.Type" contains="touch"> <merge key="info.product" type="string">touch</merge> </match> </match> </device> </deviceinfo>
Now reboot and launch wacomcpl. You should now be able to see the devices and calibrate them.
Making Wacomcpl Settings Restore on Reboot
If you lose your calibration after reboot:
In terminal:
gksudo gedit ~/.xinitrc
Find the line that says:
. /etc/X11/xinit/xinitrc
and change it to
#. /etc/X11/xinit/xinitrc
Save and exit.
Go to System>Preferences>Startup Applications and create a new entry named whatever you want.
The command should be:
sh /home/yourusername/.xinitrc
Your wacomcpl settings will now restore on reboot
Fixing the Tablet Toolbox Button
No Solution Yet.
Setup the Tablet Control-Alt-Delete Button
No Solution Yet.
Setup the Tablet Rotate Button
Creating Rotation Commands
Every time the rotation changes we need to change: 1. Display Orientation 2. Wacom Tablet Orientation 3. Left, Right, Up, and Down Tablet Buttons
To do this we will create scripts to do all of this at once
Create a file called /usr/bin/rotatenormal
gksudo gedit /usr/bin/rotatenormal
And fill it with:
xrandr -o normal xsetwacom set stylus Rotate none sudo setkeycodes 0x71 103 0x6f 108 0x6e 105 0x6d 106
Then create a file called /usr/bin/rotateright
gksudo gedit /usr/bin/rotateright
And fill it with:
xrandr -o right xsetwacom set stylus Rotate cw gksudo setkeycodes 0x71 105 0x6f 106 0x6e 108 0x6d 103
Then create a file called /usr/bin/rotateinverted
gksudo gedit /usr/bin/rotateinverted
And fill it with:
xrandr -o inverted xsetwacom set stylus Rotate half sudo setkeycodes 0x71 108 0x6f 103 0x6e 106 0x6d 105
Then create a file called /usr/bin/rotateleft
gksudo gedit /usr/bin/rotateleft
And fill it with:
xrandr -o left xsetwacom set stylus Rotate ccw sudo setkeycodes 0x71 106 0x6f 105 0x6e 103 0x6d 108
Next we need to add a sudo exception so the user can run the setkeycodes in the script Type:
sudo visudo
Go to the bottom and add
<username> ALL=NOPASSWD: /usr/bin/setkeycodes
Where <username> is the username of the user we are enabling rotate for. Repeat this line for all users you wish to permit, or add a group by replacing <username> with %<groupname> where <groupname> is the name of the group you would like to add.
Finally we need to make these commands executable with chmod in a terminal
sudo chmod +x /usr/bin/rotateright sudo chmod +x /usr/bin/rotateleft sudo chmod +x /usr/bin/rotatenormal sudo chmod +x /usr/bin/rotateinverted
Now the you should be able to type rotatenormal, rotateright, rotateleft, and rotateinverted into terminal and the screen should rotate correctly.
Enabling the Button
First create a file to store the current rotation data
gksudo gedit /usr/bin/rotationmode
fill this file with:
0
and make it editable, but not executable
sudo chmod 666 /usr/bin/rotationmode
Now we will write the script to rotate the screen
gksudo gedit /usr/bin/rotatebutton
And fill it with:
mode=`cat /usr/bin/rotationmode` if test 0 = $mode then echo 1 > /usr/bin/rotationmode rotateright fi if test 1 = $mode then echo 2 > /usr/bin/rotationmode rotateinverted fi if test 2 = $mode then echo 3 > /usr/bin/rotationmode rotateleft fi if test 3 = $mode then echo 0 > /usr/bin/rotationmode rotatenormal fi
Make it executable:
sudo chmod +x /usr/bin/rotatebutton
Now typing rotatebutton in terminal should go through all of the rotations
To map the command to the button go to System>Preferences>Keyboard Shortcuts, click the Add button at the bottom, name it whatever you want and use the command rotatebutton. Then bind the key by clicking in the shortcut column and pressing the tablet rotate key.
Setup the Middle Button Scrolling
Create a new file called /etc/hal/fdi/policy/mouse-wheel.fdi typing:
gksudo gedit /etc/hal/fdi/policy/mouse-wheel.fdi
And fill it with this code:
<?xml version="1.0" encoding="UTF-8"?> <match key="info.product" string="TPPS/2 IBM TrackPoint"> <merge key="input.x11_options.EmulateWheel" type="string">true</merge> <merge key="input.x11_options.EmulateWheelButton" type="string">2</merge> <merge key="input.x11_options.XAxisMapping" type="string">6 7</merge> <merge key="input.x11_options.YAxisMapping" type="string">4 5</merge> <merge key="input.x11_options.ZAxsisMapping" type="string">4 5</merge> <merge key="input.x11_options.Emulate3Buttons" type="string">true</merge> </match>
Reboot
Setup ThinkVantage Button
The ThinkVantage button does not work, only in that it is not bound to anything as there is no ThinkVantage in linux. To bind it go to System>Preferences>Keyboard Shortcuts and set it to perform any command.
Setup Magnify Fn Button
No Solution Yet.
Setup Fingerprint Reader
No Solution Yet.
Setup Automatic Screen Rotation
Due to changes in the way that Ubuntu handles the input acpi for the lid swivel no longer functions. The following uses a depreciated method to poll the hardware.
First follow the instructions under Setup Rotate Button as we will call those files
Next create a file called autorotate:
gksudo gedit /usr/bin/autorotate
And fill it with:
pastmode=`cat /sys/devices/platform/thinkpad_acpi/hotkey_tablet_mode` while [ true ] do nowmode=`cat /sys/devices/platform/thinkpad_acpi/hotkey_tablet_mode` if test 1 = $pastmode then if test 0 = $nowmode then rotatenormal echo 0 > /usr/bin/rotationmode pastmode=0 fi fi if test 0 = $pastmode then if test 1 = $nowmode then rotatemode=`cat /usr/bin/rotationmode` if test 0 = $rotatemode then rotateright echo 1 > /usr/bin/rotationmode pastmode=1 else pastmode=1 fi fi fi sleep 5 done
And make it executable
sudo chmod +x /usr/bin/autorotate
Now add this to the list of startup programs by going to System>Preferences>Startup Applications, click the add button, name it whatever you want and use the command autorotate.
Setup ThinkVantage ActiveProtection
No Solution Yet.
Useful Task: Enable Laptop Mode
Laptop mode is a power saving tool that allows the hard drive to spin down to conserve battery power. This is disabled by default as it has been known to cause problems on some computers, but it appears to work on the X61t.
*Warning: Laptop mode stores data in ram teporarily until it needs to write to disk. Power Loss in laptop mode could lead to significant data loss.
*Warning: Excessive spin-up spin-down cycles will wear out your hard drive much more quickly than normal use. Be careful when configuring laptop mode settings.
*Warning: Do Not Use Laptop Mode if you have a SSD. It is for platter drives only.
Edit /etc/default/acpi-support
gksudo gedit /etc/default/acpi-support
Set: ENABLE_LAPTOP_MODE=true
Configure Laptop Mode
gksudo gedit /etc/laptop-mode/laptop-mode.conf
More
Feel free to add more to this page. Some solutions may exist on thinkwiki.org
See Also
http://ubuntuforums.org/showthread.php?t=1038949&page=11 - See post 102 and 104 where the script is taken from, DO not edit your fdi as in the howto , there is no need of that for X61t.
https://bugs.launchpad.net/ubuntu/jaunty/+source/wacom-tools/+bug/355340 - An discussion aboout the new driver.
http://sourceforge.net/project/showfiles.php?group_id=69596 - Latest Wacom driver.