Touchpad synaptics changes name after resume
Hi,
$ uname -a
Linux t440 6.0.0-0.deb11.2-amd64 #1 SMP PREEMPT_DYNAMIC Debian
6.0.3-1~bpo11+1 (2022-10-29) x86_64 GNU/Linux
I have two scripts that enable/disable touchpad that I mapped to some
keyboard shortcuts:
$ cat ~/opt/bin/touchpad-on
xinput enable "SynPS/2 Synaptics TouchPad"
$ cat ~/opt/bin/touchpad-off
xinput disable "SynPS/2 Synaptics TouchPad"
The problem is that xinput(1) changes the name of the touchpad every now
and again:
$ dmesg| grep -i synaptics |grep "as /devices"
[463340.358242] input: Synaptics TM2722-001 as
/devices/pci0000:00/0000:00:1f.3/i2c-0/0-002c/rmi4-00/input/input319
[505228.803682] input: SynPS/2 Synaptics TouchPad as
/devices/platform/i8042/serio1/input/input335
[505234.019989] input: SynPS/2 Synaptics TouchPad as
/devices/platform/i8042/serio1/input/input338
That is, it alternates between "Synaptics TM2722-001" and "SynPS/2
Synaptics TouchPad".
Even the id changes. Sometimes it's 11, some other times it's 10 or 9.
The culprit may be this custom script:
$ cat /lib/systemd/system-sleep/custom
#!/bin/sh
case $1 in
pre)
systemctl stop ssh
ifconfig wlp3s0 off
sleep 5
;;
post)
sleep 5
modprobe -r psmouse &&
modprobe psmouse
modprobe -r rmi_smbus &&
modprobe rmi_smbus
ifconfig wlp3s0 on
;;
esac
See the "modprobe"'s? I need them, because there is an outstanding bug
in the kernel that shuts the input drivers on resume on some Thinkpads.
I am reluctant to install "xserver-xorg-input-synaptics" because
apparently this is deprecated:
https://wiki.debian.org/SynapticsTouchpad
"The synaptic Xorg driver in being superseded by the newer libinput
driver, which can provide lower-level access to multi touch events to
clients, but is currently lacking some features found in the older driver. "
So, how do I solve this conundrum?
--
Ottavio Caruso
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
Reply to: