[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#437273: xserver-xorg-input-synaptics: Synaptics touchpad doesn't work on 'switch user'



Bear in mind that Ubuntu has SHMConfig off by default for security
reasons, and uses the /dev/input/mice. Switching off the grab is going
to turn a small problem into a big one.

I've done a switch using the standard grab driver and the relevant
output from both logs is below. Although I can't be sure of the
relevant timings of the messages between the two displays, one thing
does stand out. The 'unfocussed' session does a Synaptics DeviceOn
call even though it doesn't need the device at that point.

All thoughts appreciated on how to fix this.

A switch from Xorg.0 to Xorg.20.log (creating the new login session) gives:

Xorg.0.log

Synaptics DeviceOff called
(II) AIGLX: Suspending AIGLX clients for VT switch
(II) intel(0): xf86UnbindGARTMemory: unbind key 0
(II) intel(0): xf86UnbindGARTMemory: unbind key 1
(II) intel(0): xf86UnbindGARTMemory: unbind key 2
(II) intel(0): xf86UnbindGARTMemory: unbind key 3
(II) intel(0): xf86UnbindGARTMemory: unbind key 4
Synaptics DeviceOn called
(--) Synaptics Touchpad auto-dev sets device to /dev/input/event2
(**) Option "Device" "/dev/input/event2"
(--) Synaptics Touchpad touchpad found

Xorg.20.log
Synaptics DeviceInit called
SynapticsCtrl called.
(II) Configured Mouse: ps2EnableDataReporting: succeeded
Synaptics DeviceOn called
(--) Synaptics Touchpad auto-dev sets device to /dev/input/event2
(**) Option "Device" "/dev/input/event2"
(WW) Synaptics Touchpad can't grab event device, errno=1022
(--) Synaptics Touchpad touchpad found
ProcXCloseDevice to close or not ?
SetClientVersion: 0 9


After a switch back to focus on Xorg.0 you get the following logged in
each display.

Xorg.0.log
< (II) Open ACPI successful (/var/run/acpid.socket)
< (II) AIGLX: Resuming AIGLX clients after VT switch
< (II) intel(0): xf86BindGARTMemory: bind key 0 at 0x007bf000 (pgoffset 1983)
< (II) intel(0): xf86BindGARTMemory: bind key 1 at 0x03038000 (pgoffset 12344)
< (II) intel(0): xf86BindGARTMemory: bind key 2 at 0x04000000 (pgoffset 16384)
< (II) intel(0): xf86BindGARTMemory: bind key 3 at 0x05000000 (pgoffset 20480)
< (II) intel(0): xf86BindGARTMemory: bind key 4 at 0x08000000 (pgoffset 32768)
< (II) intel(0): Output configuration:
< (II) intel(0):   Pipe A is off
< (II) intel(0):   Display plane A is now disabled and connected to pipe A.
< (II) intel(0):   Pipe B is on
< (II) intel(0):   Display plane B is now enabled and connected to pipe B.
< (II) intel(0):   Output VGA is connected to pipe none
< (II) intel(0):   Output LVDS is connected to pipe B
< (II) intel(0):   Output TV is connected to pipe none
< (II) intel(0): [drm] dma control initialized, using IRQ 16
< (II) Configured Mouse: ps2EnableDataReporting: succeeded
< SetGrabKeysState - disabled
< SetGrabKeysState - enabled

Xorg.20.log
< Synaptics DeviceOff called
< (II) intel(0): xf86UnbindGARTMemory: unbind key 5
< (II) intel(0): xf86UnbindGARTMemory: unbind key 6
< (II) Open ACPI successful (/var/run/acpid.socket)
< (II) intel(0): xf86BindGARTMemory: bind key 5 at 0x007bf000 (pgoffset 1983)
< (II) intel(0): xf86BindGARTMemory: bind key 6 at 0x03038000 (pgoffset 12344)
< (II) intel(0): Output configuration:
< (II) intel(0):   Pipe A is off
< (II) intel(0):   Display plane A is now disabled and connected to pipe A.
< (II) intel(0):   Pipe B is on
< (II) intel(0):   Display plane B is now enabled and connected to pipe B.
< (II) intel(0):   Output VGA is connected to pipe none
< (II) intel(0):   Output LVDS is connected to pipe B
< (II) intel(0):   Output TV is connected to pipe none
< Synaptics DeviceOn called
< (--) Synaptics Touchpad auto-dev sets device to /dev/input/event2
< (**) Option "Device" "/dev/input/event2"
< (WW) Synaptics Touchpad can't grab event device, errno=1022
< (--) Synaptics Touchpad touchpad found
< (II) Configured Mouse: ps2EnableDataReporting: succeeded
< Synaptics DeviceOff called
< (II) intel(0): xf86UnbindGARTMemory: unbind key 5
< (II) intel(0): xf86UnbindGARTMemory: unbind key 6

and back again from Xorg.0 to Xorg.20 (this time the Xorg.20 session
is still running).

Xorg.0.log
> Synaptics DeviceOff called
> (II) AIGLX: Suspending AIGLX clients for VT switch
> (II) intel(0): xf86UnbindGARTMemory: unbind key 0
> (II) intel(0): xf86UnbindGARTMemory: unbind key 1
> (II) intel(0): xf86UnbindGARTMemory: unbind key 2
> (II) intel(0): xf86UnbindGARTMemory: unbind key 3
> (II) intel(0): xf86UnbindGARTMemory: unbind key 4
> Synaptics DeviceOn called
> (--) Synaptics Touchpad auto-dev sets device to /dev/input/event2
> (**) Option "Device" "/dev/input/event2"
> (--) Synaptics Touchpad touchpad found

Xorg.20.log
> (II) Open ACPI successful (/var/run/acpid.socket)
> (II) intel(0): xf86BindGARTMemory: bind key 5 at 0x007bf000 (pgoffset 1983)
> (II) intel(0): xf86BindGARTMemory: bind key 6 at 0x03038000 (pgoffset 12344)
> (II) intel(0): Output configuration:
> (II) intel(0):   Pipe A is off
> (II) intel(0):   Display plane A is now disabled and connected to pipe A.
> (II) intel(0):   Pipe B is on
> (II) intel(0):   Display plane B is now enabled and connected to pipe B.
> (II) intel(0):   Output VGA is connected to pipe none
> (II) intel(0):   Output LVDS is connected to pipe B
> (II) intel(0):   Output TV is connected to pipe none
> (II) Configured Mouse: ps2EnableDataReporting: succeeded
> SetGrabKeysState - enabled






On 8/11/07, Peter Osterlund <petero2@telia.com> wrote:

> Unfortunately it doesn't, because the synaptics driver closes the event
> device anyway in the DeviceOff function. Closing the device will cause an
> automatic ungrab, so the patch at best only changes the timings. Maybe a
> wait-and-retry loop in EventDeviceOnHook would help.
>
> I think what happens is that the driver running in the second X server
> tries to grab the device before the driver in the first X server has
> released it. I don't know if the X server is supposed to synchronize this
> somehow, or if it is up to the synaptics driver to deal with the
> situation.
>
> The latest git version has an option GrabEventDevice that can be set to
> false to bypass the grab/ungrab. This would probably help, except that it
> doesn't work well if the X config file also uses /dev/input/mice. (Which
> most configs do.)
>
> --
> Peter Osterlund - petero2@telia.com
> http://web.telia.com/~u89404340
>



Reply to: