Comment 6 for bug 1715479

Revision history for this message
James Henstridge (jamesh) wrote :

So, I don't think there is any problem on the gnome-control-center side: it just sets the org.gnome.desktop.peripherals.touchpad/send-events GSetting key to disabled, and that is persisting over sleeps.

The code in mutter watches this key, and calls MetaInputSettings::set_send_events() on each touchpad device, and ensures it is called on each new input device.

https://git.gnome.org/browse/mutter/tree/src/backends/meta-input-settings.c#n667

In a Wayland session, this calls libinput_device_config_send_events_set_mode():

https://git.gnome.org/browse/mutter/tree/src/backends/native/meta-input-settings-native.c#n36

The touchpad implementation of this is found here:

https://cgit.freedesktop.org/wayland/libinput/tree/src/evdev-mt-touchpad.c#n3089

... which calls tp_suspend:

https://cgit.freedesktop.org/wayland/libinput/tree/src/evdev-mt-touchpad.c#n1670

Which will either leave the touchpad enabled to support soft buttons, or call evdev_device_suspend() otherwise, which closes the underlying device.

Looking in /proc, gnome-shell definitely doesn't have the touchpad evdev device open when I disable the touchpad, but somehow opens it again after resume.