by codedokode · 1y ago · 0 comments
> S3 is unsupported (thanks AMD)
My AMD laptop (not a Framework) seems to have no issues with sleeping though (although I don't know what power state it is in).
The official line at the moment is that some kind of firmware bug led to something other than the keyboard signalling the same interrupt line. So at the moment keyboard wakeup needed to be disabled to get reliable sleep. We’ll see if the latest firmware update[1] works out (and how long it takes to come out of beta).
> I don't know what power state [an unspecified AMD laptop] is [sleeping] in
That’s the crux of the issue[2], though. It’s either suspend-to-RAM (S3; dump hardware state to RAM and power off most of the hardware including the CPU) or suspend-to-idle (S0ix or “Modern Standby”; try to put most of the external hardware in low-power states, downclock the CPU, and hope nothing wakes up). Apple did get their S0ix equivalent (“Power Nap”) right enough that most don’t complain; in PC-land, reports of laptops cooking themselves in bags due to inadvertent[3] wakeups from S0ix are everywhere.
I cannot find the exact CPU generation cutoffs at the moment, but the problem is that the CPU manufacturers are responsible for a good part of firmware development, and they no longer offer support for S3 at all—the corresponding procedure may be removed from the ACPI bytecode completely, or they may leave it there but declare it buggy and unreliable (usually truthfully). The only exception I know of is Linux-certified ThinkPads, because apparently Lenovo has enough weight to throw around that they can get special treatment.
[1] https://community.frame.work/t/framework-laptop-13-ryzen-704...
[2] https://blog.jeujeus.de/blog/hardware/laptops-will-not-sleep...
[3] Not clear how much of this is Windows looking for updates regardless of the user’s desire.
> kernel: ACPI: PM: Waking up from system sleep state S3
> kernel: CPU1 is up
> kernel: smpboot: Booting Node 0 Processor 1 APIC 0x1
> kernel: Enabling non-boot CPUs
> kernel: ACPI: PM: Low-level resume complete
So of course it might be not a "real" S3, but I didn't have a chance to test how long the laptop battery can last in suspended mode.
PM: suspend entry (s2idle)
Filesystems sync: 0.012 seconds
Freezing user space processes
Freezing user space processes completed (elapsed 0.003 seconds)
OOM killer disabled.
Freezing remaining freezable tasks
Freezing remaining freezable tasks completed (elapsed 0.002 seconds)
printk: Suspending console(s) (use no_console_suspend to debug)
atkbd serio0: Disabling IRQ1 wakeup source to avoid platform firmware bug <-- this is the Framework workaround
pcieport 0000:00:08.3: quirk: disabling D3cold for suspend
ACPI: EC: interrupt blocked
ACPI: EC: interrupt unblocked
OOM killer enabled.
Restarting tasks ...
done.
random: crng reseeded on system resumption
PM: suspend exit