An update which I hope is helpful to others facing a non-detected
touchpad on a modern legacy-free laptop.
With patient and kind help from bru@ I managed to get to the bottom of
the issue below, to at least obtain a functioning touchpad running in
'native' mode rather than PS/2 mouse emulation.
I include this information below in the hope that it helps others.
The laptop is running AMI Aptio V4 UEFI firmware. This seems to contain
a 'legacy-free' Keyboard Controller implementation. This firmware is
quite common as far as I know, both V4 and the currently marketed V5.
The firmware configures the Keyboard Controller in 'Active Multiplexing'
mode on boot.
(Original Synaptics Active Mux specification:
http://www.isdaman.com/alsos/hardware/mouse/mouse2.pdf)
This configures up to four AUX ports AUX0-AUX3 which are addressed with
special 'routing' commands instead of the '0xd4' for a legacy AUX port.
The controller ignores the commands listed in the specification which
are supposed to switch it back to 'Legacy PS/2' mode.
Therefore, touchpad probes and commands sent in pms.c are ignored,
because the commands are routed to the Legacy AUX port.
The specification recommends that touchpads are attached to the AUX1
port, and on this machine this is the case.
Changing the value of KBC_AUXWRITE in sys/dev/ic/i8042reg.h to 0x91 (the
routing command for AUX1) instead of 0xd4 (Legacy AUX) and building a
custom kernel brings the Touchpad communcation back. It then works
normally as tested with both ws(4) and synaptics(4) drivers:
pms0: Synaptics touchpad, firmware 8.1, 0x1e2a1 0x840300 0x304040
0xf00423 0x22800
There are very occasional (less than 10 per day) 'not in sync yet'
messages in the log. They appear in small groups- example below.
They always start in the same way: "...state=3, 90 90".
I have seen them appear in the log while the t-pad is not being used.
Operation does not seem to be affected.
Oct 29 16:48:44 emulti8 /bsd: pms0: not in sync yet, discard input
(state = 3, 90 90 cf 3a | 77 ea)
Oct 29 16:48:44 emulti8 /bsd: pms0: not in sync yet, discard input
(state = 0, c0 | 90 cf 3a 77 ea)
Oct 29 16:48:44 emulti8 /bsd: pms0: not in sync yet, discard input
(state = 0, 7b | 90 cf 3a 77 ea)
Oct 29 16:48:44 emulti8 /bsd: pms0: not in sync yet, discard input
(state = 0, 06 | 90 cf 3a 77 ea)
I will try and work out a solution that could perhaps be accepted as a
patch, perhaps based on a FLAGS value for pckbc to be used on
legacy-free machines. Suggestions are welcome.
Chris Billington
On Wed, 9 Oct 2024 15:38:37 +0800
Chris Billington <cbilling...@emulti.net> wrote:
I obtained a copy of the Synaptics protocol document and attempted to
decode the responses to queries returned by the Linux psmouse driver.
The given values appear normal though it is reporting as a rectangular
touchpad even though it is circular.
Linux dmesg reports:
synaptics: Touchpad model: 1, fw: 8.1, id: 0x1e2a1, caps:
0xf00423/0x840300/0x22800/0x0, board id: 3 136, fw id: 2550122
0xf00423 in response to capabilities query 0x02 corresponds to:
cap-extended=1
nExtqueries=7 (which may be incorrect due to a firmware bug, see below)
multifinger reporting=1
multifinger support=1
palmdetect=1
0x840300 in response to ExModelId query $09:
ext W mode supported
hscroll and vscroll (separate zones)- both no.
0x22800 in response to ExtCaps query $0c:
Multifinger 1.0 supported
reports max (cmd 0d)
reports min (cmd 0f)
not a clickpad (true)
The Linux synaptics.c psmouse driver contains a comment relating to the
firmware version of this touchpad:
"Firmware v8.1 does not report proper number of extended
capabilities, but has been proven to report correct min coordinates."
There appears to be a trap for this firmware version in line 1046 of
pms.c, as part of the function synaptics_get_hwinfo:
if ((SYNAPTICS_CAP_EXTENDED_QUERIES(syn->capabilities) >= 7 ||
SYNAPTICS_ID_FULL(syn->identify) == 0x801) &&
(syn->ext_capabilities & SYNAPTICS_EXT_CAP_MIN_COORDS) &&
synaptics_query(sc, SYNAPTICS_QUE_EXT_MIN_COORDS,
&min_coords)) return (-1);
... but with my limited capabilities I don't understand how it works.
It seems to exit the function if the fw version is 8.1, 'reports
min_coords' is true, and a query for min_coords fails. Is that correct?
Can anyone help with some pointers into how to proceed, so I can find
out why this Synaptics device doesn't get attached except as a "Standard
PS/2 mouse"?
Or does anyone know if it is possible to upgrade or downgrade the
touchpad firmware?
--
Chris Billington
--
Chris Billington <cbilling...@emulti.net>