Bug 251149 - SynPS/2 Synaptics TouchPad: Failed to create a device for ... after upgrade from 12.1 to 12.2
Summary: SynPS/2 Synaptics TouchPad: Failed to create a device for ... after upgrade f...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 12.2-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: Vladimir Kondratyev
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2020-11-15 08:43 UTC by Jens Grassel
Modified: 2021-03-02 19:30 UTC (History)
3 users (show)

See Also:


Attachments
Output of dmesg (16.76 KB, text/plain)
2020-12-17 13:35 UTC, Jens Grassel
no flags Details
Fix for the "kernel bug: device has min == max on ABS_X" libinput-related issue (1.50 KB, patch)
2020-12-17 18:59 UTC, Vladimir Kondratyev
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Grassel 2020-11-15 08:43:29 UTC
Hi,

I just upgraded from 12.1-RELEASE to 12.2-RELEASE on my Dell XPS m1330 and the syntaptics touchpad stopped working. I played a bit around with the `kern.evdev.rcpt_mask` settings but to no avail.

```
# grep -i synaptic /boot/loader.conf 
hw.psm.synaptics_support="1"
# sysctl kern.evdev.rcpt_mask 
kern.evdev.rcpt_mask: 12
# dmesg | grep -i synaptic
psm0: model Synaptics Touchpad, device ID 0
# grep EE /var/log/Xorg.0.log
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  1609.992] (II) Initializing extension MIT-SCREEN-SAVER
[  1610.031] (EE) AIGLX error: Calling driver entry point failed
[  1611.000] (EE) event6  - SynPS/2 Synaptics TouchPad: kernel bug: device has min == max on ABS_X
[  1611.048] (EE) libinput: SynPS/2 Synaptics TouchPad: Failed to create a device for /dev/input/event6
[  1611.048] (EE) PreInit returned 2 for "SynPS/2 Synaptics TouchPad"
# grep -i synaptic /var/log/Xorg.0.log
[  1610.942] (II) config/udev: Adding input device SynPS/2 Synaptics TouchPad (/dev/input/event6)
[  1610.942] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "evdev pointer catchall"
[  1610.942] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "evdev touchpad catchall"
[  1610.943] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "libinput pointer catchall"
[  1610.943] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "libinput touchpad catchall"
[  1610.943] (II) Using input driver 'libinput' for 'SynPS/2 Synaptics TouchPad'
[  1610.943] (**) SynPS/2 Synaptics TouchPad: always reports core events
[  1610.999] (II) event6  - SynPS/2 Synaptics TouchPad: is tagged by udev as: Mouse Touchpad
[  1611.000] (EE) event6  - SynPS/2 Synaptics TouchPad: kernel bug: device has min == max on ABS_X
[  1611.000] (II) event6  - SynPS/2 Synaptics TouchPad: was rejected
[  1611.048] (EE) libinput: SynPS/2 Synaptics TouchPad: Failed to create a device for /dev/input/event6
[  1611.048] (EE) PreInit returned 2 for "SynPS/2 Synaptics TouchPad"
# cat /usr/local/etc/X11/xorg.conf.d/synaptics-touchpad.conf 
Section "InputClass"
    Identifier	"Touchpad"
    MatchIsTouchpad "on"
    Driver "libinput"
    Option "Tapping"            "on"
    Option "ScrollMethod"       "edge"
    Option "DisableWhileTyping" "on"
EndSection
```

It looks like the touchpad gets "rejected" although I have no idea if this is a kernel or a xorg/driver problem.

Does anyone have an idea or how can I help out (debug logs etc.)?

Kind regards,

Jens
Comment 1 Martin Birgmeier 2020-11-19 13:36:08 UTC
I have a similar issue after upgrading a Lenovo W520 from 12.1 to 12.2.

In the vt console, sysmouse works with the touchpad, the trackpoint, and the external USB mouse.

In X11, only the trackpoint and the external USB are working.

-- Martin
Comment 2 Martin Birgmeier 2020-11-21 09:51:41 UTC
In issue #249987, kern.evdev.rcpt_mask is mentioned.

In 12.2 it seems to be set to 0xc.

Setting it to 0x3 makes all three pointer devices working again in X11 (touchpad, trackpoint, USB mouse).

-- Martin
Comment 3 Martin Birgmeier 2020-11-21 11:07:06 UTC
The issue reported by me is solved:

In /var/log/Xorg.0.log, there were the following lines (with kern.evdev.rcpt_mask=12):

(EE) synaptics: SynPS/2 Synaptics TouchPad: Synaptics driver unable to detect protocol
(EE) PreInit returned 11 for "SynPS/2 Synaptics TouchPad"

Also, I am compiling ports myself, and from ages ago the EVDEV option was still unset for the xf86-input-synaptics port.

Enabling EVDEV support in x11-drivers/xf86-input-synaptics solved the issue for me.

