Rotate Screen in TabletPC stylus and pointer mouse not coincidence

Bug #217182 reported by eSe
114
This bug affects 13 people
Affects Status Importance Assigned to Milestone
acpi-support (Ubuntu)
Triaged
Medium
Unassigned
Nominated for Lucid by nick name

Bug Description

When i rotate screen, the pointer of stylus continuous works like if the wasn't rotate then it is unusable

I have a toshiba portege m200 with nvidia proprietary driver and wacom tablet trough /dev/ttyS0

snaker@cornelius:~$ xrandr
Screen 0: minimum 320 x 240, current 1400 x 1050, maximum 1400 x 1050
default connected 1400x1050+0+0 (normal left inverted right) 0mm x 0mm
   1400x1050 50.0*
   1280x1024 51.0
   1280x960 52.0
   1280x800 53.0
   1280x768 54.0
   1152x768 55.0
   1024x768 56.0
   840x525 57.0
   800x600 58.0 59.0
   800x512 60.0
   720x450 61.0
   640x512 62.0
   640x480 63.0 64.0
   640x400 65.0
   640x384 66.0
   576x384 67.0
   512x384 68.0
   400x300 69.0 70.0
   320x240 71.0

snaker@cornelius:~$ uname -a
Linux cornelius 2.6.24-16-generic #1 SMP Thu Apr 10 13:23:42 UTC 2008 i686 GNU/Linux

Revision history for this message
eSe (snaker) wrote :
Revision history for this message
Bryce Harrington (bryce) wrote :

Please also attach your /var/log/Xorg.0.log

Changed in xorg:
status: New → Incomplete
Revision history for this message
eSe (snaker) wrote :

Xorg.0.log

Bryce Harrington (bryce)
Changed in xorg:
importance: Undecided → Medium
status: Incomplete → Triaged
Revision history for this message
eSe (snaker) wrote :

This bug can be fix manually using next command:

$ xsetwacom set stylus rotate X
$ xsetwacom set cursor rotate X
$ xsetwacom set eraser rotate X

where X is
cw --> for 180º rotate
ccw --> for portrait use
none --> for normal use

xsetwacom is provided by wacom-tools package

Revision history for this message
Bulat (bulatkjug) wrote :

This bug affects probably all convertables (Tablet <-> Laptop). There are several copies of this bug already in launchpad. It'd be appreciated if someone could link them together. In those bug-report discussions there are already several workarounds - a couple of user-written working auto-rotation scripts, and even those that not only synchronize digitizer rotation with a screen output mode, but also make use of built-in 3D accelerometer to automatically rotate screen output and digitizer. (this one is for IBM, but I suppose, that one could make use of it on Toshiba also with some changes)

Revision history for this message
Bulat (bulatkjug) wrote :

Wacom drivers and screen output rotation should work in pair in both cases:
rotate screen output and digitizer input when user set screen rotation in screen resolution settings;
auto-rotate screen output and digitizer input when convertable laptop is converted into tablet mode.
This bug-report concerns the second case.
There's another bug-report, that concerns the first case: https://bugs.launchpad.net/ubuntu/+source/wacom-tools/+bug/288231

Here's link to a bug-report for IBM/Lenovo that contains auto-rotation scripts with 3D accelerometer support: https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/159026

Revision history for this message
Karl Hegbloom (karl.hegbloom) wrote :

I have recently purchased a Lenovo Thinkpad X61-Tablet (1400x1050 tablet/display). It's running Ubuntu Intrepid Ibex, with the Gnome desktop environment.

I've got automatic screen rotation working, using bits and pieces of code found searching the net, and some I wrote myself based on what I learned. I'm in the process of cleaning it up and squaring it away into an installable .deb package. I expect to have it ready within a week.

So far, there's a daemon that connects to the display and registers to receive screen rotation events. When it gets woken up by one, if the rotation is different from the last time, it calls a shell script with a single argument, the new rotation. The script is responsible for remapping the arrow-pad directions, and rotating the Wacom tablet to match the screen.

I've also created a script for /etc/pm/sleep.d that calls that same hook when the tablet wakes up from suspend or hibernate, since I've had problems with the wacom driver surviving that. It worked before the upgrade, now it's got the wrong bounding area after the resume unless I run 'xsetwacom' commands to reset it.

