3

I recently upgraded from Debian 8, to Debian 9 stretch. Apparently they no longer utilize synaptics /synclient to control touch-pad input. What I am looking for is a simple command to enable or disable touch-pad functionality on demand, with libinput.

With the synaptics drivers, I used the command,

synclient TouchpadOff=1

to disable the 'pad', and

synclient TouchpadOff=0

when I wanted it back on.

Simple and direct. I frequently spend long periods typing with only infrequent use of the mouse, and the touchpad picks up unintentional input, tossing my curser all over the document. I don't want to do a permanent disable, nor do I want an automated disable (IE, whenever a USB mouse is detected, or whenever typing is detected), I just want it on when its on, and off when I want it off.

Just a simple command to enable or disable the pad on demand. Can anyone help me with this? I have been searching high and low for some way to do this without having to make permanent changes to the system, and can't seem to find anything. Doesn't anyone else do things like this? I'd really rather not have to go back to Debian 8 just to have that command capability back, but I am actually considering it, as ridiculous as that seems.

I would prefer a terminal command solution, but GUI is fine too, if anyone knows of something. I'll take almost anything at this point, I think The key here is a SIMPLE, toggle-on/off solution. I can't be the only person trying to figure this out.

  • Have you already tried Fn + F5 ? this causes on most laptop hardware to disable the touchpad and enable it again. – Christopher Díaz Riveros Aug 29 '17 at 0:30
  • yes I tried Fn+F5 and F5 (in case I had the bios Fn key settings reversed) – bitbox Sep 2 '17 at 0:48
3

The synclient command is a part of the xserver-xorg-input-synaptics package. You can use the synclient command as usually after installing the required package:

apt install xserver-xorg-input-synaptics

Change to libinput Xorg driver in Debian 9 "Stretch"

To reenable a disabled touchpad in gnome on stretch:

gsettings set org.gnome.desktop.peripherals.touchpad send-events 'enabled'
  • 1
    libinput is used by Wayland, and Debian 9 seems to switch to Wayland by default, so the question is if the X-Server-based synclient from this package will also run with Wayland... – dirkt Aug 29 '17 at 9:41
  • @dirkt thx for comment , by searching the problem is documented on debian wiki (only for gnome desktop) , i am able to use the synclient command on debian stretch without problem , X is still the default display server on debian stretch , as my known Wayland is the default on Ubuntu 17.10 – GAD3R Aug 29 '17 at 10:16
3

After installing xinput, I was able to use the commands:

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

to disable, and

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

to re-enable my touchpad.

My OS is Debian 9 Stretch with Mate DE. But oddly, I found this specific answer here (credit where credit is due):

https://elementaryos.stackexchange.com/questions/7160/how-i-can-disable-enable-my-laptops-touchpad-on-elementary-os-loki

Thanks to RussellB, GAD3R, Christopher Díaz Riveros, and Stephen Rauch, for your timely help with answers, and editing of my posted question. Now I am off to the above linked post to see if I can adapt and use the rest of cipricus's posted instructions (which were for Elementary OS), in my Debian 9 Mate DEnvironment to turn this into a hotkey switch. M aybe I can load it into the Fn + F5 combo mentioned above.

1

Follow these steps. It worked for me.

My notebook is SAMSUMG NP270E5G-KDRBR corei5 Debian9 with MATE

sudo apt-get install xserver-xorg-input-synaptics
sudo cp /usr/share/X11/xorg.conf.d/70-synaptics.conf /etc/X11/xorg.conf.d

After go to: System - Preferences - Hardware - Mouse

click in the tab Touchpad

check the option: enable mouse clicks with touchpad

reboot

0
xinput 

could be a viable option. run xinput to find the id for your touchpad and then

xinput set-int-prop <device_id> <property_id>

property id is 0 for disabling. You can try having this in a script and pass the parameter from the command line.

  • 1
    Xinput not installed by default in Debian 9, so I changed that. Tried command ...'xinput set-int-prop 12 0'..., as you indicated here(12 being touchpad ID#) . Returned ' Usage: xinput set-int-prop <device> <property> <format (8, 16, 32)> <val> [<val> ...]' , I wasn't sure what exactly it was asking for here, but this worked, 'xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 0' .("1" = re-enable) THANKS to everyone who helped me here. Perhaps someone (more experienced than I) could clean this thread up so that it may help someone else. Thanks again to all! – bitbox Sep 2 '17 at 1:23

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.