Sorry for spamming your bug report; I hope that nonetheless this information may be useful for someone.

-- Martin
Comment 4 Jason W. Bacon freebsd_committer freebsd_triage 2020-11-21 12:58:12 UTC
Same problem on a ThinkPad T61 using binary packages, so no unusual port options.

Touchpad works in VT but not in X11.

Setting kern.evdev.rcpt_mask=3 worked around it.
Comment 5 Martin Birgmeier 2020-11-21 14:51:17 UTC
What I did to diagnose the issue:
- Look in /var/log/Xorg.0.log
- run "sysctl kern.evdev" and check that all input devices are shown in the output
- run "sysctl hw.psm" and check that all mouse devices are in the output
- run "xinput" and check that X sees all input devices (those from kern.evdev)
- check that /etc/X11/xorg.conf is mostly empty - nowadays, the X server autoconfigures itself mostly completely
- and of course, search the Internet for all error messages found...

-- Martin
Comment 6 Jason W. Bacon freebsd_committer freebsd_triage 2020-11-23 22:36:02 UTC
(In reply to Jason W. Bacon from comment #4)

Just hit the same issue after upgrading an old MacBook Pro to 12.2.

kern.evdev.rcpt_mask=3 fixed it here as well.
Comment 7 Jens Grassel 2020-11-26 06:50:37 UTC
Hi,

reading about the successful solutions with setting `kern.evdev.rcpt_mask = 3` I tried again but with no success.
The only thing I can get working with that setting is the console mouse (via moused) which works as expected but under X it does not work and the error message in the logs ("... was rejected") stays the same. :-(

Kind regards,

Jens
Comment 8 Vladimir Kondratyev freebsd_committer freebsd_triage 2020-12-17 07:47:59 UTC
(In reply to Jens Grassel from comment #7)
Hi Jens,

Could you add debug.psm.loglevel=5 to /boot/loader.conf and than reboot and post here a boot log?
Comment 9 Vladimir Kondratyev freebsd_committer freebsd_triage 2020-12-17 08:03:26 UTC
(In reply to Jason W. Bacon from comment #6)
> Just hit the same issue after upgrading an old MacBook Pro to 12.2.
If your MacBook has a wsp(4) or an atp(4) touchpad, please open another one issue to not mix things together.
Comment 10 Jens Grassel 2020-12-17 13:35:06 UTC
Created attachment 220662 [details]
Output of dmesg

Hi,

here is the requested boot log (output of dmesg) after setting the debug.psm.loglevel to 5.

Kind regards,

Jens
Comment 11 Vladimir Kondratyev freebsd_committer freebsd_triage 2020-12-17 18:59:33 UTC
Created attachment 220675 [details]
Fix for the "kernel bug: device has min == max on ABS_X" libinput-related issue

Try attached patch
Comment 12 Jens Grassel 2020-12-22 19:27:44 UTC
(In reply to Vladimir Kondratyev from comment #11)

Sorry for the late reply, had lots of stuff to do and read up on how to compile a kernel. ;-)

Thank you very much the patch seems to work like a charm. :-)

Kind regards,

Jens
Comment 13 commit-hook freebsd_committer freebsd_triage 2020-12-23 08:12:53 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=2ac1c1927258e649e3ca3269aea40fb4c63e2296

commit 2ac1c1927258e649e3ca3269aea40fb4c63e2296
Author:     Vladimir Kondratyev <wulf@FreeBSD.org>
AuthorDate: 2020-12-22 20:44:42 +0000
Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2020-12-23 08:10:53 +0000

    psm(4): Always initialize Synaptics touchpad report range with defaults

    Otherwise libinput refuses to recoginize some Synaptics touchpads with
    "kernel bug: device has min == max on ABS_X" message in Xorg.log.

    PR:             251149
    Reported-by:    Jens Grassel <freebsd-ports@jan0sch.de>
    Tested-by:      Jens Grassel <freebsd-ports@jan0sch.de>
    MFC-after:      2 weeks

 sys/dev/atkbdc/psm.c | 23 +++++++++--------------
 1 file changed, 9 insertions(+), 14 deletions(-)
Comment 14 commit-hook freebsd_committer freebsd_triage 2020-12-23 08:12:55 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=54d2dfc4b24db110c8a4b75e2f02a2360fd9fc8c

commit 54d2dfc4b24db110c8a4b75e2f02a2360fd9fc8c
Author:     Vladimir Kondratyev <wulf@FreeBSD.org>
AuthorDate: 2020-12-21 15:44:28 +0000
Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2020-12-23 08:10:49 +0000

    cyapa(4): Add support for evdev protocol

    Tested-by:      Matthias Apitz <guru@unixarea.de>
    MFC-after:      2 weeks

 sys/dev/cyapa/cyapa.c          | 89 ++++++++++++++++++++++++++++++++++++++++++
 sys/modules/i2c/cyapa/Makefile |  3 +-
 2 files changed, 91 insertions(+), 1 deletion(-)
Comment 15 commit-hook freebsd_committer freebsd_triage 2020-12-23 08:12:56 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=a223aa8abd6d1bf9547262c9a52333bcf4d0d13a

commit a223aa8abd6d1bf9547262c9a52333bcf4d0d13a
Author:     Vladimir Kondratyev <wulf@FreeBSD.org>
AuthorDate: 2020-12-21 15:24:09 +0000
Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2020-12-23 08:09:25 +0000

    cyapa(4): Make button detection matching ChromeOS driver

    Tested-by:      Matthias Apitz <guru@unixarea.de>
    MFC-after:      2 weeks

 sys/dev/cyapa/cyapa.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
Comment 16 commit-hook freebsd_committer freebsd_triage 2020-12-23 08:12:57 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=bde56c99426431c6319afd35c2a3cd66e315034a

commit bde56c99426431c6319afd35c2a3cd66e315034a
Author:     Vladimir Kondratyev <wulf@FreeBSD.org>
AuthorDate: 2020-12-21 15:48:50 +0000
Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2020-12-23 08:10:53 +0000

    acpi_wmi(4): Allow attachment to ACPI node if EC is not found

    Conducted tests showed that Embedded Controller is not mandatory for
    WMI extensions to work.

    Reported-by:    yuripv
    Reviewed-by:    avg
    MFC-after:      2 weeks
    Differential-Revision:  https://reviews.freebsd.org/D27653

 sys/dev/acpi_support/acpi_wmi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Comment 17 commit-hook freebsd_committer freebsd_triage 2021-02-05 10:20:18 UTC
A commit in branch stable/12 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=4e33793cf41c0ec6b5db68bca1451db3e3d79a91

commit 4e33793cf41c0ec6b5db68bca1451db3e3d79a91
Author:     Vladimir Kondratyev <wulf@FreeBSD.org>
AuthorDate: 2020-12-22 20:44:42 +0000
Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2021-02-05 10:15:00 +0000

    psm(4): Always initialize Synaptics touchpad report range with defaults

    Otherwise libinput refuses to recoginize some Synaptics touchpads with
    "kernel bug: device has min == max on ABS_X" message in Xorg.log.

    PR:             251149
    Reported-by:    Jens Grassel <freebsd-ports@jan0sch.de>
    Tested-by:      Jens Grassel <freebsd-ports@jan0sch.de>
    MFC-after:      2 weeks
    (cherry picked from commit 2ac1c1927258e649e3ca3269aea40fb4c63e2296)

 sys/dev/atkbdc/psm.c | 23 +++++++++--------------
 1 file changed, 9 insertions(+), 14 deletions(-)
Comment 18 Lars Herschke 2021-02-26 14:58:13 UTC
Unfortunately the commit is still missing in the releng/12.2 branch.
Comment 19 Vladimir Kondratyev freebsd_committer freebsd_triage 2021-02-26 21:19:26 UTC
(In reply to Lars Herschke from comment #18)
> Unfortunately the commit is still missing in the releng/12.2 branch.
It is not security fix to get in to security branch. I am sorry.
Comment 20 Lars Herschke 2021-03-01 08:25:08 UTC
I do not understand that. The error did not arise until Release 12.2. In the notes on the page https://www.freebsd.org/releng/, the branch releng/12.2 says "FreeBSD 12.2 supported errata fix branch." So, from my point of view, this fix has to end up in the 12.2 branch.
Comment 21 Vladimir Kondratyev freebsd_committer freebsd_triage 2021-03-01 22:02:50 UTC
(In reply to Lars Herschke from comment #20)

> So, from my point of view, this fix has to end up in the 12.2 branch.
In this case it looks that I need your help to properly fill an Errata template https://www.freebsd.org/security/errata-template.txt [1], *

From my point of view:
1. This issue does not have any impact on stability.
2. It affects small group of people. Only users of rather old(>10 years old) synaptics single touch trackpads suffer from it.
3. It is easy to workaround this issue by setting kern.evdev.rcpt_mask sysctl back to 12.1 default value of 3. This workaround is well known.

So I do not know proper words to convince security team to start processing an errata in this case. If you do, please send me them, I will give them more weight with forwarding from my email address.

[1] https://docs.freebsd.org/en/articles/freebsd-releng/

* To request an Errata Notice after a release cycle has completed, a developer should fill out the Errata Notice template, in particular the Background, Problem Description, Impact, and if applicable, Workaround sections.
Comment 22 Lars Herschke 2021-03-02 19:30:26 UTC
Ok, i didn't know that you had to go to such an effort to get the fix into the release branch.
Finally, I would like to point out that with the sysctl workaround for xorg, ps/2 touchpads also require a running moused service.