Hardware: Framework Laptop 12, (Intel Raptor Lake-P). FreeBSD mainGENERIC kernel built from this change, hw.acpi.power_button_state=fw_suspendbooted with bootverbose.
Before: enter S3 with the power button, then wake with the power button; the machine resumes and ~0.2 s later suspends itself again, looping indefinitely until broken with an s2idle (S2) cycle.
After: the same sequence resumes and stays up. Each resume logs, e.g.:
# Enter S3 with the power button; resume with the power button. Repeat for 5 cycles.
# Each cycle, the firmware-replayed press is ignored and the machine stays awake. dmesg shows, e.g.: acpi0: ignoring power button press 162 ms615204 us after resume (firmware replayed the wake event) with measured latencies of ~603-615 ms across the cycles.
# The deliberate press that begins each subsequent cycle (well over 1 s after the prior resume, after the display is back) suspends normally -- confirming genuine presses outside the window are honored.
# No dmesg errors; suspend/resume otherwise unaffected.
A deliberate power-button press well after resume still suspends normally.Before the rework, Behavior is unchanged on spec-compliant firmware that reports the wake as Notify 0x02 (handled on a different path that never reaches this check)the same procedure re-suspended immediately on resume and the machine could not be kept awake with the button.