Framework 13" AMD return from sleep causes reboot

Hi,

I started recently noticing an odd behaviour that was not there originally. So this might be a linux firmware or kernel upgrade, or not, that causes this and I have tried older kernels as well, but the problem persists as follows:

  • 13" Framework, AMD Ryzen™ 5 7640U - 2.8k Display
  • Fedora 41, 6.x kernel
  • When ever the laptop enters sleep (I guess s2idle, but am not sure) recovery from the state causes black screen and immediate restart of the system
    • closing lid and leaving it for several minutes before waking it up again
    • pressing power button to enter sleep and then waking up again
    • just closing the lid and immediately opening it again does not cause the crash

Any ideas how to debug further and/or some magic I could try to place on initrd so that laptop retains work when returning to it.

1 Like

The ‘x’ being what? It could be anywhere from 8 to 13.

There have been a number of updates to the core, some of which have been for issues like yours. But we don’t know as you haven’t provided the critical digits.

The ‘x’ being what? It could be anywhere from 8 to 13.

You are correct. Since I have not been methodological so far on gathering evidence I have not kept track of which kernel versions I have gone through so far.

But currently installed ones are:

kernel-core-6.12.10-200.fc41.x86_64
kernel-core-6.12.11-200.fc41.x86_64
kernel-core-6.12.13-200.fc41.x86_64

and all of these seem to have this problem.

Needs more testing, but would appear that “mem_sleep_default=deep” in kernel commandline during boot fixes the issue by bypassing s2idle.

Nah, unfortunately it seems that the last nights wakeup was a fluke. This morning after the device has been plugged into the charger and I came to wake it up it showed the black screen for few seconds and then started from scratch again :frowning:

Seems to be a widespread issue:

Mine also crashes while sleeping on Windows 11.

Seems to be a widespread issue:

Unfortunately so it seems. Today Ive done some additional sleuthing around this forum and found several chains that would indicate identical behavior or suggest similar underlying issue.

The funkiest of the chains is one where several people say that the problems went away by moving the HDMI adaptor to different slot. So I did that now just for the excrement and giggles; lets see if it has any effect.

That would certainly be interesting… I have read/heard the HDMI port does not work in the 2nd slot on the left (closest to the user). That is actually where mine is located at the moment. I’ll try swapping and see what happens.

Small dataset so far (one nights worth of sleep), but this morning I was welcomed by the login prompt and not a black screen and a reboot.

Lets see how things progress over couple of days. If this is the fix its hilarious. :smiley:

I did see the Framework logo, but it may have just been in a deeper sleep state because everything is still open this morning :+1: So far so good.

Oh man this is funny. Two days, several sleep/powerup sequences in different configurations: charging/not charging/various times of sleep … and no crashes.

So I am starting to lean towards the fact that the placement of the HDMI module is indeed important aspect in systems overall stability. TIL

I have been working on a “Freeze then Reboot” FTR problem and we have made progress regarding the cause of the reboot.

If you wish to help to see if this “sleep causes reboot” is similar, please try the kernel patch described in that issue.
I.e.
https://marc.info/?l=linux-i2c&m=168089982408414

And see what the resulting S5_RESET_STATUS is.

Thanks I will do that if the laptop still misbehaves, but for me at least moving the HDMI adapter to different slot actually seems to have fixed the issue. No more crashes and reboots when returning from sleep state.

I hope you @PH_Tribe also have seen the same improvement in your laptops behavior after changing the slots.

So far mine has been fine too :raised_hands:

I’m glad it’s not just me, I also had a thread going about this: Spontaneous and ungraceful restarts upon closing the lid

Since Arch Linux LTS updated to 6.12 last week, I have been seeing this issue too. Also see it with zen and stable.

What slot are y’all running the HDMI card in? Mine has been in the front right slot (USB 3.2/DP). Considering swapping my rear right USB-C with it and see if that helps, but I’m really not hopeful.

If I can find the time, I would love to try James’ patch.

Seems like the HDMI module has nothing to do with it. After yanking my HDMI module entirely and doing two (2) sleep/wake cycles in two hours, I have reproduced the issue. I brought my machine out of suspend, and unlocked it. Screen went black, then came the framework logo.

I have to disagree with you there as to me I could reproduce the sleep/restart issue like clockwork previously. Now, with the HDMI adapter moved to different slot I am not seeing that behavior anymore - my issue is fixed.

This however does not mean that there potentially could be several bugs present in hardware, firmware or Linux kernel that are causing issue with same symptoms, but with different cause.

Fair enough. I get it sporadically, but at least once a day under normal use, often more. What slot do you have the HDMI module in?

Do we agree that the problem was absent on LTS 6.6, but when LTS went to 6.12, it began? The funny thing about that, is that I was running the stable 6.12 kernel for a while back in ~December without issue.

Edit: Just managed to get the reset again after yanking all my modules. I was running on battery power. It seems like I can pretty reliably (>50% of the time?) reproduce this when I

  • Boot up
  • Log in
  • Go to s2idle
  • Wake up from s2idle
  • Unlock
  • Open Firefox

I am not sure if being plugged in matters or not yet.

I had it in the left hand side lower slot, I moved it on the right hand side lower slot. Lower slot in this case meaning the one closer to the front of the machine and not the hinge.

Still no more issues after doing that. Which is awesome, but also weird.

I haven’t been daily driving my Framework since this issue started (because I can’t trust it not to reboot randomly when I pull it out of my backpack >:/ ) but I noticed some amd-flavored notes in the patchnotes of kernel 6.13.4, so let’s see if that does anything.

https://lwn.net/Articles/1011264/

If it was a kernel that allegedly broke it, maybe it’ll fix it, too.