Summary: when the mouse input driver uses a named pipe as a "device", the new PS2 initialization sequence code (added about two weeks ago) causes the server to go into infinite loop sending the initialization byte to the pipe.

Details:

I am using XFree86 with the Synaptics TouchPad Driver (http://mobilix.org/touchpad_driver.html). That driver has a "repeater" feature - whenever it detects that the touchpad is not being used (e.g. an external mice is attached), it would start piping all its input to the "repeater" pipe where another driver can take it and process it using a different protocol.

E.g. the config file would look like:

Section "ServerLayout"
InputDevice "Mouse0" "CorePointer"
InputDevice "Mouse-ps2" "SendCoreEvents"
...
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "synaptics"
Option "Device" "/dev/psaux"
Option "Repeater" "/dev/ps2mouse"
...
EndSection

Section "InputDevice"
Identifier "Mouse-ps2"
Driver "mouse"
Option "Protocol" "PS/2"
Option "Device" "/dev/ps2mouse"
...
EndSection

...

Where /dev/ps2mouse is just a named pipe (created using mkfifo).

This used to work great until about two weeks ago. Now, with the same configuration X would just freeze on startup (right after the mouse drivers are initialized) eating up CPU. Strace shows, that X just keeps writing and reading a single byte to/from /dev/ps2mouse pipe.

http://cvsweb.xfree86.org/cvsweb/xc/programs/Xserver/hw/xfree86/input/mouse/mouse.c lists for the revision 1.66:

756. PS/2 mice initialization sequence changed: rerun entire sequence
      when something goes wrong - this needs to be rewritten completely
      after 4.3 is out (Egbert Eich).
So, I am guessing what happens is that the PS2 protocol of the mouse driver sends the initialization byte to the pipe, reads it back, thinks there must be some error (since the byte is not a valid mouse output) and decides it needs to initialize the mouse again! Of course, this results in an infinite loop of mouse initialization...

Note - if I understand it correctly, this has nothing to do with the synaptics driver specifically - this would be the same, whenever the "PS/2" protocol of the mouse driver is pointed to a named pipe instead of a real mouse device. What exactly is supposed to be supplying the pipe with data is irrelevant to this problem.

--
Aleksey Nogin

Home Page: http://nogin.org/
E-Mail: [EMAIL PROTECTED] (office), [EMAIL PROTECTED] (personal)
Office: Jorgensen 70, tel: (626) 395-2907

_______________________________________________
XFree86 mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xfree86


Reply via email to