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.
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.
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 MetaInputSettin gs::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.freedeskt op.org/ wayland/ libinput/ tree/src/ evdev-mt- touchpad. c#n3089
... which calls tp_suspend:
https:/ /cgit.freedeskt op.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.