Since a few months ago, /dev/psm0 sometimes does not get created on boot and sometimes disappears after boot, often after a suspend/resume cycle. The only workaround I've found is to power off the machine and restart, which brings back touchpad functionality only sometimes.
I did fresh 12.2-BETA3 install before filing a PR to see if the issue may have been resolved, but it has not and in fact a new issue has appeared: Tapping no longer works as a left-button click.
I've added hw.psm.mux_disabled=1 per syslog suggestion and will report back after a testing period once I know if it helped.
Data from 12-2-BETA3:
kbd0 at atkbd0
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: model Synaptics Touchpad, device ID 0
Handle 0x0005, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J1900
Internal Connector Type: None
External Reference Designator: Touch Pad
External Connector Type: PS/2
Port Type: Mouse Port
Sep 28 20:16:55 quagga kernel: psm0: <PS/2 Mouse> irq 12 on atkbdc0
Sep 28 20:16:55 quagga kernel: psm0: [GIANT-LOCKED]
Sep 28 20:16:55 quagga kernel: psm0: model Synaptics Touchpad, device ID 0
Sep 28 20:26:32 quagga kernel: psm0: AUX MUX hang detected!
Sep 28 20:26:32 quagga kernel: Consider adding hw.psm.mux_disabled=1 to loader tunables
Sep 28 20:26:32 quagga kernel: psm0: failed to get status (doinitialize).
Sep 28 20:26:32 quagga kernel: psm0: failed to enable the device (doopen).
Sep 28 20:26:32 quagga kernel: psm0: failed to enable the device (reinitialize).
After enabling moused, I found that touchpad tapping actually works in a VT screen, but not in X11.
Behavior is the same in X11 with or without moused, with or without synaptics support enabled. The basic features all work except for tapping. This was not an issue under 12.1-RELEASE.
Update: No change in 12.2-RC1
Adding hw.psm.mux_disabled=1 to /boot/loader.conf seems to work around the vanishing psm0 issue. No problems in the last 4 days, which is far longer than psm0 has lasted recently.
I just upgraded an X201 to 12.2-RC1 and tapping no longer works under Xorg there either. So the tapping problem seems to be more widespread.
(In reply to Jason W. Bacon from comment #4)
Starting from xorg-server 21 taps are not processed by psm(4) driver anymore. X.Org server does it on its own with xf86-input-synaptics or libinput means. So you should check your DE touchpad preferences as some DE e.g. XFCE sets them wrongly by default.
Also you can return to something close to previous behavior with setting kern.evdev.rcpt_mask=3 in /etc/sysctl.conf but it is not generally recommended.
I found 2 ways to restore tapping on 12.2:
1. xinput --set-prop 10 'libinput Tapping Enabled' 1
which I added to a script sourced by my Xsession file.
2. Add something like the following to /etc/X11/xorg.conf.d/30-tap.conf. ( Actual filename is not important as long as it's in xorg.conf.d and readable to all users. )
Option "Tapping" "on"
Option "NaturalScrolling" "on"
Option "ClickMethod" "clickfinger"
I'm don't understand why tapping is off by default under 12.2 and on under 12.1 when they both use the same Xorg packages.
(In reply to Vladimir Kondratyev from comment #5)
Thanks for the info, but why would behavior differ between 12.1-RELEASE and 12.2-RC2?
Also, I'm not using 21 yet:
FreeBSD mako.acadix bacon ~ 1005: pkg info | grep xorg-server
xorg-server-1.20.9,1 X.Org X server and related programs
I'm not up on the internal details of Xorg, but I'm thinking the libinput tweak should work universally. If I find out otherwise during testing I'll report back.
(In reply to Jason W. Bacon from comment #7)
> why would behavior differ between 12.1-RELEASE and 12.2-RC2?
12.1-RELEASE still has kern.evdev.rcpt_mask=3 by default as it predates xorg-server 1.20 (wrongly mentioned by me as 1.21) import to ports tree. Really, X.Org version does not matter. Evdev-awared xorg autoconfiguration backend was added to server at the same moment, that changed its behavior. Old value of kern.evdev.rcpt_mask sysctl in 12.1-RELEASE just hided that for some time with forcing libinput to get touchpad events through mouse emulation support in psm(4) driver.
Got it, thanks.
The tapping issue is resolved from my perspective, though I suspect that many would want tapping enabled by default as before.
So back to the original problem, that hw.psm.mux_disabled=1 is needed to make /dev/psm stable. How might we fix this?
(In reply to Jason W. Bacon from comment #9)
> So back to the original problem, that hw.psm.mux_disabled=1
> is needed to make /dev/psm stable. How might we fix this?
Most probably, we should blacklist AUX MUX probing on all IBMs/Lenovos based on SMBIOS system maker property. We have had similar problems with Lenovo X121e in the past: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242542
What is 'kenv smbios.system.maker' output of your laptop?
I've used a few different ThinkPads (T42, T61, X201, T400) and the X120e is the only one with this issue. Also, the problem only began a few months ago after having no touchpad issues for years, and it's intermittent.
Note that the X120e and X121e are both very low power "ultraportables". Maybe there's something common to this line that provides a clue.
(In reply to Jason W. Bacon from comment #11)
> Maybe there's something common to this line that provides a clue.
They both have unused PS/2 AUX-port multiplexer which stops transfer packets from KBDC to device and vice versa after switching from active to legacy mode.
For Lenovo X121e workaround was found. Resetting of keyboard restores it, but it does not work for X120e.
Maybe unrelated, but the X120e has always had an issue with starting the keyboard after cold boot. The keyboard does not respond until about 1 second after the first key is pressed. Any keystrokes entered within that first second are lost.
Created attachment 219363 [details]
This patch disables AUX MUX probing on LENOVOs by default.
Could you test it?
(In reply to Vladimir Kondratyev from comment #14)
The patch almost works. It doesn't apply cleanly to 12.2, but I entered the changes manually where needed.
Also, kbdc->quirks causes a "not a structure member" error. Based on other code, I guessed you meant kbdcp(kbdc)->quirks. With that the kernel built cleanly and the patch seems to function.
FreeBSD quagga.acadix bacon ~ 142: sysctl -a|grep mux
(In reply to Jason W. Bacon from comment #15)
Also I'd suggest adding a comment to the patch citing the X120e as the sole reason for the quirk, in case someone cares about multiplexing enough to try to make it work on other Lenovos.
A commit references this bug:
Date: Fri Nov 20 00:13:31 UTC 2020
New revision: 367854
psm(4): Disable AUX multiplexer probing on all Lenovo laptops.
Rudimentary AUX multiplexing support was added to kernel to make possible
touchpad initialization on some HP EliteBook laptops with trackpoint.
Disable multiplexer probing on all Lenovo laptops now as they use touchpad
pass-through port rather than AUX multiplexer to connect trackpoint and
at least two model (X120e and X121e) is known for getting PS/2 AUX port
dysfunctional after switching back to hidden multiplexing mode.
AUX MUX probing can be reenabled with setting of hw.psm.mux_disabled loader
tunable to 0.
Reported by: jwb
MFC after: 2 weeks