There's a set of event definitions for acp-support that have the acpid call a handler script that sets the screen orientation (via a call to the 'xrandr' command line tool) when the screen is swiveled down to tablet mode or up to laptop mode. Once 'xrandr' is done and the X Server changes rotation, the rotated wakes up and does it's job.

What remains is to support changing mode at the gdm login screen, and to see about having the Gnome session start up in the correct orientation. When the screen is turned 'right', for tablet mode operation, at the gdm login screen, the user's gnome session starts up in 'normal' orientation. I think this means that the rotation is being set by the 'gnome' system when instead it should be using the rotation the display is already set at, or... that the user's gnome settings need to be updated to reflect the desired rotation setting?

I'm using Bazaar for version control, and will open a PPA for it when it's ready for that. In the meantime, if anyone wants a copy and/or wants to help develop this thing, please contact me off-list.

<email address hidden>

Revision history for this message
Karl Hegbloom (karl.hegbloom) wrote :
Revision history for this message
Tom Jaeger (thjaeger) wrote : Re: [Bug 217182] Re: Rotate Screen in TabletPC stylus and pointer mouse not coincidence

Karl Hegbloom wrote:
> So far, there's a daemon that connects to the display and registers to
> receive screen rotation events. When it gets woken up by one, if the
> rotation is different from the last time, it calls a shell script with a
> single argument, the new rotation. The script is responsible for
> remapping the arrow-pad directions, and rotating the Wacom tablet to
> match the screen.

This seems to be based on an earlier version of my wacomrotate daemon:

http://github.com/thjaeger/wacomrotate/tree/master
http://ppa.launchpad.net/thjaeger/ubuntu/pool/main/w/wacomrotate/

I've added rudimentary auto-detection of available wacom devices since
then, maybe you want to add this to your program. The reason is that
USB tablets need to have xsetwacom called for both their "touch" device
and their "stylus" device in order for touch screen input to be properly
rotated.

Revision history for this message
gw0 (gw-launchpad) wrote :

For Toshiba Portege M200: Isn't the root problem located in the fact that acpid doesn't trigger an event when you rotate? I can't see anything on the acpi_listen output, but if I check the contents of /proc/acpi/button/lid/LID/state the state changes from "open" to "closed". It seems that acpid doesn't pass this event further when it happens, just ignores. On the other hand a "lid" event is triggered correctly when I normally close the display (button/lid LID 00000080 00000005, button/lid LID 00000080 00000006).

Once this would work, one could write a acpi event handler like /etc/acpi/events/asus-rotate that calls the script /etc/acpi/rotatescreen.sh that would additionally also need to call: xsetwacom set stylus rotate ...

So, this is a problem connected with the packages "acpid" and "acpi-support".

Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) wrote :

This is still an issue in Karmic. It's quite fundamental in that the "rotate" option in gnome-control-centre is pretty much useless without rotating the tablet as well. Whilst it's possible to rotate the tablet via manual methods, on the command line, I don't think this is acceptable. A new user would likely rotate the desktop as per the control center dialog, and then find the pen is all over the place.

Revision history for this message
Slogger (slogger) wrote :

I have this issue with the touchpad on my netbook.

I really wish touchpad orientation would rotate with the screen. Make e-book reading so much nicer.

Revision history for this message
ronny (ronny-standtke) wrote :

Unfortunately, I have to join in here. I just installed Ubuntu 9.10 on a HP Elitebook 2730p and was completely puzzled by the fact that screen rotation works but completely messes up the stylus input. Too bad, otherwise Ubuntu starts to look usable...

Revision history for this message
Tom Jaeger (thjaeger) wrote :

For those looking for a "one-click" solution, I've recently updated the 'wacomrotate' package in my tablet ppa to lucid:

https://launchpad.net/~thjaeger/+archive/tabletpc

Revision history for this message
Zeyelth (zeyelth) wrote :

I had the same issue with my Asus R1E Tablet PC under Ubuntu 10.04. All the events worked, but the script responsible for rotating the screen simply didn't update the tablet rotation.

Wrote a patch which takes care of it. Works for me on my tablet, but I can't test it on other tablets, so YMMV.

tags: added: patch
Revision history for this message
Yossi Gil (yossi-gil) wrote :

Bug still here at 12.04 with X220

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.