[intrepid] suspend/resume with wacom pointers rotated loses calibration

Bug #295292 reported by Andrew Lofthouse
50
This bug affects 6 people
Affects Status Importance Assigned to Milestone
xf86-input-wacom (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: wacom-tools

Intrepid (with wacom-tools-0.8.1.4-0ubuntu3) is installed on an HP TC4200 tablet pc. With the attached xorg.conf, I observe the following behavior:

- suspend/resume machine without any display/pointer rotation => pen works correctly, with the cursor calibrated to the position of the pen on the screen

- rotate the display, without rotating the wacom pointers (xrandr -o right). Then suspend/resume the machine and rotate the display back to landscape (xrandr -o normal) => no calibration problem

- rotate the display and the wacom pointers (xrandr -o right && xsetwacom set Stylus Rotate cw && xsetwacom Eraser Rotate cw). The pen/cursor calibration is fine. Then suspend/resume the machine => The pen/cursor calibration is off. When the pen is at the center of the screen, the cursor is approximately 2 inches up and to the left of the center (with the screen in portrait mode). Rotating the screen and pointers back to normal landscape position (xrandr -o normal && xsetwacom set Stylus Rotate none && xsetwacom Eraser Rotate none) the calibration continues to be off, with the cursor up and to the right of the pen. If I move the pen to the top left corner of the screen (landscape), the cursor is right under the pen. As I move the pen to the right, the cursor gradually moves faster to the right than the pen. Starting from the top left corner again and moving the pen down, the cursor moves slower toward the bottom of the screen than the pen.

- rotate only the wacom pointers (xsetwacom set Stylus Rotate cw && xsetwacom Eraser Rotate cw), then suspend/resume the machine, then return the wacom pointer rotation to normal (xsetwacom set Stylus Rotate none && xsetwacom Eraser Rotate none) => The pen and cursor show the same problem as described above (poor calibration between pen and cursor).

So, the calibration is only affected when the wacom pointers are rotated. It seems that the wacom pointers get the dimensions of the screen mixed up after a suspend/resume if they are rotated. After each of these cases, restarting the xserver restores the proper calibration. It also does not matter if the TopX, TopY, BottomX, BottomY lines are enabled or commented in the attached xorg.conf, the same behavior is observed.

This is a regression as it worked correctly in Hardy.

Revision history for this message
Andrew Lofthouse (loftyhauser) wrote :
Revision history for this message
Loïc Martin (loic-martin3) wrote :

Andrew, your bug report is really detailed, thanks.

I don't know how to solve the problem. However, as a temporary fix you can use wacomcpl, copy the .xinitrc created to another name (for example "calibration"), make it executable and create a panel launcher with, as command:
sh /path/to/the/file/calibration

Then click on the launcher each time the calibration is off.

Try also posting in linuxwacom-discuss since your troubleshooting is already quite thorough, they may get it fixed faster (but they might ask you to install 0.8.1.6 version first, see https://help.ubuntu.com/community/Wacom/LatestDriver ).

Revision history for this message
Andrew Lofthouse (loftyhauser) wrote :

Oh, this is frustrating. I installed the latest wacom-tools (0.8.1.6, as described in the link you posted--BTW, that page should also include the --prefix=/usr option to configure, otherwise the updated driver is installed in /usr/local and isn't used). The xserver now crashes every time I rotate the display with compiz enabled (with or without the wacom pointers), as described in another bug report (https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/294309). With compiz disabled, the xserver doesn't crash, but the calibration problem remains.

Thanks for the work-around--unfortunately, this won't really work to unlock the screen (with cellwriter) after resuming from a suspend. As far as posting to the linuxwacom-discuss list--I'm afraid to subscribe to that list with the slew of spam messages that are posted. :)

Revision history for this message
Loïc Martin (loic-martin3) wrote :

Andrew, that page needs to be corrected then. Is it for installing the binaries or compiling?

For the crash, your also had the crash before installing the 0.8.1.6 wacom drivers with an xorg.conf that doesn't have any configuration for wacom devices. Then after updates you didn't have it, and after installing the 0.8.1.6 wacom drivers you had it again - it's going to get hard to trobleshoot, especially if some updates were installed in the meantime.

Try reinstalling the wacom drivers from the repos :
sudo apt-get purge xserver-xorg-input-wacom wacom-tools
sudo apt-get install xserver-xorg-input-wacom wacom-tools

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

[This is an automated message]

Hi loftyhauser,

Thanks for including the attached files. Could you also include your /var/log/Xorg.0.log?

Changed in wacom-tools:
status: New → Incomplete
Revision history for this message
Andrew Lofthouse (loftyhauser) wrote :

I don't know what caused the crash--I haven't been using my Ubuntu install very much lately, so I haven't investigated the xserver crash. I did, however, rebuild the hardy wacom-tools package (0.7.9.8) for intrepid and I'm using it. There are no more calibration issues there...

Revision history for this message
Asheesh Laroia (paulproteus) wrote :

I believe I experience this on a ThinkPad X61 Tablet. I haven't tried any of the suggested fixes yet.

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

I also have this problem, on a new Thinkpad X61 Tablet. You can keep working if you arrange to have a script run after resume that calls xsetwacom to reset TopX, TopY, BottomX, and BottomY.

Revision history for this message
Stefan (stfn2) wrote :

What does your script look like, and where did you put it? I tried to do the same, but it did not work. I attach my script, which I put in /etc/pm/sleep.d/50wacres. The output redirections in there tell me that it does get run, and as root.

Cheers,
Stefan

Revision history for this message
Rogan Creswick (creswick) wrote :

I've written up a workaround here:
http://blog.ciscavate.org/2009/01/the-linux-tablet-wacom-rotations-waking-up-on-the-wrong-side.html

and I've attached the script that I put in /etc/pm/sleep.d to re-calibrate on my X61 tablet.

--Rogan

Revision history for this message
Stefan (stfn2) wrote :

I followed your instructions closely, but no luck. I know that the script does run because I put a

   touch /home/myname/I_DID_RUN

line in there. I suspect the xsetwacom command fails to connect to my X server, even though I do correctly specify it as :0.0. This on an almost fresh installation of Intrepid. Any idea what might be going on? Maybe something to do with the screensaver login dialog that comes up first on resume? Thanks for any insight!

Stefan

Revision history for this message
Rogan Creswick (creswick) wrote :

Stefan:

I apparently did something that broke this on my machine as well (last night). I've installed tp_smapi, and it's possible that that interferes with it some how, but I'm pretty confused right now too.

Running the script manually still works (eg: /etc/pm/sleep.d/40wacomCalibrate thaw) and as you said, it is running on resume. Opening up x to all connections (xhost +) had no noticeable effect either.

--Rogan

Revision history for this message
Rogan Creswick (creswick) wrote :

 Ok, this is just informational -- I think I've made some headway but unfortunately I haven't figured out a solution yet.

I fixed a couple problems:

   * xsetwacom was not being found when the sleep.d script was running
   * root did not have access to the :0.0 display (as evidenced by "Failed to open display (:0.0) No protocol specified")
   * Logging was broken / non-existant -- that's improved (set LOG)

Previously my testing process was also broken, so I was seeing false positive results. I assumed that rotating was not necessary before sleeping if the stylus was still not calibrated. It turns out that rotating then sleeping *is* necessary. It seems that the stylus is being recalibrated to the state it was at two cycles back... (that's just a guess though... more testing needed).

Revision history for this message
COoLoSER (szymonolko) wrote :

I made a script which works for me in every case. Put it in /etc/pm/sleep.d

On suspend/hibernate it stores current calibration values and restore them on resume/thaw. It connects to X server with display :0.0 with user that is owner of that process. There is a need to sleep for 2 seconds before restoring values, without that sleep something overwrites restored values.

Revision history for this message
Wouter Deconinck (wdconinc) wrote :

With a single small modification the script of comment 15 works. It seemed a tiny bit xfce/gnome(?)-specific and searched for a user executing the process 'x-session-manager'. In kde(3.5) this does not exist, but if you modify the script to search for the process 'X' then it works great. Thanks!

I would suggest this script for inclusion in wacom-tools or even xserver-xorg-input-wacom.

Revision history for this message
Keith Gillis (kjgillis) wrote :

I'm running the lates jaunty on and X61t and have the same problem. COoLoSER's script worker for me.

Revision history for this message
Andrew Lofthouse (loftyhauser) wrote :

Very nice. This script (03calibrate.sh) seems to do the trick. I just installed Jaunty, updated, and after a couple of mis-steps, it looks like it's working. I'm not sure if the mis-steps were due to resuming too fast after suspending or something else, but it seems to work now (fingers crossed).

Revision history for this message
MyR (myr-jedi) wrote :

it might be worth noting that the script must be owned by root.

Bryce Harrington (bryce)
Changed in wacom-tools (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
sanktnelson (launchpad-maibaums) wrote :

this is really annoying, as nice as it is having a workaround, it's a bit pitiful that this is still not fixed in jaunty RC1.

Revision history for this message
sanktnelson (launchpad-maibaums) wrote :

also: none of the provided scripts work for me. not sure if this is related to the fact that the id "stylus" doesn't work in jaunty any more due to everything being done through HAL now, or if it wouldn't have worked in the first place. Did I mention regressions are annoying?

Revision history for this message
Keith Gillis (kjgillis) wrote :

This problem seems to be fixed in the final release of jaunty.

Revision history for this message
schmolch (saschaheid) wrote :

Im loosing calibration no matter if the screen is updated or not on both of my x60t running jaunty.

Revision history for this message
schmolch (saschaheid) wrote :

and the script mentioned earlier does also not do anything for me.

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

Please everyone have a look at:

  https://code.launchpad.net/~karl.hegbloom/tabuntu/tablet-screen-rotation-support

I'd like to see this developed into a full fledged package with support for many models of tablet laptop.

Revision history for this message
MyR (myr-jedi) wrote :

The 03calibrate.sh script works for me in 9.04 Jaunty. I had to modify it to work for my xubuntu installation however.
Check out my tc1100 tablet guide: www.unifyingtheory.net/tabletbuntu.html

Bryce Harrington (bryce)
tags: added: intrepid
Revision history for this message
Bryce Harrington (bryce) wrote :

Thank you for reporting this issue with wacom-tools, we are migrating it to the new xf86-input-wacom package which has replaced it in the development version of Ubuntu.

This would be a good point for you to re-test this issue against the new package to see if is still occurring. If not, you can mark it as Fix Released in Launchpad. If it is still an issue in the current development release and you're the original reporter, please reply and attach a fresh Xorg.0.log.

affects: wacom-tools (Ubuntu) → xf86-input-wacom (Ubuntu)
Bryce Harrington (bryce)
Changed in xf86-input-wacom (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
schmolch (saschaheid) wrote :

I can not reproduce this anymore.
Im using 2 Serial Wacom Tablet-PCs and calibration is fine regardless of the orientation.

Revision history for this message
MyR (myr-jedi) wrote :

I will test this on my TC1100 as soon as I can get suspend working.

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

[This is an automatic notification.]

Hi Andrew,

This bug was reported against an earlier version of Ubuntu, can you
test if it still occurs on Lucid?

Please note we also provide technical support for older versions of
Ubuntu, but not in the bug tracker. Instead, to raise the issue through
normal support channels, please see:

    http://www.ubuntu.com/support

If you are the original reporter and can still reproduce the issue on
Lucid, please run the following command to refresh the report:

  apport-collect 295292

If you are not the original reporter, please file a new bug report, so
we can work with you as the original reporter instead (you can reference
bug 295292 in your report if you think it may be related):

  ubuntu-bug xorg

If by chance you can no longer reproduce the issue on Lucid or if you
feel it is no longer relevant, please mark the bug report 'Fix Released'
or 'Invalid' as appropriate, at the following URL:

  https://bugs.launchpad.net/ubuntu/+bug/295292

Changed in xf86-input-wacom (Ubuntu):
status: Incomplete → New
status: New → Incomplete
tags: added: needs-retested-on-lucid-by-june
Revision history for this message
Bryce Harrington (bryce) wrote :

We're closing this bug since it is has been some time with no response from the original reporter. However, if the issue still exists please feel free to reopen with the requested information. Also, if you could, please test against the latest development version of Ubuntu, since this confirms the bug is one we may be able to pass upstream for help.

Changed in xf86-input-wacom (Ubuntu):
status: Incomplete → Expired
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.