Results 1 to 10 of 20

Thread: [HOW TO] Lenovo X201 tablet. Enable your Tablet buttons!

Hybrid View

  1. #1
    Join Date
    Oct 2007
    Ubuntu 10.10 Maverick Meerkat

    [HOW TO] Lenovo X201 tablet. Enable your Tablet buttons and some little surprises

    For the sake of completenes i reedited this post:

    I present you the scripts i use to make my X201 a nicer place to live. I got these on the net and modified them to work on the 201 or by the awesome help from fellow users in this forum. Enjoy!

    i present you a script to enable your tablet buttons( Based on this).
    Run this script to enable your Tablet buttons on the Lenovo X201 Tablet.
    even better set it to autostart with the system (System->Preferences->Startup Applications)

    On my system (Maverick 64) somehow the usage of setkeycodes sets the keycode by 8 values above the intended keycode:
    For example: you write "sudo setkeycodes 0x67 148" then the keycode will be actually set to "156"... dunno why. So if in your system its different (test with the xev command) you can change it accordingly below

    i mapped the toolbarbutton to XF86LaunchB, because i set it to toggle the unhide option for the ubuntu panel using a script see below.

    you can actually map to the existing button XF86RotateWindows, which rotates the screen out of the box, but the pen and finger input will not be "rotated"... Instead i use a custom script i found on the net. Thus you have the "unlabeled" (XF86Launch1) and the padlock (XF86Launch2) to set to something you like (on System->Preferences->Keyboard Shortcuts).
    for writing recognition im using cellwriter (awesome handwriting recognition program for any language ever)

    To maximize my viewing area i hide the task bar/task panel. In order to show it you'd normally hover the mouse to the lower part of the screen (or the side where its hidden). in tablet mode i just press the toolbox button instead:

    I mapped the Toolboxbutton to hide and unhide the panel... since the panel is hidden anyway i made it also bigger so its touch-friendly (right click on it and set the size to 45 pixels).

    so when im in tablet mode and need to switch programs or access the program menu i unhide the panel, click on a program on the task bar and hit the button to rehide it.. nifty!

    (on System->Preferences->Keyboard Shortcuts)

    This rotates the display. Its needed since the built in rotation does not rotate the touch and pen drivers.. a mess i tell you. This script will rotate the display clockwise everytime you hit it...
    I made it back then when computers were steam powered and internet was based on pidgeon-over-IP... there was no option. Nowadays you can and probably should use the uber excellent program: Magick Rotation from Favux. it can rotate your display automatically when you switch to tablet mode!! it also lets you deactivate touch and much more.. to rotate use the provided file "" in the install dir.

    It explicitly supports the Lenovo X201!!!

    This script i use to mount my private data on startup. just put it to your autostarts (Preferences->Startup Applications). The problem is that it will always ask you for your admin pass and THEN for your volume pass.. the solution is ( based on this):
    basically you have to add an exception that allows to run truecrypt without password. So add this line to /etc/sudoers using the command "sudo visudo":
    username ALL=(root) NOPASSWD:/usr/bin/truecrypt
    replacing "username" with... well your username, then you can place the truecrypt mount command in your autostart options

    Setting up the trackpoint

    To set up the trackpoint speed and sensitivity. you need to run these lines in super user mode (run this command in a terminal: "sudo su"), a simple sudo wont work.
    echo -n 1 > /sys/devices/platform/i8042/serio1/serio2/press_to_select
    echo -n 125 > /sys/devices/platform/i8042/serio1/serio2/speed
    echo -n 254 > /sys/devices/platform/i8042/serio1/serio2/sensitivity
    yet putting this at system start doesnt seem to work always..

    its kind of broken. search the forum for "i8042 serio1 press_to_select": it seems to be a bug where the files that the driver use(the serio1, serio2 bit) are created with different names at every boot... so the script wouldnt quite work.. i got frustrated and actually didnt bother looking further into it. i put the needed lines in the script for anybody wanting to look for a solution. If i find any ill update the post once more.

    have fun!
    Attached Files Attached Files
    Last edited by linuxd00; February 10th, 2011 at 03:15 PM.

  2. #2
    Join Date
    Jun 2007

    Re: [HOW TO] Lenovo X201 tablet. Enable your Tablet buttons!

    Hi, thank you for the scripts,
    I use the following script mapped to the portrait/landscape button in keyboard shortcutts. Also working on a little python app to show a customizable menu when i press the button under the padlock.

    :~$ cat /usr/bin/ 
    if [ `xsetwacom --get "Serial Wacom Tablet" Rotate` = "NONE" ]; then
    xsetwacom --set "Serial Wacom Tablet" Rotate CW
    xrandr -o right
    MyScriptStylus &
    xsetwacom --set "Serial Wacom Tablet" Rotate NONE
    xrandr -o normal
    killall MyScriptStylus
    MyScriptStylus is just a non-free handwriting rec, it is not needed for the script to work.

  3. #3
    Join Date
    Jun 2006

    Re: [HOW TO] Lenovo X201 tablet. Enable your Tablet buttons!

    hi linuxd00
    thank you very much for your scripts - it works well for me to start with!
    i am new to this and have a question - i get this messages:

    Cannot find device 'Serial Wacom Tablet'.
    Cannot find device 'Serial Wacom Tablet touch'.

    but no error for "Serial Wacom Tablet eraser". i have the x201i without multitouch - so only the pen works. still, it is strange that only the eraser works. how do i test which device names there are? is the eraser to work enough?

    the other question that i have - i am using magick rotation (thanks guys!!) and wonder about integration of your solution with that of magick rotation.

    at the moment i have magick rotation set to invert the screen. but then the setting of your script does not rotate it at all. ie - it only works when i am in "normal" mode.

    do i make this clear? i tried changing to "Rotate CCW" but that also did not work when in tablet mode..

    thanks a lot!

  4. #4
    Join Date
    Nov 2008
    Ubuntu 12.04 Precise Pangolin

    Re: [HOW TO] Lenovo X201 tablet. Enable your Tablet buttons!

    Hi miobrad,

    To find your "device names" enter in a terminal:
    xinput list
    and check the output. My guess is your stylus is named "Serial Wacom Tablet stylus". If so use that, or whatever the correct name for stylus is, in the script. Do you mean your X201t does not have touch? If so remove the touch lines from the script.

    By the way, instead of the rotation script, you could use Magick Rotation's rotation engine called Instructions are in the Magick-README.txt.

  5. #5
    Join Date
    Jun 2006

    Re: [HOW TO] Lenovo X201 tablet. Enable your Tablet buttons!

    thanks a lot - i got it to work with - great!

  6. #6
    Join Date
    Oct 2007
    Ubuntu 10.10 Maverick Meerkat

    Re: [HOW TO] Lenovo X201 tablet. Enable your Tablet buttons!

    hey miobrad... for the sake of completness i updated my posting with all the little scripts i use on my x201.

    including a much needed, somewhat working script to set up the speed and sensitivity on the trackpoint... its inside ""

    i dont know why you get that error.. i get it too but its ok.. works anyway.

    i also updated the rotation script: it doesnt rotate normal/right back and fort but goes full circle

    but yes you should probably use Magick rotation instead... it rocks! and i use it myself now.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts