NetBSD Problem Report #57874

From www@netbsd.org  Tue Jan 23 22:51:03 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))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id B0D251A9238
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 23 Jan 2024 22:51:03 +0000 (UTC)
Message-Id: <20240123225102.103581A9239@mollari.NetBSD.org>
Date: Tue, 23 Jan 2024 22:51:02 +0000 (UTC)
From: david@gutteridge.ca
Reply-To: david@gutteridge.ca
To: gnats-bugs@NetBSD.org
Subject: pms(4) completely unusable after r. 1.76 change to synaptics.c
X-Send-Pr-Version: www-1.0

>Number:         57874
>Category:       kern
>Synopsis:       pms(4) completely unusable after r. 1.76 change to synaptics.c
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 23 22:55:00 +0000 2024
>Last-Modified:  Thu Apr 18 17:40:01 +0000 2024
>Originator:     David H. Gutteridge
>Release:        10.0_RC3/i386
>Organization:
The NetBSD Foundation
>Environment:
>Description:
After r. 1.76 was committed to synaptics.c, this made my (yes, rather
old) trackpad and physical buttons completely unusable on an LG X110.
This is a regression in NetBSD 10.x vs. 9.3_STABLE.

Reverting part of the r. 1.76 change restores all basic functionality
(both physical buttons register clicks, trackpad registers single
finger movement), specifically, doing this:

RCS file: /cvsroot/src/sys/dev/pckbport/synaptics.c,v
retrieving revision 1.82
diff -u -r1.82 synaptics.c
--- synaptics.c	5 Sep 2023 05:55:12 -0000	1.82
+++ synaptics.c	23 Jan 2024 20:25:23 -0000
@@ -1420,6 +1420,7 @@
 			nsp.sp_z = psc->packet[2];
 		}

+#if 0
 		/*
 		 * Check if the x and y are non-zero that they
 		 * are within the bounds of the trackpad
@@ -1440,6 +1441,7 @@
 			    nsp.sp_x, nsp.sp_y);
 			return;
 		}
+#endif

 		nsp.sp_finger_count = pms_synaptics_get_fingers(psc,
 		    nsp.sp_w, nsp.sp_z);

There seems to be more than one issue involved here. Part of it seems
simply that the physical button clicks are getting caught in the
"check if x and y are non-zero" block and being discarded.

There is other strangeness/regression in that the bounds of the
trackpad are calculated completely differently in 9.3 vs. 10.0 RC3.
(A probably related PR in this regard is kern/57794, noting the same.)
It's not even possible to change them all back to the values in 9.3
using sysctl -w. That is, I can make a change to one of them, I will
get a response the change was made, and then it is immediately reset
by the driver back to its (wrong?) value. (This seems dependent on
which parameter. I am still looking at this.)

Dave

>How-To-Repeat:
As above.
>Fix:
Hack/workaround as above, disable that block of code.

>Audit-Trail:
From: "Michael van Elst" <mlelstv@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57874 CVS commit: src/sys/dev/pckbport
Date: Thu, 18 Apr 2024 17:35:53 +0000

 Module Name:	src
 Committed By:	mlelstv
 Date:		Thu Apr 18 17:35:53 UTC 2024

 Modified Files:
 	src/sys/dev/pckbport: synaptics.c

 Log Message:
 Renamed border/boundary variables to better describe their use.
 Fix edge default values, factor out percentage calculation for more consistent
 values. Use device_printf/DPRINTF to show errors instead of aprint variants.
 Print raw input for debugging.

 Correct capability parsing. Old devices were probed with nonexistent
 commands and then used undefined boundary values that made them unusuable.

 Fixes PR 57874.


 To generate a diff of this commit:
 cvs rdiff -u -r1.82 -r1.83 src/sys/dev/pckbport/synaptics.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

NetBSD Home
NetBSD PR Database Search

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