Diff for "X61T"


Differences between revisions 18 and 36 (spanning 18 versions)
Revision 18 as of 2009-05-24 02:51:29
Size: 14502
Editor: 71-88-108-63
Comment:
Revision 36 as of 2015-03-30 20:26:54
Size: 10378
Editor: knome
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. 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.
Line 205: Line 288:
The following instructions will allow you to set up automatic screen rotation on the X61t. It only defines the positions of standard laptop and right-hand tablet. Feel free to edit the script to make it more versatile. It should be noted that rotation is not as simple as changing the output orientation of the screen, the pen and tablet navigation buttons need adjustment as well.

Edit rc.local:
{{{
sudo gedit /etc/rc.local
}}}
Add the following before the "exit 0" line:
{{{
setkeycodes 6f 108
setkeycodes 71 103
setkeycodes 6e 105
setkeycodes 6d 106
}}}
Create a file rotate in /usr/local/bin:
{{{
sudo gedit /usr/local/bin/rotate
}}}
with the following content:
{{{
#!/usr/bin/python
}}}

{{{
import os, sys, re

  # All allowed rotations
rotations = ['normal', 'right', 'inverted', 'left']

  # Keyboard scan codes for arrow keys
scanCodes = {'up': 0x71, 'dn': 0x6f, 'lt': 0x6e, 'rt': 0x6d}

  # Keycodes to use for each rotation
  # 104 = pgup, 109 = pgdn, 105 = left, 106 = right, 103 = up, 108 = down
keyCodes = {
            'normal': {'up': 103, 'dn': 108, 'lt': 105, 'rt': 106},
            'right': {'up': 105, 'dn': 106, 'lt': 108, 'rt': 103},
            'inverted': {'up': 108, 'dn': 103, 'lt': 106, 'rt': 105},
            'left': {'up': 106, 'dn': 105, 'lt': 103, 'rt': 108}
          }

  # Rotations to pick from when no specific rotation is given
preferredRotations = rotations

  # Rotation to use when switched to tablet mode
tabletMode = "right"
  
  # Tells the program to stay open when in tablet mode and
  # rotate using the orientation sensor
tabletAutoRotate = True
  
  # Rotation to use when switched to normal laptop mode
laptopMode = "normal"


## If a local xsetwacom is installed, it should probably take precedent (?)
if os.path.isfile('/usr/local/bin/xsetwacom'):
  xsetwacom = '/usr/local/bin/xsetwacom'
elif os.path.isfile('/usr/bin/xsetwacom'):
  xsetwacom = '/usr/bin/xsetwacom'
else:
  ## If it's not one of those two, just hope it's in the path somewhere.
  xsetwacom = 'xsetwacom'

xrandr = '/usr/bin/xrandr'



def main():
  setEnv()
  
    # list of wacom devices to be rotated
  devices = listDevices()
  
  if len(sys.argv) < 2: # No rotation specified, just go to the next one in the preferred list
    cr = getCurrentRotation()
    if cr in preferredRotations:
      nextIndex = (preferredRotations.index(cr) + 1) % len(preferredRotations)
    else:
      nextIndex = 0
    next = preferredRotations[nextIndex]
  else:
    next = sys.argv[1]
    if not next in rotations:
      if next == "tablet":
        next = tabletMode
      elif next == "laptop":
        next = laptopMode
      else:
        sys.stderr.write("Rotation \"%s\" not allowed (pick from %s, tablet, laptop)\n" % (next, ', '.join(rotations)))
        sys.exit(-1)
  setRotation(next, devices)



def runCmd(cmd):
  f = os.popen(cmd)
  l = f.readlines()
  f.close()
  return l

def getCurrentRotation():
  #setEnv()
  try:
    rrv = randrVersion()
    if rrv < '1.2':
      l = [s for s in runCmd(xrandr) if re.match('Current rotation', s)]
      r = re.sub('Current rotation - ', '', l[0])
      return r.strip()
    elif rrv >= '1.2':
      l = runCmd(xrandr) #"%s | grep 'LVDS connected' | gawk '{print $4}' | sed -e 's/(//'" % xrandr)
      l = [x for x in l if re.search(r'(LVDS|default) connected', x)][0]
      l = l.split(' ')[3]
      l = re.sub(r'\(', '', l)
      
      return l.strip()
  except:
    sys.stderr.write("Can not determine current rotation, bailing out :(")
    sys.exit(-1)

def setRotation(o, devices):
  #setEnv()
  runCmd("%s --output LVDS --rotate %s" % (xrandr, o))
  wacomRots = {'normal': '0', 'left': '2', 'right': '1', 'inverted': '3'}
  for d in devices:
    runCmd("%s set %s Rotate %s" % (xsetwacom, d, wacomRots[o]))
  setKeymap(o)

def setEnv():
  if os.environ.has_key('DISPLAY'):
    return # DISPLAY is already set, don't mess with it.
  
  if os.system('pidof kdm > /dev/null') == 0:
    kdmsts = '/var/lib/kdm/kdmsts'
    if os.access(kdmsts, os.R_OK):
      kdmdata = open(kdmsts).readlines()
      userline = [s for s in kdmdata if re.match(r':0=', s)][0]
      user = re.sub(r':0=', '', userline).strip()
      os.environ['DISPLAY'] = ':0.0'
      os.environ['XAUTHORITY'] = '/home/%s/.Xauthority' % user
  elif os.system('pidof gdm > /dev/null') == 0:
    os.environ['DISPLAY'] = ':0.0'
    os.environ['XAUTHORITY'] = '/var/lib/gdm/:0.Xauth'
  
def setKeymap(o):
  for sc in scanCodes.keys():
    os.system('sudo setkeycodes %x %d' % (scanCodes[sc], keyCodes[o][sc]))


def randrVersion():
  #setEnv()
  xrv = runCmd('%s -v' % xrandr)[0]
  xrv = re.sub(r'.*version ', '', xrv)
  return xrv.strip()

def listDevices():
  #setEnv()
  dev = runCmd("%s list dev | awk {'print $1'}" % xsetwacom)
  dev = map(lambda s: s.strip(), dev)
  return dev
   
main()
}}}
Change the files permissions to 755:
{{{
sudo chmod 755 /usr/local/bin/rotate
}}}

