Bug 31636 - Greater horizontal than vertical pointer acceleration with synaptics
Greater horizontal than vertical pointer acceleration with synaptics
Status: RESOLVED FIXED
Product: xorg
Classification: Unclassified
Component: Server/Input/Core
git
Other All
: medium normal
Assigned To: Peter Hutterer
Xorg Project Team
:
: 40417 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-15 12:08 UTC by Simon Strandman
Modified: 2013-02-18 02:50 UTC (History)
6 users (show)

See Also:


Attachments
Xorg.0.log (26.23 KB, text/plain)
2010-11-15 12:08 UTC, Simon Strandman
no flags Details
50-synaptics.conf (299 bytes, text/plain)
2010-11-17 13:59 UTC, Simon Strandman
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Strandman 2010-11-15 12:08:05 UTC
Created attachment 40284 [details]
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.
Comment 1 Simon Strandman 2010-11-17 13:59:25 UTC
Created attachment 40346 [details]
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
Comment 3 Simon Strandman 2010-11-21 06:08:44 UTC
Yes, this does indeed fix the errors in the Xorg log. But the other problem remains of course. :)
Comment 4 Martin Spacek 2011-04-16 17:26:49 UTC
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?
Comment 5 Simon Strandman 2011-04-17 02:21:20 UTC
@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.
Comment 6 Angelo Arrifano 2012-02-08 02:29:08 UTC
(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
Comment 7 Peter Hutterer 2012-04-18 20:56:37 UTC
This is somewhere in the server, the accel the driver supplies is always the same.
Comment 8 Peter Hutterer 2012-04-19 16:53:30 UTC
*** Bug 40417 has been marked as a duplicate of this bug. ***
Comment 9 Martin Spacek 2012-04-19 17:23:02 UTC
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
Comment 10 Peter Hutterer 2012-04-19 17:29:18 UTC
(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.
Comment 11 Simon Thum 2012-04-22 13:02:31 UTC
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.
Comment 12 Peter Hutterer 2012-04-22 22:10:25 UTC
(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.
Comment 13 gt6 2012-11-08 14:25:51 UTC
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
    GrabEventDevice         = 1
    TapAndDragGesture       = 1
    AreaLeftEdge            = 0
    AreaRightEdge           = 0
    AreaTopEdge             = 0
    AreaBottomEdge          = 0
    HorizHysteresis         = 19
    VertHysteresis          = 19
    ClickPad                = 1
    RightButtonAreaLeft     = 1630
    RightButtonAreaRight    = 0
    RightButtonAreaTop      = 1737
    RightButtonAreaBottom   = 0
    MiddleButtonAreaLeft    = 0
    MiddleButtonAreaRight   = 0
    MiddleButtonAreaTop     = 0
    MiddleButtonAreaBottom  = 0
---------------

xinput list-props "ETPS/2 Elantech Touchpad":
---------------
Device 'ETPS/2 Elantech Touchpad':
	Device Enabled (129):	1
	Coordinate Transformation Matrix (131):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
	Device Accel Profile (258):	1
	Device Accel Constant Deceleration (259):	2.500000
	Device Accel Adaptive Deceleration (260):	1.000000
	Device Accel Velocity Scaling (261):	12.500000
	Synaptics Edges (283):	130, 3130, 114, 2005
	Synaptics Finger (284):	1, 1, 256
	Synaptics Tap Time (285):	180
	Synaptics Tap Move (286):	171
	Synaptics Tap Durations (287):	180, 180, 100
	Synaptics ClickPad (288):	1
	Synaptics Tap FastTap (289):	1
	Synaptics Middle Button Timeout (290):	0
	Synaptics Two-Finger Pressure (291):	282
	Synaptics Two-Finger Width (292):	7
	Synaptics Scrolling Distance (293):	77, 77
	Synaptics Edge Scrolling (294):	0, 0, 0
	Synaptics Two-Finger Scrolling (295):	1, 1
	Synaptics Move Speed (296):	1.000000, 0.100000, 0.100000, 40.000000
	Synaptics Edge Motion Pressure (297):	30, 160
	Synaptics Edge Motion Speed (298):	1, 311
	Synaptics Edge Motion Always (299):	0
	Synaptics Off (300):	2
	Synaptics Locked Drags (301):	0
	Synaptics Locked Drags Timeout (302):	5000
	Synaptics Tap Action (303):	0, 0, 0, 0, 1, 2, 3
	Synaptics Click Action (304):	1, 3, 2
	Synaptics Circular Scrolling (305):	0
	Synaptics Circular Scrolling Distance (306):	0.100000
	Synaptics Circular Scrolling Trigger (307):	0
	Synaptics Circular Pad (308):	0
	Synaptics Palm Detection (309):	1
	Synaptics Palm Dimensions (310):	4, 1
	Synaptics Coasting Speed (311):	20.000000, 50.000000
	Synaptics Pressure Motion (312):	30, 160
	Synaptics Pressure Motion Factor (313):	1.000000, 1.000000
	Synaptics Grab Event Device (314):	1
	Synaptics Gestures (315):	1
	Synaptics Capabilities (316):	1, 0, 0, 1, 1, 1, 1
	Synaptics Pad Resolution (317):	32, 32
	Synaptics Area (318):	0, 0, 0, 0
	Synaptics Soft Button Areas (319):	1630, 0, 1737, 0, 0, 0, 0, 0
	Synaptics Noise Cancellation (320):	19, 19
	Device Product ID (247):	2, 14
	Device Node (248):	"/dev/input/event7"
	MaxSpeed (504):	0.100000


Note especially that the capabilities: 

Synaptics Capabilities (316): 1, 0, 0, 1, 1, 1, 1

They specify that the horizontal and vertical resolution can in fact be set (the last two "1"s). However the parameters are missing from xinput and I can't set them. Setting "Pad Resolution" (317) is impossible because it's readonly. So the mechanism to compensate resolutions as specified in the manpage is completely missing. Could this be related?

I'm using xf86-input-synaptics 1.6.2 built on Oct 5. 2012.
Comment 14 Peter Hutterer 2012-11-08 22:08:49 UTC
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)
Comment 15 Peter Hutterer 2013-01-11 06:30:45 UTC
http://patchwork.freedesktop.org/patch/12839/
Comment 16 Simon Strandman 2013-01-30 22:35:20 UTC
The patch in comment 15 seems to be working. Thanks! :)
Comment 17 Peter Hutterer 2013-02-18 02:50:32 UTC
commit 61a99aff9d33728a0b67920254d2d4d79f80cf39
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Jan 11 14:22:07 2013 +1000

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