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

Re: Touchpad synaptics changes name after resume



Op 03/12/2022 om 16:05 schreef David Wright:
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"



$   xinput enable "SynPS/2 Synaptics TouchPad"
$  xinput enable "Synaptics TM2722-001"
unable to find device Synaptics TM2722-001
$

So that's not an option.

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.

I have removed the modprobes, since I added "acpi_osi=Linux" to Grub cmdline. Now it seems the trackpad resumes ok from suspend.

In any case "psmouse" still messes up with synaptics even after removing the modprobes. Strangely enough, this happened this morning when the laptop was to be on suspend:

~$ dmesg -T |grep -i synaptic
[Mon Dec 5 02:35:02 2022] psmouse serio1: synaptics: queried max coordinates: x [..5112], y [..3834] [Mon Dec 5 02:35:02 2022] psmouse serio1: synaptics: queried min coordinates: x [1024..], y [1024..] [Mon Dec 5 02:35:02 2022] psmouse serio1: synaptics: Trying to set up SMBus access [Mon Dec 5 02:35:02 2022] psmouse serio1: synaptics: SMbus companion is not ready yet [Mon Dec 5 02:35:02 2022] psmouse serio1: synaptics: quirked min/max coordinates: x [1024..5112], y [2024..4832] [Mon Dec 5 02:35:02 2022] psmouse serio1: synaptics: Touchpad model: 1, fw: 8.1, id: 0x1e2b1, caps: 0xd001a3/0x940300/0x127c00/0x0, board id: 2722, fw id: 1484859 [Mon Dec 5 02:35:02 2022] psmouse serio1: synaptics: serio: Synaptics pass-through port at isa0060/serio1/input0 [Mon Dec 5 02:35:02 2022] input: SynPS/2 Synaptics TouchPad as /devices/platform/i8042/serio1/input/input5 [Mon Dec 5 02:49:57 2022] psmouse serio1: synaptics: queried max coordinates: x [..5112], y [..3834] [Mon Dec 5 02:49:57 2022] psmouse serio1: synaptics: queried min coordinates: x [1024..], y [1024..] [Mon Dec 5 02:49:59 2022] psmouse serio1: synaptics: queried max coordinates: x [..5112], y [..3834] [Mon Dec 5 02:49:59 2022] psmouse serio1: synaptics: queried min coordinates: x [1024..], y [1024..]





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