Run visudo and add the following line to the bottom:
{{{
%admin ALL=NOPASSWD: /usr/bin/setkeycodes
}}}
This allows the setkeycodes command to be run from within the script.

You should now be able to type "rotate tablet" and "rotate laptop" from a command prompt to turn the screen at will. This script also adjust the arrow keypad on the side of the tablet so that the directions correspond to screen directions and sets the tablet pen to move correctly.


=== The Automatic Part ===
Create a directory autorotate in /etc:
{{{
sudo mkdir /etc/autorotate
}}}
Add a file lastrotation to it:
{{{
sudo gedit /etc/autorotate/lastrotation
}}}
Fill it with:
{{{
laptop
}}}
Change its permissions to 666:
{{{
sudo chmod 666 /etc/autorotate/lastrotation
}}}

Create a new file:
sudo gedit /usr/local/bin/autorotate
Fill it with:
{{{
#!/bin/sh

/usr/local/bin/rotate `cat /etc/autorotate/lastrotation`
}}}
Change its permissions to 755:
{{{
sudo chmod 755 /usr/local/bin/autorotate
}}}
Create another file:
{{{
sudo gedit /usr/local/bin/setrotation
}}}
Fill it with:
{{{
#!/bin/sh

echo $1 > /etc/autorotate/lastrotation
/usr/local/bin/autorotate
}}}
Set Permissions to 755:
{{{
sudo chmod 755 /usr/local/bin/setrotation
}}}
Create a file:
{{{
sudo gedit /etc/acpi/events/swivel-up
{{{
Fill it with:
{{{
# called when tablet screen swivels up (into laptop mode)
event=ibm/hotkey HKEY 00000080 0000500a
action=/usr/local/bin/setrotation laptop
}}}
Create a file:
{{{
sudo gedit /etc/acpi/events/swivel-down
}}}
Fill it with:
{{{
# called when tablet screen swivels down (into tablet mode)
event=ibm/hotkey HKEY 00000080 00005009
action=/usr/local/bin/setrotation tablet
}}}
Reboot your system.
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.
Line 450: Line 342:

= 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 discretion 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
Line 476: Line 354:
sudo gedit /etc/default/acpi-support
}}}
Set: "ENABLE_LAPTOP_MODE=true"
gksudo gedit /etc/default/acpi-support
}}}
Set: {{{ENABLE_LAPTOP_MODE=true}}}
Line 482: Line 360:
sudo gedit /etc/laptop-mode/laptop-mode.conf gksudo gedit /etc/laptop-mode/laptop-mode.conf

Tag/tag.png

Unsupported Version
This article applies to an unsupported version of Ubuntu. More info...

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

X61T (last edited 2015-03-30 20:26:54 by knome)