[Lucid] xf86ScaleAxis problems with high resolution devices

Bug #730488 reported by Eduard Hasenleithner on 2011-03-07
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xorg-server (Ubuntu)

Bug Description

On certain higher resolution touchpads, an integer overflow can occur since their range exceeds the maximum int value.

This issue can crop up on Lucid if the user self-compiles -wacom or uses a backport package from a PPA. It does not affect the shipped version of -wacom in Lucid.

[Development Solution]
This was fixed upstream by using a 64-bit integer rather than 32-bit to extend the range. This fix is included in the upstream version of xorg-server we are shipping in natty.

[Stable Solution]
A backport of the fix has been made for Lucid.

[Test Case]
See below (requires affected hardware and rebuilding -wacom on Lucid)

[Regression Potential]
None. No APIs are changed, and increase of the data type has no other code effects.

[Original Report]
The xf86ScaleAxis function is used to scale x and y axis values of input devices between different resolutions. Due to internal integer overflow, the acceptable value range for its arguments are limited below their type (signed 32bit integer). This imposes a problem for high resolution devices, like the wacom Intuos 4 L, which have a total horizontal resolution of 65024. Example: when doing a scaling with a range of more than 46340 (Sxhigh-Sxlow), the integer X will wrap into negative values, and truncated to 0 at the end.

Among other devices, this problem affects wacom Intuos 4 L and XL tablets when compiling the xf86-input-wacom driver version 0.10.9 and above. Previous versions work, because they don't use the xf86ScaleAxis function. With current xorg releases this problem does not happen either, because a upstream patch (http://lists.x.org/archives/xorg-devel/2010-April/007333.html) already extends the acceptable value range. A solution would be to include this patch into 10.04, because there is still quite a time till the next LTS.

If there is a chance for getting this patch included into 10.04 I'm willing to make a patch specific for the current xorg-server-1.7.6 package and test it.

bugbot (bugbot) on 2011-03-07
affects: xorg (Ubuntu) → xorg-server (Ubuntu)
bugbot (bugbot) on 2011-03-07
tags: added: lucid
tags: added: patch
Bryce Harrington (bryce) wrote :

Yes, this looks like a suitable version of the fix that's included in natty.
This will need to be SRU'd of course.

Changed in xorg-server (Ubuntu):
status: New → Confirmed

I've read some SRU related documentation and decided to supply a debdiff. I did not yet test it. I'm quite new to this stuff, so is this the way to go?

Bryce Harrington (bryce) on 2011-03-08
description: updated
Changed in xorg-server (Ubuntu Natty):
status: Confirmed → Fix Released
Changed in xorg-server (Ubuntu Lucid):
status: New → Fix Committed
importance: Undecided → Medium
Changed in xorg-server (Ubuntu Natty):
importance: Undecided → High

Accepted xorg-server into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed

I tested the new xserver-common 2:1.7.6-2ubuntu7.6 and it works perfectly.

1) Compiled and (make-) installed xf86-input-wacom-0.10.10.
2) Restarted x-server: Stylus cursor wraps to zero
3) Activated lucid-proposed in update-manager and performed update
4) Restarted computer: Stylus cursor usable over total x-axis

Thanks for the fast inclusion into lucid-proposed. From now on I will use the new xserver and report problems in case I find any.

madbiologist (me-again) on 2011-04-21
tags: removed: verification-needed
tags: added: verification-done
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xorg-server - 2:1.7.6-2ubuntu7.6

xorg-server (2:1.7.6-2ubuntu7.6) lucid-proposed; urgency=low

  * Add 204_scale_high_resolution.patch: Use larger 64-bit integer to
    avoid integer overflow with high resolution devices like the Wacom
    Intuos 4L and XL tablets.
    (LP: #730488)
 -- Bryce Harrington <email address hidden> Mon, 07 Mar 2011 18:18:13 -0800

Changed in xorg-server (Ubuntu Lucid):
status: Fix Committed → Fix Released
Yvon TANGUY (vono22) wrote :


after upgrade my Ubuntu with this patch, X.org crash at system start-up (hard reboot mandatory).
To repair it, I had to log in without X (failsafe mode), and re install the AMD/ATI proprietary driver.
It may be cool, if this type of change occur in the future, to notice the user, that they may have to reinstall their drivers, if they use proprietary drivers.

Note: I do not use the proprietary package proposed by Ubuntu, but the one download directly to the amd.com website. The Ubuntu driver is too old and does not recognize my graphic card (Radeon HD 6850).

Thanks for your attention.

Hi Yvon

The patch makes no change to the ABI nor API. Reading your description I get the impression, the most likely reason for the failure is that the AMD driver overwrites some packaged file of the xorg-server. If there is any update of the xorg-server, it gets re-set to the "clean" state, and is therefore not able to load the Radeon driver anymore.

If this is correct, any security update of xorg-server would have the same problem.

Yvon TANGUY (vono22) wrote :


Yes I think, it's maybe not the first time it happen, I don't remember.

Maybe it is the MAD driver which does not do things well. Erase files with their own, it's not a good way to do. But it's like that, and I cannot change it. One thing can be done really easily I guess, it's to warn the user of this issue.
If you are aware of it, you can takes actions before it brakes.

Since i upgraded to this version of xserver, i get errors when i start my laptop

The attachment is the log file of the xserver.
I don't know the upgrade is related, but i never had problems with the xserver until that upgrade.

I see a '[drm] failed to load kernel module "i915"' in your log file. What dmesg output do you get when you try "modprobe i915"?

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

Other bug subscribers

Bug attachments