MateBook X Pro 2021 ACPI S3 resume fails

From: Patrick Mackinlay <patrick_at_spacesurfer.com>
Date: Fri, 15 Apr 2022 08:59:03 UTC
Hello,

I have a MateBook X Pro 2021 with FreeBSD installed, ACPI S3 doesn't 
work, when I run

acpiconf -s 3

the laptop appears to suspend fine, however it will not resume. When I 
press the power button to resume the screen stays blank and eventually 
(after a couple of minutes) the machine just reboots normally.
After booting back to FreeBSD the last entry in /var/log/messages is the 
suspend message.

The laptop suspends and resumes fine on linux.

I tried building a minimal test kernel (MINIMAL config with NO_MODULES 
and nvme and nvd devices added). I used FreeBSD 13 stable (commit 
bb8e1dfbff30e5df97fa31c88f8218af054fe166). The test kernel had the same 
issues.

Debugging with:

sysctl debug.bootverbose=1
sysctl debug.acpi.suspend_bounce=1
acpiconf -s 3

worked fine.

I have attached the dmesg.boot, and the /var/log/messages for the 
suspend/resume trial (messages.on.suspend) and for when I tried 
debugging (messages.on.suspend.test). All theses were taken with the 
minimal test kernel.

Is it possible to get suspend/resume working on the laptop?

regards,
Patrick