2

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

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 Feb 28 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 Feb 28 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 Feb 28 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 Feb 28 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 Feb 28 at 13:00
1
+50

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` (corrected)

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

If that doesn't word, please add the output of libinput-list-devices to your question. You also may wanna have a look at this:

Touchpad Indicator

| improve this answer | |
  • lsusb does not show my device. Apparently the touchpad is not connected on the USB bus, but as a Super I/O device. – piegames Mar 6 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 Mar 7 at 3:43
  • 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 Mar 7 at 13:09
  • If it works, accept the answer or give an error-report. – WGRM Mar 7 at 16:21
0

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.

| improve this answer | |
  • Doesn't work: the cursor still moves around, but X applications don't see it moving anymore. – piegames Feb 28 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 Feb 28 at 13:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.