I need to disable the touchpad of my laptop. I am using Gnome on Wayland.

  • libinput should provide this functionality, but apparently it doesn't.
  • xinput doesn't work because I'm on Wayland.
  • I think Gnome offered some switch to do so in the input settings, but it isn't there anymore (Gnome shell 3.34 — maybe this is an Xorg exclusive feature?).

Is it really asked too much if I want do disable an input device?

Edit: xinput is NOT a solution!

Its man page has a whole section on Wayland (emphasis mine):


Xwayland is an X server that uses a Wayland Compositor as backend. Xwayland acts as translation layer between the X protocol and the Wayland protocol but does not have direct access to the hardware. The X Input Extension devices created by Xwayland ("xwayland-pointer", "xwayland-keyboard", etc.) map to the Wayland protocol devices, not to physical devices. These X Input Extension devices are only visible to other X clients connected to the same Xwayland process. Changing properties on Xwayland devices only affects the behavior of those clients. For example, disabling an Xwayland device with xinput does not disable the device in Wayland-native applications. Other changes may not have any effect at all. In most instances, using xinput with an Xwayland device is indicative of a bug in a shell script and xinput will print a warning. Use the Wayland Compositor's native device configuration methods instead.

TL;DR: If I disable the touchpad using xinput, it will still continue working as before, but XWayland applications won't see the cursor move anymore.

  • This helps? fazlearefin.blogspot.com/2014/08/…
    – GMaster
    Commented Feb 28, 2020 at 12:22
  • As I wrote in the question, "xinput doesn't work because I'm on Wayland". From the xinput man page, section XWAYLAND: "For example, disabling an Xwayland device with xinput does not disable the device in Wayland-native applications."
    – piegames
    Commented Feb 28, 2020 at 12:26
  • Does xinput list work (it may still work under Wayland I believe) and show a touchpad (like "SynPS/2 Synaptics TouchPad" or similar? (You may have to install the xinput package.)
    – Ned64
    Commented Feb 28, 2020 at 12:54
  • No it doesn't, but there is xwayland-pointer:16 and xwayland-relative-pointer:16, among a few other similar entries (probably for mouse and graphics tablet, but I can't really tell them apart)
    – piegames
    Commented Feb 28, 2020 at 12:59
  • @piegames OK, I will write this in an answer so you can try it, please let me know below! You can also edit your question to include the full output of xinput list and we will have a look together.
    – Ned64
    Commented Feb 28, 2020 at 13:00

3 Answers 3


First of all, try if this dconf setting is of any use:

gsettings set org.gnome.desktop.peripherals.touchpad disable-while-typing 'false'

It was stated with false while the name would imply true.

This setting should be for Xserver configurations:

gsettings set org.gnome.desktop.peripherals.touchpad send-events 'disabled'

Notebook also may disable the touchpad with Fn+F5; you may try that.

If that doesn't work, please add the output of libinput-list-devices to your question.  You also may want to have a look at the Touchpad Indicator GNOME Shell extension.

  • lsusb does not show my device. Apparently the touchpad is not connected on the USB bus, but as a Super I/O device.
    – piegames
    Commented Mar 6, 2020 at 22:23
  • Well, then it will be listed by lspci i guess?! Won't be of any problem. I will have a look, later.
    – WGRM
    Commented Mar 7, 2020 at 3:43
  • 1
    Wow, gsettings set org.gnome.desktop.peripherals.touchpad send-events 'disabled' did the trick. I'm pretty sure that I tried similar gsettings commands before without any success.
    – piegames
    Commented Mar 7, 2020 at 13:09
  • If it works, accept the answer or give an error-report.
    – WGRM
    Commented Mar 7, 2020 at 16:21

This may work with xinput even if you are using Wayland.

Install the xinput package if necessary. Then find out which is your device by typing

xinput list | grep -i touch

You may find a string like "SynPS/2 Synaptics TouchPad". Leave out the grep part if the list is empty to see whether you can find something else that sounds like touchpad.

Use this string (modify the next command as needed) and type

xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 0

You can re-enable the touchpad with a "1" instead of a "0" at the end.

  • Doesn't work: the cursor still moves around, but X applications don't see it moving anymore.
    – piegames
    Commented Feb 28, 2020 at 13:21
  • @piegames Too bad. It seemed to work for others on the Internet even with Wayland but perhaps something was/is different here.
    – Ned64
    Commented Feb 28, 2020 at 13:34

Other methods were not working for me on KDE Plasma, so I tried to disable the touchpad the naive way:

ydotool key 530:1 530:0

This command essentially sends KEY_TOUCHPAD_TOGGLE which request to switch touchpad on or off.

In order for this setup to work, the ydotoold daemon must be running in background (e.g. as a systemd service):

cat ~/.config/systemd/user/ydotoold.service
Description=Starts ydotoold service

ExecReload=/usr/bin/kill -HUP $MAINPID


Now it's possible to programmatically activate/deactivate touchpad, for example, in scrips or through KDE Connect.

Tested on ydotool version 1.0.4 from GitHub.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .