Saturday, February 26, 2011

Screen Rotation with Ubuntu on WeTab

Update 26 OCT 2011:
If you're running Ubuntu 11+ please check out this post instead:


So holding up the WeTab for long periods of time can be a pain. Sometimes it seems that holding it up on it's side might be more comfortable, especially when you're lying down in bed and trying to read something.

well as it so happens, you can rotate the screen using xrandr. You might not like what you see but atleast you have the option.

Well first do an xinput -list to see the devices you can interact with to fix up calibration through a script:

xinput -list
⎡ Virtual core pointer                        id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                  id=4    [slave  pointer  (2)]
⎜   ↳ eGalax Inc. USB TouchController             id=9    [slave  pointer  (2)]
⎜   ↳ eGalax Inc. USB TouchController             id=10    [slave  pointer  (2)]
⎜   ↳ eGalax Inc. USB TouchController             id=11    [slave  pointer  (2)]

⎜   ↳ ImPS/2 Generic Wheel Mouse                  id=15    [slave  pointer  (2)]
⎜   ↳ Microsoft Mouse                             id=16    [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)]
    ↳ Power Button                                id=8    [slave  keyboard (3)]
    ↳ USB 2.0 Camera                              id=12    [slave  keyboard (3)]
    ↳ Asus Laptop extra buttons                   id=13    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard                id=14    [slave  keyboard (3)]
    ↳ Microsoft Keyboard                          id=17    [slave  keyboard (3)]

Note the ids for "eGalax Inc. USB TouchController" 

As a quick test to check which device really is the one we need to calibrate we can take each of the ids and plug it in to the following command and then touch the screen with a finger, if the Axes seem to be inverted, we know we have the right device:

xinput set-int-prop 9 "Evdev Axes Swap" 8 1
xinput set-int-prop 10 "Evdev Axes Swap" 8 1
xinput set-int-prop 11 "Evdev Axes Swap" 8 1

Once you know which device id is the right one (mine was 10), you can restore the proper axes by switching the 1 to a 0:

 xinput set-int-prop 10 "Evdev Axes Swap" 8 0

you should now create the following scripts that will help you rotate and restore your view.

xrandr -o left
xinput set-int-prop 10 "Evdev Axes Swap" 8 1
xinput set-int-prop 10 "Evdev Axis Calibration" 32 4052 36 35 4156

xrandr -o normal
xinput set-int-prop 10 "Evdev Axes Swap" 8 0
xinput set-int-prop 10 "Evdev Axis Calibration" 32 -5 4100 59 4100

* remember to change the device id 10 to whatever works for you. I describe next what to do about the calibrations.

Finally make sure you download and install xinput_calibrator: (the debian package should do).

Now do a xrandr -o left and run the xinput_calibrator. The output should be the calibration parameters that you place on the last command of both scripts (evdev  axis calibration).

Finally run the scripts and enjoy the proper calibrations of both landscape and portrait viewing on your WeTab!

UPDATE 26 FEB 2011:
The above instructions will work only if you are running with single-touch, to enable multitouch and have rotation work correctly please see:



  1. Hi
    Ihave HP 2310ti multi touch monitor. My problem same to yours. When I want to use the monitor verticaly touch screen not rotate.
    I am using ubuntu 11.10 .monitor resulation 1920x1080.
    How can I fix this.

  2. Could you try the instructions on this post: