Touchpad speed asymetrical (horizontal faster than vertical)

Bug #621432 reported by Mathieu Marquer
56
This bug affects 11 people
Affects Status Importance Assigned to Milestone
Xserver Xorg Input Synaptics
Won't Fix
Medium
xserver-xorg-input-synaptics (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: xserver-xorg-input-synaptics

Using Ubuntu Maverick on a Samsung NC10 : since that release, moving my touchpad horizontally makes the pointer to move faster than moving it vertically.

I already had this behavior when I was using X from xorg-edgers PPA with Lucid.

Please let me know if you need additionnal informations.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: xserver-xorg-input-synaptics 1.2.2-2ubuntu3 [modified: usr/bin/synclient usr/bin/syndaemon]
ProcVersionSignature: Ubuntu 2.6.35-15.21-generic 2.6.35.1
Uname: Linux 2.6.35-15-generic i686
Architecture: i386
DRM.card0.LVDS.1:
 status: connected
 enabled: enabled
 dpms: On
 modes: 1024x600
 edid-base64: AP///////wAOFMQEAAAAAAsTAQOAFw54ClB1klhWkicfUFQAAAABAQEBAQEBAQEBAQEBAQEBlBEAsEBYGSAwIDYA3oIAAAAZAAAADwAAAAAAAAAAACBuBQ8AAAAA/gBDUFQgICAgICAgICAgAAAA/gBDTEFBMTAyTkEwQSAgAGU=
DRM.card0.VGA.1:
 status: disconnected
 enabled: disabled
 dpms: Off
 modes:
 edid-base64:
Date: Fri Aug 20 23:57:05 2010
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Alpha i386 (20100812)
MachineType: SAMSUNG ELECTRONICS CO., LTD. NC10
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.35-15-generic root=UUID=14c3da20-90cd-416c-932d-fc86ad750d06 ro quiet splash
ProcEnviron:
 LANG=fr_FR.utf8
 SHELL=/bin/bash
SourcePackage: xserver-xorg-input-synaptics
dmi.bios.date: 09/08/2009
dmi.bios.vendor: Phoenix Technologies Ltd.
dmi.bios.version: 11CA.M015.20090908.RHU
dmi.board.name: NC10
dmi.board.vendor: SAMSUNG ELECTRONICS CO., LTD.
dmi.board.version: Not Applicable
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: SAMSUNG ELECTRONICS CO., LTD.
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnPhoenixTechnologiesLtd.:bvr11CA.M015.20090908.RHU:bd09/08/2009:svnSAMSUNGELECTRONICSCO.,LTD.:pnNC10:pvrNotApplicable:rvnSAMSUNGELECTRONICSCO.,LTD.:rnNC10:rvrNotApplicable:cvnSAMSUNGELECTRONICSCO.,LTD.:ct10:cvrN/A:
dmi.product.name: NC10
dmi.product.version: Not Applicable
dmi.sys.vendor: SAMSUNG ELECTRONICS CO., LTD.
glxinfo: Error: [Errno 2] Aucun fichier ou dossier de ce type
system:
 distro: Ubuntu
 codename: maverick
 architecture: i686
 kernel: 2.6.35-15-generic

Revision history for this message
Mathieu Marquer (slasher-fun) wrote :
Bryce Harrington (bryce)
tags: added: edgers
Revision history for this message
Brian Marshall (bmars) wrote :

This is still a problem with the latest maverick for me. I noticed it when attaching an external monitor to my laptop, which more than doubled the horizontal screen resolution without increasing the vertical resolution that much. It made the touchpad incredibly unwieldy.

Any update on the progress for this bug?

Changed in xserver-xorg-input-synaptics (Ubuntu):
status: New → Confirmed
Revision history for this message
In , Simon Strandman (nejsimon) wrote :

Created attachment 40284
Xorg.0.log

I've installed Ubuntu 10.10 on two netbooks, one Acer D250 and one Samsung nf310.

Both have a problem with the synaptics driver. The horizontal acceleration is greater than the vertical, hence the pointer is not very precise and it's very annoying.

This can be solved by tweaking the config:

On the samsung I use:
  Option "VertResolution" "135"
 Option "HorizResolution" "100"

And on the Acer:
 Option "VertResolution" "1"
 Option "HorizResolution" "1"

But the driver should be able to auto identify this, especially since windows gets it right.

The driver seems to have problems loading as there is stuff like this in the Xorg.0.log on both machines:
[ 495.943] (EE) Query no Synaptics: 6003C8
[ 495.943] (--) SynPS/2 Synaptics TouchPad: no supported touchpad found
[ 495.943] (EE) SynPS/2 Synaptics TouchPad Unable to query/initialize Synaptics hardware.
[ 495.944] (EE) PreInit returned NULL for "SynPS/2 Synaptics TouchPad"
But the touchpad works anyway and it's possible to use touchpad features like tapping and scrolling.

The Xserver is version 1.9.0 and synaptics is version 1.3.99 from git but 1.2.2 that came with ubuntu had this problem too. I've attatched the Xorg.0.log from the samsung (the one from the acer is similar). The log is taken when my tweaks are disabled.

Revision history for this message
In , Simon Strandman (nejsimon) wrote :

Created attachment 40346
50-synaptics.conf

As requested, this is my 50-synaptics.conf from the samsung (I have a similar one on the acer). When I ran X to create the attatched Xorg.0.log I disabled all my options so that they wouldn't interfere with the auto detection. All line staring with # are my own, the others are from ubuntu.

Also I don't have an /etc/X11/xorg.conf

Revision history for this message
In , Peter Hutterer (peter-hutterer) wrote :
Revision history for this message
In , Simon Strandman (nejsimon) wrote :

Yes, this does indeed fix the errors in the Xorg log. But the other problem remains of course. :)

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

