Bug 260381

Summary: regression: moused(8), sysmouse(4) or psm(4) delays button release events by about 900ms
Product: Base System Reporter: Bertrand Petit <bsdpr>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Only Me CC: bsdpr
Priority: ---    
Version: 12.3-STABLE   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=137228
Attachments:
Description Flags
Source of the test command used to produce the traces in the bug report
none
Source of the test command used to produce the traces in the bug report none

Description Bertrand Petit 2021-12-13 09:13:48 UTC
Since I updated an old laptop from 11.<something>-STABLE to 12.3-STABLE (built from revision d891ee6ac7e6af693959c6d11c5af7c440919ea9) the trackpad became unusable: whichever button is clicked, button up events are delayed by about 900ms or until another event is to be reported within that time window.

As an illustration here is a trace of a single click, the first column is a timestamp, last three columns are the reported button states:
1639384474.857087 Buttons: d u u
1639384475.797024 Buttons: u u u

Trace of a double click:
1639384495.480674 Buttons: d u u
1639384495.601411 Buttons: u u u
1639384495.649127 Buttons: d u u
1639384496.587823 Buttons: u u u

At boot time the device is reported as
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
WARNING: Device "psm" is Giant locked and may be deleted before FreeBSD 14.0.
psm0: model Synaptics Touchpad, device ID 0

This looks to be a resurrection of bug #137228 (reported in 2009).

[BTW, bugzilla lacks a 12.3-STABLE tags in the version number selector.]
Comment 1 Bertrand Petit 2021-12-13 09:16:01 UTC
Created attachment 230075 [details]
Source of the test command used to produce the traces in the bug report
Comment 2 Bertrand Petit 2021-12-19 16:55:51 UTC
This bug is a regression as testing the same hardware using either 11.4-RELEASE or 12.1-RELEASE from a memstick shows mouse buttons operating as expected.
Comment 3 Bertrand Petit 2021-12-19 16:57:44 UTC
Created attachment 230246 [details]
Source of the test command used to produce the traces in the bug report

Proper handling of mouse operation levels.