Debian and 2.6 kernel: Touchpad sync problem - solution
Posted by rmcgowan on Wed 22 Mar 2006 at 09:20
This began as a presumed problem with Debian, since the issue showed up when I upgraded from kernel 2.4.x to 2.6.x, resulting in total loss of functionality of my externally connected PS2 mouse. The Synaptic Touchpad on my Dell Latitude continued to work, however.
I assumed there was a problem of some sort with the kernel itself or the PS2 mouse driver, so I downloaded the latest kernel from www.kernel.org, compiled and installed, but no dice, the external mouse still failed to work.
But this failure affected the Touchpad, this time, and X failed to start. This was good luck for me, as it put me in the vt01 console, where I finally saw the errors being generated when I used the external mouse.
So, lesson 1: When something doesn't work, CHECK the log files and/or dmesg output!
The specific error message was:
psmouse.c: TouchPad at isa0060/serio2/input0 lost sync at byte 1
This error was generated multiple times (10-30 or more) as I moved the external mouse. When I used the Touchpad, a message from the same driver indicated it had 're-synced', and gpm took the input and displayed its selection cursor, as expected.
Step two, and lesson two, is to search the web for reports of the error, which I did. Which leads to lesson three: the web is a cool tool and can be useful, but getting to the useful data can be a real time sink, so be prepared.
The result of my search came back with literally thousands of matches, of which nearly all were either reports of the problem, or discussions about it but with no viable solutions.
It took nearly 4 hours before luck and persistence (to say nothing of modified search criteria) got me to a note from a developer familiar with the Synaptic Touchpad, which explained both why the problem exists and how to fix it.
The problem has to do with the 'non standard' output of the touchpad, so far as mice are concerned. This is apparently needed to support special features, like double or triple tapping, sliding and so on, used to emulate various button clicks and mouse movement.
Bottom line is that the Touchpad produces more bytes per event than the mouse does, so when the mouse input is read, it is automatically "out of sync" as compared to the Touchpad.
The solution is simple: force the Touchpad to work as a generic PS2 mouse, without any support for the special features. This is accomplished by setting a boot parameter:
The author of the email I found suggested using either 'imps' or 'bare', but I'd think that any of the PS2 mouse definitions as presented during Xserver setup would work, so long as the two selections match (not tested, however).
Since I use grub as my bootloader, I added this boot parameter after the 'ro' on the 'kernel' line:
kernel /boot/vmlinuz-184.108.40.206 root=/dev/sda1 ro psmouse.proto=imps
I would guess that the reason the external mouse worked in the 2.4.x kernel is that it does not have a specific Touchpad driver, or if it does, it doesn't support anything other than a generic PS2 interface, and so it works when an external mouse is connected.
And, of course, this is all irrelevant, if you really want to have the full Touchpad functionality. In which case, you'd have to give up the external mouse.