Bug 267094 - Enable Touchpad on Fujitsu Lifebook (i2c / hid)
Summary: Enable Touchpad on Fujitsu Lifebook (i2c / hid)
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 13.1-STABLE
Hardware: amd64 Any
: --- Affects Some People
Assignee: Vladimir Kondratyev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-15 18:01 UTC by Peter Much
Modified: 2023-11-28 02:10 UTC (History)
2 users (show)

See Also:


Attachments
patch to dev/hid/hmt.c (495 bytes, patch)
2022-10-15 18:01 UTC, Peter Much
no flags Details | Diff
output from hid-decode (13.41 KB, text/plain)
2022-10-16 01:24 UTC, Peter Much
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Much 2022-10-15 18:01:04 UTC
Created attachment 237347 [details]
patch to dev/hid/hmt.c

The Fujitsu lifebook, model A3511, has a builtin touchpad attached to ig4iic0.

This touchpad is detected and functional in X, but it works as a mouse, i.e. considerably sloppy. Here is the device chain:

pci0
  ig4iic0
    iicbus0
      iichid0
        hidbus0
          hms0
          hconf0

The hmt driver gets also autoloaded into the kernel, but does not attach, because it does not find any buttons on the device, and, according to the code of that driver, a touchpad without buttons must not exist - for whatever reason I don't know: if I remove that check in the code, then the driver attaches and the thing works (obviousely without the buttons).

But the buttons do exist. They are just not at the place where the driver expects them. The attached patch now simply changes a "1" into a "2", and then the thing works.

I did not figure out how "quirks" would be created in this hid infrastructure, neither do I know if this is a problem on our side or with the device.

Important: the touchpad device identifies as "ELAN0D07:00 04F3:3078"
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2022-10-15 20:54:59 UTC
Given that we now use the "patch" keyword, the Subject no longer needs it.
Comment 2 Peter Much 2022-10-16 01:24:16 UTC
Created attachment 237365 [details]
output from hid-decode
Comment 3 freebsd 2023-09-08 00:13:49 UTC
I have a Fujitsu Lifebook exhibiting the same problem and I can confirm the patch still solves it on 14-STABLE.
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-11-02 06:22:34 UTC
A commit in branch main references this bug:

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

commit 1d46c8e5c2702c141c6be982b3ca44e74d1cb8f1
Author:     Vladimir Kondratyev <wulf@FreeBSD.org>
AuthorDate: 2023-11-02 06:20:20 +0000
Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2023-11-02 06:20:20 +0000

    hmt(4): Do not require input report HID usages to be a member of TLC

    Some touchpads places button usages (in HID report descriptor) in to
    the 2-nd level collection rather than in to the top level one. That
    confuses current code. Remove collection level check in HID report
    descriptor parser to fix device detection.

    Reported by:    Peter Much <pmc@citylink.dinoex.sub.org>
    PR:             267094
    MFC after:      1 week

 sys/dev/hid/hmt.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
Comment 5 commit-hook freebsd_committer freebsd_triage 2023-11-27 15:23:50 UTC
A commit in branch stable/14 references this bug:

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

commit 16a379ffde4baadc5bc5bae23658b0bf2ff6ab2f
Author:     Vladimir Kondratyev <wulf@FreeBSD.org>
AuthorDate: 2023-11-02 06:20:20 +0000
Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2023-11-27 15:20:16 +0000

    hmt(4): Do not require input report HID usages to be a member of TLC

    Some touchpads places button usages (in HID report descriptor) in to
    the 2-nd level collection rather than in to the top level one. That
    confuses current code. Remove collection level check in HID report
    descriptor parser to fix device detection.

    Reported by:    Peter Much <pmc@citylink.dinoex.sub.org>
    PR:             267094

    (cherry picked from commit 1d46c8e5c2702c141c6be982b3ca44e74d1cb8f1)

 sys/dev/hid/hmt.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
Comment 6 commit-hook freebsd_committer freebsd_triage 2023-11-27 15:23:53 UTC
A commit in branch stable/13 references this bug:

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

commit 00b6fafcc1f174c7819bf3ff0d19e2244267ed76
Author:     Vladimir Kondratyev <wulf@FreeBSD.org>
AuthorDate: 2023-11-02 06:20:20 +0000
Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2023-11-27 15:20:49 +0000

    hmt(4): Do not require input report HID usages to be a member of TLC

    Some touchpads places button usages (in HID report descriptor) in to
    the 2-nd level collection rather than in to the top level one. That
    confuses current code. Remove collection level check in HID report
    descriptor parser to fix device detection.

    Reported by:    Peter Much <pmc@citylink.dinoex.sub.org>
    PR:             267094

    (cherry picked from commit 1d46c8e5c2702c141c6be982b3ca44e74d1cb8f1)

 sys/dev/hid/hmt.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
Comment 7 Mark Linimon freebsd_committer freebsd_triage 2023-11-28 02:09:45 UTC
^Triage: fix up the attachment filename so it will be autodetected as a patch.  The 'patch' Keyword is obsoleted by this technology.