OpenBSD: Touchpad only working when using 5 fingers

As weird as it sounds, the touchpad only seems to be working when using 5 fingers (no more, no less) under OpenBSD 7.5-current. I can confirm that this is not a hardware issue because I also tested with Ubuntu 22.04 and the touchpad is working as intended.

I understand that OpenBSD is not officially supported, but I’d appreciate all the help I can get. Could it be perhaps a configuration issue?

You can find the output of dmesg here.

Even if you solve this issue, I want to warn you that there isn’t going to be any support for the following:

  • USB4
  • Suspend / resume
  • PMF (which is important for tuning TDP)
  • EPP (which is important for battery consumption policy of CPU)

So touchpad is going to be the tip of the iceberg…

That’s alright, I knew there were other issues, but someone has to test and do the work. Hopefully that can be me. One problem at a time.

Do you perhaps know of any resources/specifications for writing the necessary drivers for these issues?

The USB4 spec is open so a connection manager can be written for BSD. However I don’t expect you can leverage Linux code due to the licensing differences.

For CPPC/EPP support you can look at the ACPI specs, but amd-pstate does deviate quite a bit.

For PMF, there isn’t any public open spec, only the Linux driver exists and the license I don’t believe is appropriate for re-use.

For all of those cases you can of course reach out to the author to ask them to relicense the code, but I don’t expect it to happen.

For suspend/resume, you need to notify the AMD SMU on s0ix entry, but there isn’t an open spec for tihs, only amd-pmc code. Also the EC needs to be notified of the state transitions and all other hardware must be in D3.

These are all VERY BIG developments.

Thank you very much Mario. Indeed these do sound like big challenges and maybe a bit out of my league. I’ll keep trying though.

Thanks again Mario, you’ve been very helpful.

FYI OpenBSD 7.6 now has initial support for S0ix.

For Intel, AMD, or both?

Both to my knowledge. I’ve used it successfully on a (non-Framework) Intel machine myself.

AMD requires very specific things like PMC driver and there are registers that can be queried to see if you got to hardware sleep.

I’ll be curious to hear how much they’ve actually ported.

It’s enabled on -current, but was not enabled by default for the 7.6 release. I just did a test with my Framework 16 and it suspends: acpi0: S3 unavailable, using S0. It wakes up, but then runs into uhub device problems… these are probably the kinks still needing to be worked on before enabling it by default for the next OpenBSD release.

Regarding the touchpad issues - I’m not an HID hacker, but I took a dive. Went through the PIXA3854 report descriptor. The kernel identifies 2 report IDs, number 1 and number 4. With a kernel built with IHIDEV_DEBUG, I can see report 4 showing a live set of numbers when I touch the touchpad, for example with 1 finger:

ihidev1: ihidev_intr: hid input (rep 4): 10 b7 7b 03 11 0c 8a 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

A possible source of the non-working touchpad might be this:

ims0 at ihidev1 reportid 1: 2 buttons, Z and W dir

It seems to be using report ID 1, not 4…