AutoRotate – Ubuntu Installation Instructions
These are the instructions for installing the autorotate script on Ubuntu laptops using a prepackaged binary. If you are not using Ubuntu, then follow the general installation instructions.
Installation Instructions (Ubuntu Lucid Lynx)
- Make sure you have a working accelerometer that is reading the proper orientation.
- Add my ThinkPadX61T PPA repository by appending the following line to the end of the /etc/apt/sources.list file:
deb http://ppa.launchpad.net/kkrizka/thinkpad-x61t/ubuntu lucid main
- Update apt-get’s package list:
sudo apt-get update
- Install the script and necessary packages:
sudo apt-get install wacom-tools python-xrandr autorotate
- You can have the auto-rotate.py damon to start with GDM, so it will be available to all users, even during login. This is done by adding the following line to the end of the /etc/gdm/Init/Default file before the exit 0 command:
auto-rotate.py&
- Restart GDM to start the script:
sudo /etc/init.d/gdm restart
- Swivel down your screen into the tablet mode, and tilt it at around 45 degrees to test if everything is working.
- Follow the general instructions for setting up buttons for manual rotation.
Sir,
I am desparate for help getting Karmic to work adequately on my tablet-PC. From all of my internet research, you seem to have the most extensive handle on what to do and how to do it. I have no desire to profit from these efforts beyond a working tablet. Please tell me there is some way that you are able to help me to help myself.
My troubles extend from total failure of “sleep” and “hibernate” to issues with almost everything “tablet” (rotate, stylus, blue-keys, extra keys and buttons) and the X6-Ultrabase(tm) and ultra-bay devices.
Today I fetched the parts for your autorotate and I will work to deploy that tonight.
My next most urgent “need” is for “sleep” and “hibernate” to work. This is coupled with the need to sort out the multi-boot aspects of GRUB2.
I recently loaded Karmic onto my EmperorLinux Raven Tablet (Lenovo Thinkpad X61 Tablet). I replaced the as-built HDD with a new and larger drive and did a cold install of v9.10. Previously I used the Hardy (v8.04.3 LTS) edition of Ubuntu.
Thanks in advance,
~~~ 0;-Dan
PS/ Using Karmic and Firefox 3.5.7, I had trouble with navigation from your “projects” menu. Items would drop down, but would vanish before I could make a selection. ~~~ 0;-/
For me, hibernate and sleep worked out of the box, without any problems, on Ubuntu Karmic. What kind of graphics card do you have? Those are usually the problem.
Also, to get to the project list. Just click the “Projects” link and forget the drop down that comes. I’ll try to fix the drop down later though.
well i finally got my screen to rotate but the problem is that once the screen is rotated the mouse messes up. up becomes down and right key becomes left.
so if i have to point to applications (top left corner) on my desktop i have to actually move my stylus to right bottom corner.
Can you run the auto-rotate.py script from command line and let me know what messages it prints out?
It might be a problem with wacom tools not detecting the devices, a known problem in Ubuntu Karmic. But apparently it was fixed for the next version of Ubuntu. For now, you can fix it by following these instructions:
https://help.ubuntu.com/community/X61T#Fixing Touch
´xinput list´ is the command you are looking for, which prints out the following here:
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ TPPS/2 IBM TrackPoint id=10 [slave pointer (2)]
⎜ ↳ Serial Wacom Tablet eraser id=12 [slave pointer (2)]
⎜ ↳ Serial Wacom Tablet id=13 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Sleep Button id=8 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=9 [slave keyboard (3)]
↳ ThinkPad Extra Buttons id=11 [slave keyboard (3)]
and another hint:
I set the suid-flag to setkeycodes. Don’t know if this is needed if using auto-rotate (which doesn’t work ANY time here…sometimes it does, sometimes it doesn’t) but its very useful when using manual-rotate only.
If i press the rotate-button beneath the display it rotates the screen, my stylus (i replaced “stylus” with “Serial Wacom Tablet” – see above) and the little “d-pad”. Just great 🙂
The “xsetwacom –list” does the same thing, but limits the results to wacom devices (which is what I want). I added this in version 0.4.1 and it works with Ubuntu Lucid, so you no longer have to manually change “stylus” to “Serial Wacom Tablet”.
After looking at some other scripts, xinput might be useful for fixing the rotated coordinates. This might make it possible to skip setkeycodes and do everything without requiring root access.
As for problems with auto-rotate, I fixed a few bugs recently. You might want to check the latest git:
http://github.com/kkrizka/autorotate
hi
I have the x61 tablet which is working perfect now thanks to your excellent post. I am wondering how can i detect if my tablet has finger touch features. When i received this tablet i seem to remember using my finger touch under windows vista, but i am not sure anymore. Any ideas and once again thanks for the great tutorials and excellent work
Hi ali,
I am not sure how to detect if you have finger-touch capability inside your X61t. But I think that it is listed as an extra wacom input device. Run the following command to see what wacom devices you have:
xsetwacom list
You should also check out ThinkWiki for more information:
http://www.thinkwiki.org
KK, thanks so much for your work on this. Unfortunately I haven’t managed to get it working yet (Linux Mint 10 Julia). I am new to Linux, so perhaps I am doing something stupid. Following instructions at
http://www.thinkwiki.org/wiki/Installing_Ubuntu_10.04_%28Lucid_Lynx%29_on_an_X61_Tablet
My first problem:
$ sudo apt-get install python-glib python-dbus python-xrandr autorotate
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package python-glib
And, perhaps not surprisingly, trying to test manually:
$ sudo sh thinkpad-rotatescreen.sh normal
No protocol specified
Can’t open display :0
No protocol specified
Failed to open Display .
No protocol specified
Failed to open Display .
No protocol specified
xmodmap: unable to open display ‘:0’
By the way:
$ xsetwacom list
Serial Wacom Tablet stylus STYLUS
Serial Wacom Tablet eraser ERASER
Hi pugwash,
About the first problem, Mint probably has a different names for the required packages or it does not include them at all. Since I don’t use Mint, I can’t help you with that.
For the second problem, the thinkpad-rotatescreen.sh is not written by me. But it seems that your terminal is having trouble communicating with X.org. Try running “sudo xclock” and see what happens.
$ sudo xclock
(displays the clock)
$ auto-rotate.py
Traceback (most recent call last):
File “/usr/local/bin/auto-rotate.py”, line 24, in
from libautorotate import *
File “/usr/local/lib/python2.6/dist-packages/libautorotate.py”, line 9, in
from xrandr import xrandr
ImportError: cannot import name xrandr
You need to install the python-xrandr package.
python-xrandr is already installed.
python-glib is missing.
I don’t know how to get it. Launchpad says,
“pyglib does not have any download files registered with Launchpad.”
Maybe I should try to compile it from here?
http://bazaar.launchpad.net/~gianmt/pyglib/trunk/files/head%3A/glib/
Meanwhile I have written a bash script to rotate manually, which is working for me. It uses xrandr (and xsetwacom), although I’m not convinced that sub-pixel rendering is working correctly, as fonts look slightly fuzzy at 180-degrees rotation. Do you have slightly fuzzy text on your screen at 180-degrees rotation?