Hmm, I wonder if this is another case of synaptics/xserver scaling like in bug #327428 (which I posted a fix to natty for yesterday). Can you refer to that bug report and see if it illuminates what's going on with your case? That bug also shows several tools for collecting data on how exactly the touch events are getting captured and handled, which you could probably use to analyze your issue.

Changed in xserver-xorg-input-synaptics (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
In , Freedesktoporg (freedesktoporg) wrote :

Just to confirm, I and others have the same problem. It seems synaptics calculates pointer speed/acceleration as a percentage of the total horizontal and vertical pixels available. On a single screen (16:9 ratio, 1920x1080) my horizontal and vertical speeds are identical, but when I extend my desktop horizontally by adding another screen (using TwinView, if that matters), the horizontal speed increases, while vertical speed stays the same. Very annoying. Other pointing devices (like external mice and the trackpoint) do not have this problem, apparently because they're handled by evdev and not synaptics. This is in Ubuntu 10.10 amd64 on a Lenovo Thinkpad W510. I've linked to the ubuntu bug (https://bugs.launchpad.net/utouch/+bug/726832). Is this the most appropriate xorg bug to be linking to from there?

Revision history for this message
In , Simon Strandman (nejsimon) wrote :

@Martin: I think this is the correct bug, unless the acceleration changing when attatching a second screen is considered a different issue. Synaptics should set the correct resolution on start and then stick with it. It doesn't change if you manually set the resolution btw.

Changed in xserver-xorg-input-synaptics:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Jonathan Almeida (jonalmeida) wrote :

I'm still facing this problem in Oneiric 11.10

Revision history for this message
In , Miknix (miknix) wrote :

(In reply to comment #4)
> Just to confirm, I and others have the same problem. It seems synaptics
> calculates pointer speed/acceleration as a percentage of the total horizontal
> and vertical pixels available.

Same problem here! Vertical and horizontal touchpad cursor speeds seem to be similar when starting X with a single screen, then as soon as another screen is attached horizontally, the horizontal cursor speed goes insane. Conversely, when a screen is attached vertically, the vertical cursor speed is increased.

I'm not using any synaptics specific Xorg.conf options.

xf86-input-synaptics-1.4.0
xorg-server-1.11.2-r2

Thanks,
Angelo

Revision history for this message
In , Peter Hutterer (peter-hutterer) wrote :

This is somewhere in the server, the accel the driver supplies is always the same.

Revision history for this message
In , Peter Hutterer (peter-hutterer) wrote :

*** Bug 40417 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Freedesktoporg (freedesktoporg) wrote :

It looks like Bryce Harrington put together a patch way back in 2010 to address this, or at least something closely related. Here's the link:

https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-synaptics/+bug/327428/+attachment/1752254/+files/116_resolution_detect_option.patch

Here's another patch from the same (duplicate) launchpad bug report:

https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-synaptics/+bug/327428/+attachment/1368744/+files/synaptics.diff

Revision history for this message
In , Peter Hutterer (peter-hutterer) wrote :

(In reply to comment #9)
> It looks like Bryce Harrington put together a patch way back in 2010 to address
> this, or at least something closely related. Here's the link:
>
> https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-synaptics/+bug/327428/+attachment/1752254/+files/116_resolution_detect_option.patch
>
> Here's another patch from the same (duplicate) launchpad bug report:
>
> https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-synaptics/+bug/327428/+attachment/1368744/+files/synaptics.diff

That's a hack. We need to fix the problem, not just paper over it with another option.

Revision history for this message
In , Simon-thum (simon-thum) wrote :

I think this was discussed recently on the mailing list - maybe in your holidays - synaptics somehow adjusts itself to the display geometry, IIRC.

I don't find it right now, but it sounds as if you could check for display code in synaptics just to be safe.

Revision history for this message
In , Peter Hutterer (peter-hutterer) wrote :

(In reply to comment #11)
> I think this was discussed recently on the mailing list - maybe in your
> holidays - synaptics somehow adjusts itself to the display geometry, IIRC.

the driver itself has no knowledge of the display size, I think it's just the only driver that triggers it. some combination of setups, possibly the absolute axis ranges but relative events being sent.

Revision history for this message
In , TB2 (gt6) wrote :
Download full text (6.2 KiB)

I have the same problem. I use one screen above the other and my vertical mouse pointer speed is about double of the horizontal speed. It's unusable this way.

Now this might be a different bug or not a bug at all, but I noticed that the VertResolution and HorizResolution options are missing, even though they are specified in man synaptics:

---------------
Option "VertResolution" "integer"
   Resolution of X coordinates in units/millimeter.
   The value is used together with HorizResolution to
   compensate unequal vertical and horizontal sensi‐
   tivity. Setting VertResolution and HorizResolution
   equal values means no compensation. Default value
   is read from the touchpad or set to 1 if value
   could not be read. Property: "Synaptics Pad Reso‐
   lution"

Option "HorizResolution" "integer"
   Resolution of Y coordinates in units/millimeter.
   The value is used together with VertResolution to
   compensate unequal vertical and horizontal sensi‐
   tivity. Setting VertResolution and HorizResolution
   equal values means no compensation. Default value
   is read from the touchpad or set to 1 if value
   could not be read. Property: "Synaptics Pad Reso‐
   lution"
---------------

synclient:
---------------
Parameter settings:
    LeftEdge = 130
    RightEdge = 3130
    TopEdge = 114
    BottomEdge = 2005
    FingerLow = 1
    FingerHigh = 1
    FingerPress = 256
    MaxTapTime = 180
    MaxTapMove = 171
    MaxDoubleTapTime = 180
    SingleTapTimeout = 180
    ClickTime = 100
    FastTaps = 1
    EmulateMidButtonTime = 0
    EmulateTwoFingerMinZ = 282
    EmulateTwoFingerMinW = 7
    VertScrollDelta = 77
    HorizScrollDelta = 77
    VertEdgeScroll = 0
    HorizEdgeScroll = 0
    CornerCoasting = 0
    VertTwoFingerScroll = 1
    HorizTwoFingerScroll = 1
    MinSpeed = 1
    MaxSpeed = 0.1
    AccelFactor = 0.1
    TrackstickSpeed = 40
    EdgeMotionMinZ = 30
    EdgeMotionMaxZ = 160
    EdgeMotionMinSpeed = 1
    EdgeMotionMaxSpeed = 311
    EdgeMotionUseAlways = 0
    TouchpadOff = 2
    LockedDrags = 0
    LockedDragTimeout = 5000
    RTCornerButton = 0
    RBCornerButton = 0
    LTCornerButton = 0
    LBCornerButton = 0
    TapButton1 = 1
    TapButton2 = 2
    TapButton3 = 3
    ClickFinger1 = 1
    ClickFinger2 = 3
    ClickFinger3 = 2
    CircularScrolling = 0
    CircScrollDelta = 0.1
    CircScrollTrigger = 0
    CircularPad = 0
    PalmDetect = 1
    PalmMinWidth = 4
    PalmMinZ = 1
    CoastingSpeed = 20
    CoastingFriction = 50
    PressureMotionMinZ = 30
    PressureMotionMaxZ = 160
    PressureMotionMinFactor = 1
    PressureMotionMaxFactor = 1
    GrabEven...

Read more...

Revision history for this message
In , Peter Hutterer (peter-hutterer) wrote :

Pad Resolution is currently readonly on purpose - your pad is unlikely to change resolutions at runtime. I admit it would make testing it easier but right now you need to add an xorg.conf(.d) option for it. synclient appears to be lacking it altogether, that should be fixed (patches appreciated)

Revision history for this message
In , Peter Hutterer (peter-hutterer) wrote :
Revision history for this message
In , Simon Strandman (nejsimon) wrote :

The patch in comment 15 seems to be working. Thanks! :)

Revision history for this message
In , Peter Hutterer (peter-hutterer) wrote :

commit 61a99aff9d33728a0b67920254d2d4d79f80cf39
Author: Peter Hutterer <email address hidden>
Date: Fri Jan 11 14:22:07 2013 +1000

    dix: pre-scale relative events from abs devices to desktop ratio (#31636)

Changed in xserver-xorg-input-synaptics:
status: Confirmed → Fix Released
Revision history for this message
Simon Strandman (nejsimon) wrote :

Please add the patch in an update now when it's upstream! It applies without rejects to the xserver in precise. It would be nice to not have to patch and compile my own xserver just to fix this bug. :)

tags: added: raring
Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

Hmm, seems like the upstream patch is already included in Raring, without solving the problem for me with my Lenovo X230t:

$ quilt push
Applying patch dix-pre-scale-relative-events-from-abs-devices-to-desktop-ratio-31636.patch
patching file dix/getevents.c
Hunk #1 FAILED at 776.
Hunk #2 FAILED at 1380.
2 out of 2 hunks FAILED -- rejects in file dix/getevents.c
Patch dix-pre-scale-relative-events-from-abs-devices-to-desktop-ratio-31636.patch can be reverse-applied

Changed in xserver-xorg-input-synaptics (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

As the patch is included in Raring, please test and report back if this issue is solved in Ubuntu 13.04 with all updates installed.

Revision history for this message
Simon Strandman (nejsimon) wrote :

Of the 3 computers that had this problem I have tested 2 with raring and the problem is solved for both.

Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

Marking as fixed then according to comment #26.

Changed in xserver-xorg-input-synaptics (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
In , Chris Hubick (hubick) wrote :

What release was this actually fixed in?

I still seem to be experiencing this behaviour in Fedora 21 (xorg-x11-drv-synaptics-1.8.1-4).

Or was there some regression?

Much Thanks!

Revision history for this message
In , Peter Hutterer (peter-hutterer) wrote :

you're right, it had a regression, it's still not fixed. looks like the only fix doable is to drop abs events from the driver and make the touchpad relative only. This requires re-adjusting the pointer acceleration though.

Changed in xserver-xorg-input-synaptics:
status: Fix Released → Confirmed
Revision history for this message
In , Mikiausch (mikiausch) wrote :

I don't know If this is caused by the same issue, but the problem is quite siilar, so I attach this as a commen instead of filing a new bug. I'm using debian testing / x.org 1.17.2 with a Lenovo U41 which has an ALPS touchpad.

The problem is that the touchpad is way faster on the horizontal axis than on the vertical axis: while a swipe from left to right will move the pointer approximately from the left to the right screen edge, a complete top-down swipe only covers one quarter of the screen - of course influenced by the acceleration settings.

Fiddling with the "VertResolution" and "HorizResolution" options didn't show any effect for me.

Looking at the code it seems that these options were actually rendered useless when the synaptics driver scaling was removed in commit #0fb59b3487d57523a03f078a2061e2ea0cacbc7c. The driver always passes the resolution values reported by the device to the server instead of the overwritten ones from the config.

Some debugging later, this is what the device reports to the server:
minx: 0, maxx: 4095, resx: 40
miny: 0, maxy: 2047, resy: 71

So it looks like the device has indeed a different resolution in x and y and this seems to get mix up the scaling somehow.

I tried to make the driver pass the VertResolution and HorizResolution parameters instead of the device values by changing some lines from synaptics.c:

xf86InitValuatorAxisStruct(dev, 0, axes_labels[0], min, max, priv->resx * 1000, 0, priv->resx * 1000, Relative);

into

xf86InitValuatorAxisStruct(dev, 0, axes_labels[0], min, max, priv->synpara.resolution_horiz * 1000, 0, priv->synpara.resolution_horiz * 1000, Relative);

and

xf86InitValuatorAxisStruct(dev, 1, axes_labels[1], min, max, priv->resy * 1000, 0, priv->resy * 1000, Relative);

into

xf86InitValuatorAxisStruct(dev, 1, axes_labels[1], min, max, priv->synpara.resolution_vert * 1000, 0, priv->synpara.resolution_vert * 1000, Relative);

After that, setting both "VertResolution" and "HorizResolution" to the same value, makes the touchpad behave as expected.

But I think the real problem is somewhere deeper in getevents.c

As far as I understand the scale_for_device_resolution function tries to map the touch pad size to the screen size which works fine as long as resolution_ratio equals 1 which is the case for all pads with an equal x/y resolution and breaks on devices with uneven resolutions. But why is the resolution involved in the scaling anyway? If we try to map 1the device size to the screen size we don't need to bother about the device resolution. The axis sizes and the screen resolution should be enough?!

Revision history for this message
In , Peter Hutterer (peter-hutterer) wrote :

The VertResolution/HorizResolution options shouldn't be needed on newer touchpads anyway if the kernel provides it. So you can ignore those.

and yes, this is the same bug.

the problem is caused by the server needing to support true absolute devices in relative mode (e.g. graphics tablets). If you have one of those, a relative motion on the device should reflect the motion on the screen - that's harder to do on touchpads where the aspect ratio and sizes are out of whack.

fwiw, as of http://cgit.freedesktop.org/xorg/driver/xf86-input-synaptics/commit/?id=0a4cf80a00663ff3ce8e76baf0940782576efe13, synaptics doesn't need to be absolute anymore, you can replace all xf86InitValuatorAxisStruct() calls with a min/max of -1. This makes the axes truly relative and is the right solution. But you'll find the pointer accel will be completely out of whack after that, if you manage to find the magic numbers to tweak it back to what it currently is, you've found the solution.

Changed in xserver-xorg-input-synaptics:
status: Confirmed → Won't Fix
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.