[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Touchpad synaptics changes name after resume



On Sat 03 Dec 2022 at 10:37:50 (+0000), Ottavio Caruso wrote:
> $ 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.

As a workaround, how about trying:

  $ cat ~/opt/bin/touchpad-on
  xinput enable "SynPS/2 Synaptics TouchPad"
  xinput enable "Synaptics TM2722-001"
  $ cat ~/opt/bin/touchpad-off
  xinput disable "SynPS/2 Synaptics TouchPad"
  xinput disable "Synaptics TM2722-001"

> 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.

How did you choose the order of your modprobes? I'm wondering whether
the way psmouse configures the Synaptics is influenced by the presence
of modules that drive the busses. But I'm afraid I'm just guessing.

Cheers,
David.


Reply to: