Solved ACPI entering S3 - can't wake up anymore

jbodenmann

Well-Known Member

Reaction score: 142
Messages: 306

I've been using FreeBSD for a decade on servers and infrastructure. Last weekend I thought it's time to give it a chance as a desktop OS. For this, I've been installing FreeBSD 12.1 on my old Lenovo Thinkpad X1 Carbon (3rd gen).

I managed to install the base system, get wifi to work, have i3 with mouse & audio running. It was a lot more painless than expected - good work guys!

At one point I wanted to get sleep & resume to work so that I can close the laptops lid and get it back up later again.
Running sysctl hw.acpi shows that the hardware supports sleep states S3, S4 and S5.
I am able to enter S3 through either issuing acpiconf -s3 or by closing the lid after adding hw.acpi.lid_switch_state=S3 to /etc/sysctl.conf.

The problem is that I can't get the system to wake up again. Nothing happens when I open the lid. Nothing happens when I press the power button. The only thing that gets me out of there is either running out of battery (yeah... while in S3) or keeping the power button pressed for 5 seconds to perform a hard reset and then boot again.

What exactly causes my power button to not wake the system up out of S3? Same with the lid switch.

Any input is highly welcomed. Not being able to sleep & resume is currently the only thing keeping me from switching from Windows to FreeBSD as a daily driver.
 

kpedersen

Son of Beastie

Reaction score: 2,079
Messages: 2,942

A few things:
  • Just to check, does changing virtual terminal (i.e ctrl-alt-F2) get you out of a blank screen? Is the machine functioning at all (i.e sshd accepting connections). or is it still in S3? Does the 3rd gen X1 have that terrible "touch bar" for the F[1-9] keys? If so, make sure to press the key to toggle between F and utility keys (like volume, brightness etc) before suspending.

  • Did you start X11 after installing the correct KMS Intel driver from ports and resuming from there? My Thinkpad doesn't resume correctly without X11.

  • Try disabling the TPM in the Bios. This has a few issues it seems.

Finally, have a read of https://www.freebsd.org/doc/handbook/acpi-overview.html starting from 11.13.2.2. Suspend/Resume
It details a number of things to help you debug the problem and a few workarounds.
 
OP
jbodenmann

jbodenmann

Well-Known Member

Reaction score: 142
Messages: 306

Disabling TPM in BIOS did the trick. That was the only thing necessary to change.

Now everything appears to work as expected: Mouse/TrackPad/TrackPoint continues working, applications don't seem to be broken, WiFi re-gains link within seconds, ... seems good!

Thanks guys!
 
Top