NetBSD Problem Report #58302
From www@netbsd.org Fri May 31 02:10:37 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 9319A1A9238
for <gnats-bugs@gnats.NetBSD.org>; Fri, 31 May 2024 02:10:37 +0000 (UTC)
Message-Id: <20240531021036.3A89C1A923A@mollari.NetBSD.org>
Date: Fri, 31 May 2024 02:10:36 +0000 (UTC)
From: marc@mccd.space
Reply-To: marc@mccd.space
To: gnats-bugs@NetBSD.org
Subject: Newer Elantech touchpad is not being registered by pms
X-Send-Pr-Version: www-1.0
>Number: 58302
>Category: kern
>Synopsis: Newer Elantech touchpad is not being registered by pms
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri May 31 02:15:00 +0000 2024
>Last-Modified: Sat Jun 08 16:45:01 +0000 2024
>Originator: Marc
>Release: 10.0
>Organization:
>Environment:
NetBSD bsd 10.0 NetBSD 10.0 (GENERIC) #0: Thu Mar 28 08:33:33 UTC 2024 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
On a fresh install of netbsd on a Lenovo T480s, the Elantech touchpad is not being detected by the pms.
I've booted the system with boot -x -v boot parameters. The output of dmesg | grep pms is:
[ 1.003983] pms0 at pckbc1 (aux slot)
[ 1.003983] pms0: synaptics_probe: Not synaptics.
[ 1.003983] pms0: reset 0 0xaa 0x00
[ 1.003983] wsmouse0 at pms0 mux 0
>How-To-Repeat:
This problem seems to be happening on newer elantech touchpad models?
>Fix:
Openbsd, Freebsd and Linux all have this working out of the box.
There is an old email thread about this issue on FreeBSD that might be of help?
https://lists.freebsd.org/pipermail/freebsd-drivers/2019-May/002183.html
It leads to a fix that was made in the linux kernel:
https://github.com/torvalds/linux/commit/10d900303f1c3a821eb0bef4e7b7ece16768fba4#diff-e91bc4802c6797fe9acbdca0ed240be9
>Audit-Trail:
From: "Marc Coquand" <marc@mccd.space>
To: <gnats-bugs@netbsd.org>
Cc:
Subject: Re: kern/58302: Newer Elantech touchpad is not being registered by
pms
Date: Fri, 31 May 2024 17:04:13 -0500
Sorry for spamming, I forgot to include in the original report
a patch that might be relevant to this ticket.
https://mail-index.netbsd.org/tech-kern/2023/07/15/msg028984.html
Ostensibly this patch might fix my issue but never got merged, so
I wanted to share it with this report.
-- Marc
From: mlelstv@serpens.de (Michael van Elst)
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/58302: Newer Elantech touchpad is not being registered by pms
Date: Sat, 1 Jun 2024 07:17:50 -0000 (UTC)
marc@mccd.space ("Marc Coquand") writes:
> Sorry for spamming, I forgot to include in the original report
> a patch that might be relevant to this ticket.
> https://mail-index.netbsd.org/tech-kern/2023/07/15/msg028984.html
That looks good. It applies to -current except for a whitespace
mismatch in i2c.c
Can you test it ? :)
From: "Marc Coquand" <marc@mccd.space>
To: <gnats-bugs@netbsd.org>, <kern-bug-people@netbsd.org>,
<gnats-admin@netbsd.org>, <netbsd-bugs@netbsd.org>
Cc:
Subject: Re: kern/58302: Newer Elantech touchpad is not being registered by
pms
Date: Sat, 01 Jun 2024 17:32:58 -0500
Hey,=20
So I tried today to give the updated patch linked in the email
thread a spin.
I wasn't able to build the kernel with xorg support (see details
below) so I could only test it without xorg.
I built NetBSD on the following commit (github)=20
74b93bff118ebb0ab3b384ea79fe9a7c9c62ae20
I applied the patch as is with git am, and didn't do anything to
fix the whitespace warnings. I built the kernel with the following
command:
./build.sh -U -u -O ~/obj -j2 -m amd64 release
I created an installation media and booted into OS with -x -v
flags, and these were my findings:
$ dmesg | grep -i pms
[ ...] pms0 at pckbc1 (aux slot)
[ ...] pms0: synaptics_probe: Not synaptics.
[ ...] wsmouse0 at pms0 mux 0
$ dmesg | grep -i elan
nothing
$ dmesg | grep -i iic
[ ...] iic0 at dwiic0: I2C bus
[ ...] iic1 at ichsmb0: I2C bus
Since (ostensibly) dmesg doesn't report registering any elan touchpad
, I didn't think the patch worked and so I didn't bother trying
further to build with xorg support.
--=20
The error I got when trying to build NetBSD with Xorg support was
https://paste.sr.ht/~marcc/54861b687ea2bace19a4afb35273ceddf3399582
Fixing the import issues yielded more errors, so I gave up. I
attempted to buid it on FreeBSD 14
-- Marc
On Sat Jun 1, 2024 at 2:20 AM -05, Michael van Elst wrote:
> The following reply was made to PR kern/58302; it has been noted by GNATS=
.
>
> From: mlelstv@serpens.de (Michael van Elst)
> To: gnats-bugs@netbsd.org
> Cc:=20
> Subject: Re: kern/58302: Newer Elantech touchpad is not being registered =
by pms
> Date: Sat, 1 Jun 2024 07:17:50 -0000 (UTC)
>
> marc@mccd.space ("Marc Coquand") writes:
> =20
> > Sorry for spamming, I forgot to include in the original report
> > a patch that might be relevant to this ticket.
> =20
> > https://mail-index.netbsd.org/tech-kern/2023/07/15/msg028984.html
> =20
> That looks good. It applies to -current except for a whitespace
> mismatch in i2c.c
> =20
> Can you test it ? :)
> =20
From: "Marc Coquand" <marc@mccd.space>
To: <gnats-bugs@netbsd.org>, <kern-bug-people@netbsd.org>,
<gnats-admin@netbsd.org>, <netbsd-bugs@netbsd.org>
Cc:
Subject: Re: kern/58302: Newer Elantech touchpad is not being registered by
pms
Date: Sat, 08 Jun 2024 11:23:04 -0500
Heya,
Adding some more debugging info.
It seems that T480s only uses some limited i2c functionality, and is in
fact a PS/2 touchpad, which would explain why the patch doesn't work.
My suspicion now is that the Elantech driver that is built into NetBSD
only supports version 2, whereas the version used by T480s is version
4. I found this by checking dmesg on linux:
[ 6.292103] psmouse serio1: elantech: assuming hardware version 4
(with firmware version 0x7f3001)
So the solution to this could be to port over the elantech v4
functionality from OpenBSD or FreeBSD, since they both support this model.
-- Marc
On Sat Jun 1, 2024 at 6:55 PM -05, Marc Coquand wrote:
> The following reply was made to PR kern/58302; it has been noted by GNATS=
.
>
> From: "Marc Coquand" <marc@mccd.space>
> To: <gnats-bugs@netbsd.org>, <kern-bug-people@netbsd.org>,
> <gnats-admin@netbsd.org>, <netbsd-bugs@netbsd.org>
> Cc:=20
> Subject: Re: kern/58302: Newer Elantech touchpad is not being registered =
by
> pms
> Date: Sat, 01 Jun 2024 17:32:58 -0500
>
> Hey,=3D20
> =20
> So I tried today to give the updated patch linked in the email
> thread a spin.
> =20
> I wasn't able to build the kernel with xorg support (see details
> below) so I could only test it without xorg.
> =20
> I built NetBSD on the following commit (github)=3D20
> =20
> 74b93bff118ebb0ab3b384ea79fe9a7c9c62ae20
> =20
> I applied the patch as is with git am, and didn't do anything to
> fix the whitespace warnings. I built the kernel with the following
> command:
> =20
> ./build.sh -U -u -O ~/obj -j2 -m amd64 release
> =20
> I created an installation media and booted into OS with -x -v
> flags, and these were my findings:
> =20
> $ dmesg | grep -i pms
> [ ...] pms0 at pckbc1 (aux slot)
> [ ...] pms0: synaptics_probe: Not synaptics.
> [ ...] wsmouse0 at pms0 mux 0
> =20
> $ dmesg | grep -i elan
> nothing
> =20
> $ dmesg | grep -i iic
> [ ...] iic0 at dwiic0: I2C bus
> [ ...] iic1 at ichsmb0: I2C bus
> =20
> Since (ostensibly) dmesg doesn't report registering any elan touchpad
> , I didn't think the patch worked and so I didn't bother trying
> further to build with xorg support.
> =20
> --=3D20
> The error I got when trying to build NetBSD with Xorg support was
> =20
> https://paste.sr.ht/~marcc/54861b687ea2bace19a4afb35273ceddf3399582
> =20
> Fixing the import issues yielded more errors, so I gave up. I
> attempted to buid it on FreeBSD 14
> =20
> -- Marc
> =20
> On Sat Jun 1, 2024 at 2:20 AM -05, Michael van Elst wrote:
> > The following reply was made to PR kern/58302; it has been noted by GN=
ATS=3D
> .
> >
> > From: mlelstv@serpens.de (Michael van Elst)
> > To: gnats-bugs@netbsd.org
> > Cc:=3D20
> > Subject: Re: kern/58302: Newer Elantech touchpad is not being register=
ed =3D
> by pms
> > Date: Sat, 1 Jun 2024 07:17:50 -0000 (UTC)
> >
> > marc@mccd.space ("Marc Coquand") writes:
> > =3D20
> > > Sorry for spamming, I forgot to include in the original report
> > > a patch that might be relevant to this ticket.
> > =3D20
> > > https://mail-index.netbsd.org/tech-kern/2023/07/15/msg028984.html
> > =3D20
> > That looks good. It applies to -current except for a whitespace
> > mismatch in i2c.c
> > =3D20
> > Can you test it ? :)
> > =3D20
> =20
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.