Wake up From Suspend…Tricky

Which Linux distro are you using? Debian

Which release version? 12

Which kernel are you using? 6.1.0-23-amd64

Which BIOS version are you using? 03.05

Which Framework Laptop 16 model are you using? (AMD Ryzen™ 7040 Series) Framework 13 AMD Ryzen 7640U

64GiB RAM
2 TB SSD.

Suspend to RAM and hibernate to (encrypted) swap both work on my new computer!

But waking from suspend is hard to do. The power button and keyboard backlight both light, but the screen stays dark for a long time. If I hold the power button for a few seconds it seems to wake it, or maybe just waiting a few seconds is the trick.

Update: It takes a bit over a half-minute from when I wake it to when I puts up a password dialog.

Suggestions?

Thanks,

-kb

1 Like

Even if I boot from an Ubuntu “CD” and run in live mode I get the same ~34-second delay in waking up.

What kind wakeup times do others have?

Thanks,

-kb

You are not alone. My Laptop 16, also with a Ryzen 7040-series CPU, takes about a full minute to resume from suspend. I assume there’s a bug in the Linux kernel that will get fixed eventually. Until then, I use only hibernate.

I suspect the reason that my resume time is about double yours is that I have two NVMe drives, whereas your Laptop 13 has only one.

Ouch.

Hibernate also takes a long time (with a lot of RAM, makes sense), but not that long.

The problem with hibernation is my encryption passphrase is long and annoying to type. But I have rebooted so much recently that I am getting good at it.

Thanks,

-kb

NB: An encryption passphrase needs to be a lot stronger than a login password. Where login passwords are naturally rate-limited (always, to some degree or another), encryption passphrases can be tried as fast as one wants to spend money.

I’m actually having a similar issue with my 13 inch amd framework but I’m using windows. If my machine goes into hibernate, which it sometimes does overnight and if unplugged, the screen will stay dark and not turn on. The power button and keyboards lights up though.

I’ve waited several minutes but nothing happens. I usually have to hold down the power button and it will then finish turning on. All the windows and apps are still there and open too.

I guess you should atleas update to 6.8/6.10 kernel.

Also if you havent manually updated the amd firmware you should. Debian doesnt really keep up with the firmware packages.

Then you can also search the dorum for the s2idle script by Mario and see of it gives you any errors

@inffy: What do you mean by “AMD firmware”? Do you mean the CPU microcode? Or is there some other updatable firmware for the mainboard that is neither the microcode nor the BIOS/UEFI?

And do you mean this s2idle script, or is there another one?

I think its a linux-firmware package, which in debian usually is not that up to date. Not sure if it has that specific name in debian.

That is the script yeah

Yesterday I built myself a 6.10.7 kernel .deb, (there was a slow gzip-ing that pegged one CPU for a long while, but even still, it was very snappy). This morning I installed it and rebooted and…everything seems the same.


amd_s2idle.py shows me this:

kentborg@theseion:~/Downloads$ ./amd_s2idle.py 
Location of log file (default s2idle_report-2024-08-30.txt)? ~
Debugging script for s2idle on AMD systems
💻 Framework Laptop 13 (AMD Ryzen 7040Series) (Laptop) running BIOS 3.5 (03.05) released 03/29/2024 and EC unknown
🐧 Debian GNU/Linux 12 (bookworm)
🐧 Kernel 6.10.7
🔋 Battery BAT1 (NVT Framewo) is operating at 96.92% of design
Checking prerequisites for s2idle
✅ Logs are provided via systemd
✅ AMD Ryzen 5 7640U w/ Radeon 760M Graphics (family 19 model 74)
✅ SMT enabled
✅ LPS0 _DSM enabled
✅ HSMP driver `amd_hsmp` not detected (blocked: False)
✅ PMC driver `amd_pmc` loaded (Program 0 Firmware 76.82.0)
✅ USB4 driver `thunderbolt` bound to 0000:c3:00.5
✅ USB4 driver `thunderbolt` bound to 0000:c3:00.6
✅ GPU driver `amdgpu` bound to 0000:c1:00.0
✅ System is configured for s2idle
❌ NVME Sandisk Corp WD Black SN850X NVMe SSD is not configured for s2idle in BIOS
✅ GPIO driver `pinctrl_amd` available
🚦 Device firmware checks unavailable without fwupd gobject introspection
🚦 MSR checks unavailable
👀 Suspend must be initiated by root user
Your system does not meet s2idle prerequisites!
Explanations for your system
🚦 Sandisk Corp WD Black SN850X NVMe SSD missing ACPI attributes
	An NVME device was found, but it doesn't specify the StorageD3Enable
	attribute in the device specific data (_DSD).
	This is a BIOS bug, but it may be possible to work around in the kernel.

