Unable to turn off TouchPad

I have a fresh install of qubesos 4.1. I am using i3 window manager.
From dmenu > Mouse and Touchpad screen I turn off the blue slider for SynPS/2 Synaptics TouchPad.

However, after I press “Close”, the TouchPad is still functional. When I navigate back into “Mouse and Touchpad” settings screen, I see that the blue slider for the TouchPad has turned on by itself.

Why is it behaving like this? How can I actually disable TouchPad on my Lenovo Thinkpad X220?

Hello again. Reviving this pretty old and abandoned thread of mine.

I think the reason the TouchPad turn-off settings are not being saved (or recognized by i3wm) is that the “Moutse and Touchpad” utility is an XFCE4 utility, and NOT an i3wm utility. So, I suspect i3 isn’t recognizing such settings change regarding turning off the TouchPad.

Any ideas about how can I turn off the TouchPad in a more low-level way (like directly on the command-line, etc.) ?

1 Like

Thanks. Do I do this on dom0, in order to make this change effective the whole-system-wide? Or do I repeat this command in every qube terminal?

Only in dom0.

1 Like

So, I just restarted my QubesOS machine, and athe TouchPad is still active. How can I make this permanent? Add the line xinput --disable {{TouchPad id number}} to the .profile or .bash_aliases or .bashrc file in the dom0? Would that be a nice way of doing this?

It’d be better to run this script:

With systemd:

1 Like

Yeah I think script looks good. However, I don’t understand how systemd services are defined. Is there a way I can run the script you linked once per QubesOS start?

I know that .bashrc file contents are run each time I open a terminal. That sounds unnecessary for running the TouchPad disable command.

I’ve linked to the systemd example. Just replace /path/to/spark/sbin/start-all.sh with the full path to your script. And you can also change the name of the service - myfirst to disable-touchpad.

1 Like

Yeah, I see that, and I think I can use this template:

[Unit]
Description=Spark service

[Service]
ExecStart=/path/to/spark/sbin/start-all.sh

[Install]
WantedBy=multi-user.target

However I don’t understand why the [Install] declaration section is necessary nor what this “WantedBy” does.

WantedBy is telling systemd what will start your service. In relation to startup it’ll be at what point during boot your srcipt will be started by systemd.

systemd targets are represented by target units. Target units file ends with the .target file extension and their only purpose is to group together other systemd units through a chain of dependencies. For example, the graphical.target unit , which is used to start a graphical session, starts system services such as the GNOME Display Manager (gdm.service) or Accounts Service (accounts-daemon.service) and also activates the multi-user.target unit . Similarly, the multi-user.target unit starts other essential system services such as NetworkManager (NetworkManager.service) or D-Bus (dbus.service) and activates another target unit named basic.target.

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_basic_system_settings/working-with-systemd-targets_configuring-basic-system-settings