Hello to the community!
I just installed Manjaro on my Lenovo Yoga Slim 7 laptop. It is quite new hardware so there are some troubles to be fixed on Linux.
One of them is that I loose the touchpad after each resume from suspend. I can re-enable it with the following command:
xinput --enable "PNP0C50:00 06CB:CDB0 Touchpad"
But my wife does not find it easy to get a terminal and launch this command only using the keyboard .
So I tried to automatize this after each suspend. I found two ways to do it:
- Create a service launched after suspend
I created the file:
/etc/systemd/system/enabletouchpad.service
It is owned by root and executable. Here is the code inside:
[Unit]
Description=Enables touchpad again after resuming
After=suspend.target[Service]
Type=oneshot
ExecStartPre=/bin/sleep 15s
ExecStart=xinput --enable “PNP0C50:00 06CB:CDB0 Touchpad”[Install]
WantedBy=suspend.target
I am not sure about the sleep for 15 seconds but, anyway even after enabling the service:
sudo systemctl enable enabletouchpad.service
and rebooting, this does not work.
I also tried a “sudo -u ” but it also failed.
- Script in systemd/system-sleep
I created this script owned by root and executable:
if [ "${1}" == "post" ]; then
xinput --enable "PNP0C50:00 06CB:CDB0 Touchpad"
fi
Still not working! Also tried with sudo -u…
Any idea?