For more information on this failure see:
	https://bugzilla.kernel.org/show_bug.cgi?id=216440

A couple notes:

  • Suspend as non-root works, so does root, but both slow to wake up.
  • I don’t see any idle-looking settings in the BIOS for my SSD.
  • Looking in syslog I don’t see any timeouts like those mentioned in the referenced bug.

Let me look at firmware. I currently have the package “firmware-linux-free”, I just installed firmware-linux-nonfree, I haven’t done a reboot yet. I am not optimistic. I could try dopping in some newer firmware file…given a hint as to what file I might need newer of.

Thanks for the help so far!

-kb

Attach the script report somewhere like a gist or pastebin. There is definitely a problem reported there and we need to see why it’s happened.

1 Like

If I was to GUESS before seeing the report you’ve put something in your kernel command line that broke things.

1 Like

Well…as part of trying to make battery life better, on some suggestion I added to the kernel command line: amd_pstate=passive. It didn’t seem to help.

Here is the report with amd_pstate=passive: https://www.borg.org/s2idle_report-2024-08-30.txt

And here it is without: https://www.borg.org/s2idle_report-2024-08-30-original-command-line.txt

(I am also having problem with power consumption. Unplug the power supply and the “Power Statistics” GUI will tell me I am using around 3.8 w, for 10-hours of life. But if I just sit there watching it, after the better part of a minute it will jump up to, say 7 w, and the projected life fall appropriately. With that gone from the command line…I get something similar, maybe a bit worse. But that’s another issue.)

Something else I have tried: Manually copy in AMD firmware files from a Debian 13 (testing) .deb. I don’t see that that helped any, either. I expect to undo that soon…

Thanks,

-kb

2024-08-30 15:25:14,126 ERROR: :x: GPU firmware missing
2024-08-30 15:25:14,519 DEBUG: amdgpu 0000:c1:00.0: Direct firmware load for amdgpu/gc_11_0_1_mes_2.bin failed with error -2

You don’t have all the firmware installed. This is a common problem in Debian. You need to install the firmware for things to work correctly.

Please go install a whole new snapshot, not just the missing binaries.

I don’t understand what you mean by “install a whole new snapshot”.

I installed Debian 12, it figured out that this is an AMD machine, and it installed firmware-amd-graphics.

(Do you mean install all of Debian again? What would I do differently this time?)

-kb

That package is out of date and it causes major issues on Phoenix systems. I’ve asked and dozens of other people have asked. Debian isn’t updating it in stable for whatever reason.

I already grabbed some AMD firmware from a testing .deb, let me try the same with the .deb for firmware-amd-graphics.

-kb

So that had a lot of, well, interactions with other stuff. Looked like it was sharing directories with other packages, so I tried having apt do it for me. I added Trixie/testing/Debian 13 to the apt sources, and let it install it!

But shortly after I did that my keyboard died. Rebooting didn’t help. Luckily and external USB keyboard would still work, so I used that to put things back to the way they were.

-kb

All you need is the amdgpu binaries, you don’t need anything else.

You can get it from upstream.

1 Like

Dumb question time: Where do I put them? This machine has more than one firmware directory.

—ACTUALLY, I think there is only one amdgpu directory. I’ll that there.

Thanks,

-kb

Wake is still slow. (And power consumption on battery still high…)

New https://www.borg.org/s2idle_report-2024-08-31.txt

Thanks,

-kb