[ubuntu-x] Heisenbug in xserver-xorg-input-synaptics

Chase Douglas chase.douglas at canonical.com
Sat Jan 7 02:05:06 UTC 2012

Hi all,

I tried to track down the bug in the X staging ppa
(ppa:ubuntu-x-swat/x-staging) that causes trackpads to flip to the edge
of the screen. This is what I found:

In the X server when there's a relative motion event it computes an
acceleration for it. You can follow the events from QueuePointerEvents()
to BasicComputeAcceleration(). BasicComputeAcceleration() then calls a
function pointer, which by default for the X synaptics driver calls back
into the driver's SynapticsAccelerationProfile() function.

If you set a breakpoint in BasicComputeAcceleration() with the condition
of "result > 10000", you'll get a hit. When you continue, your pointer
will flip to an edge of the screen. Generally, the value of the result
variable is on the order of +<some value>e+304 or inf when this occurs.
The next step is to try setting a breakpoint in
SynapticsAccelerationProfile() with the condition "accelfct > 10000" on
the return statement.

I compiled xserver-xorg-input-synaptics with noopt, but I wasn't able to
trigger the bug. Then, I compiled with the default optimizations, and
the bug reappeared, but the breakpoint with the condition was never hit.
I tried removing the condition, and the breakpoint worked as expected.

I've sent this to both ubuntu-x and ubuntu-devel to ask if anyone has
any ideas on how to debug this without getting to the level of
compiler/assembly/linker debugging :).


-- Chase

More information about the Ubuntu-x mailing list