AM5 Linux triggering suspected firmware bug with S3 sleep

Hello,

I’ve recently upgraded my computer. And I’m having some really weird issues.
Specs:

  • AMD 9800X3D
  • MSI x870e Tomahawk
  • 32 GB G.SKILL memory
  • Nvidia 2070 Super (yet to be upgraded)

To preface this, these specs are not the ones I’ve started with. I’ll try to make it easier to understand, but this will be weird. Motherboard, ram and cpu have all been replaced at least once (or 5 times) hopefully eliminating a hardware issue.

At first i got a x870 Tomahawk with some Kingston memory (QVL validated), however I’ve had some weird issues. Once in a while when restarting, the motherboard took a lot longer to POST and then said something along the way “memory has changed, enter setup”.
Upon entering setup, I’ve noticed one of my sticks reads as “Unknown 2GB” instead of Kingston 16GB. Even after booting into Windows, everything reports lower memory capacity. Reading the memory SPD has the values scrambled, no manufacturer nor EXPO timings, 2GB capacity and a wrong serial number.
The state persists reboots, but full system shutdown clears the issue. Seemingly no permanent damage happens.

Over time, I’ve figured out a scenario. The steps are:
1 - Sleep computer and wake it up
2 - Sleep it again, and wake it up (more sleeps seem to increase the chance of it happening, though 2 make it almost certain)
3 - Reboot the computer

Trying to troubleshoot it, I’ve exchanged every single component for the same exact one. It still happened. I decided to try other motherboard manufacturers, Asrock does it too, Gigabyte doesn’t (but i didn’t like their pcie lane allocation).
After weeks, MSI support came back to me and claimed to have reproduced it, blaming it on Kingston.

This lead me to trying with Corsaid and G.SKILL memory. Both of these have a completely different issue though. The “Unknown” state doesn’t happen, but when rebooting, the computer gets locked up on POST code 44 and fails to initialize the memory. As before though, fully powering the computer off fixes the bad state with seemingly no lasting effects.

As far as I can tell, there is something with Linux triggering some obscure firmware bug. I have failed to reproduce this when using Windows. As far as I can tell, Windows is also using S3 sleep and not S0.

To ensure the latest kernel version, I’m testing mainly on my Arch linux install, however I have tested it with a completely fresh install of Fedora 41 and Ubuntu 25.04 and it still happens. This should eliminate any wrong configs on my side. It also doesn’t matter if EXPO is enabled or not. BIOS version is also kept up to date, but different versions make no difference in the behavior.

I have opened tickets with the relevant parties (motherboard manufacturers and AMD), but i’m getting the classic support runaround, so I decided to post this here in case some linux wizard sees this and has any idea of what might be causing this. My main wonder is what could the difference be between Windows and Linux, since ACPI and entering/leaving sleep states should be fairly uniform.

Thank you for any replies or ideas.

1 Like

Welcome to Level1Techs!

:+1:

:+1:

:+1:

All in all reasonable hw troubleshooting steps. Good job.
All I can think of that you could try, but haven’t mentioned is

  • reseating CPU (after all the CPU pins connect to RAM)
  • reseating RAM (although this should be taken care of by using different sticks)

This leads me to believe that this is some weird driver issue. Windows drivers often do some weird wake-up things that Linux drivers don’t.

Following this train of thought I would try removing any non-essential piece of hw from the config:

  • USB connected items (e.g. use most basic mouse/keyboard)
  • PCIe connected items (e.g. remove GPU, iGPU should be fine for troubleshooting)
  • m.2/SATA (remove any unnessary storage device. Even try using different root drive)

Why this when the error message indicates RAM error? Well, any driver needs to access RAM when waking up from S3. Maybe that’s triggering the error…

I had several hw configs where I could not get S3 to work reliably on Linux, my current one does. I have no idea what the difference is.

Good luck!

1 Like

Hello! Thank you for your reply.
I haven’t talked too much in detail to not make the original post too long, but I can quickly cover most of your points.

I’m on my second CPU, fifth or sixth motherboard (different chipsets and manufacturers) and perhaps fourth or fifth kit of ram (also different manufacturers, always QVL to the motherboard i had at the moment)

This mostly covers all reseats, but since I have open ticket with MSI, they have also requested independent reseats and cleanings of the CPU and RAM contact pads (done with 99% IPA)

Some of the tests have been done with all of my personal drives removed, without ethernet, using the simplest keyboard/mouse i got - cheap RF wireless single dongle for both.

One thing I haven’t tried is using the iGPU, as you mentioned, it should suffice for troubleshooting and I will be trying that, however my hopes aren’t too high.

The odd thing in this issue is, S3 works great. Sleep/wake is fast, everything restores correctly, as far as I can tell, this error state does not affect the runtime of the system at all. However something in the BIOS/AGESA has gotten itself into some odd state, that prevents the memory being intialized a second time after a reboot. (code 44 is not listed in the manual, however google search nets that it’s memory initialization related code)

Powering the computer off and then back on resets this state and memory can be initialized again.

In terms of the Unknown issue, the thing that was getting messed up was the SPD. It was reporting nonsense data, despite the memory being write protected according to Kingston. So either the memory wasn’t fully write protected, or whatever in BIOS reads it, reads it incorrectly. So if something in the new memory is reading the SPD even more wrong, it could be causing the memory to completely fail to initialize. However I have no clue what. And if the SPD really wasn’t write protected, I feel like the corruption would be permanent, instead of lasting only until a power off.

Thanks for sharing all the things you’ve done.

Oof. That’s a lot of change. Sorry to hear about your ordeal.

There is some silver lining in this, though: with all the changes and the issue still being reproducable it’s time to ask “what are the last things constant during all of this?”

  • PSU?
  • Socket (AM5)?
  • ???

I doubt your issue is specific to AM5 socket - I believe we’d have heard a lot about it since inception.

PSU is my current favorite.

Any other ideas?

Yeah… Been dealing with this for around month and a half now.

The PSU is definitely a constant, it’s the Seasonic Focus GX-850 ATX 3. It should be a solid PSU and usually I wouldn’t even consider it. Other than that there’s pretty much nothing else besides the GPU. But I don’t have any other PSU to test with.

MSI has claimed to have reproduced the Unknown issue before blaming it on Kingston, but experience with their support has been… an experience. Where i’m seemingly getting pinged between different agents who fail to read the ticket more than 3 replies down. If they really reproduced it, it would prove the Unknown bug isn’t a “me” problem, the question is, if the Code 44 bug is an extension of the same bug.

That’s one of the things I find the most confusing about it. There seem to be a lot of memory related issue in general on the AM5 platform with current CPUs and chipsets, but despite searching, I have failed to find anyone with even a similar problem. I did find one person with “Unknown” showing for the RAM manufacturer, but no one with it also reporting 2GB.

That was in part also a reason for this post. To find anyone with similar specs (9800X3D, x870e motherboard ideally from MSI/Asrock and Kingston/Corsair/G.SKILL memory) and see if they might try it and reproduce it or not.

If i had any, I wouldn’t be posting here. :frowning:

I don’t remember the thread, but we documented on this forum that a recent platform (latest Threadripper?) increased demands on capacity of the 5V rail of PSUs, which apparently many, even reputable, PSUs didn’t fullfill.

Waking up from sleep puts a strain on PSU - for all the changes you went through I’d consider this the last one.

This is not a dialog between two people. Hoping to get other readers to bring in new ideas. I understand your position.

1 Like

Probably not relevant.

Are you sure about that? Classic legacy S3 is often no longer supported at hardware level. Its way too common at laptops and might have been axed even here.

Only way to check I know of is powercfg /availablesleepstates in windows.
Sometimes there is switch in bios, but lot of oems do not bother giving the option anymore.

Second thing to check at least on windows is effect of fast startup , it might complicate troubleshooting by preserving kernel state across reboots.

Sometimes it triggers weird bugs.

EDIT:
S3 supported on my gigabyte b650 + 7950x3d system.

1 Like

This is certainly one of the things I’m least knowledgable about. As you say, there is modern standby that is replacing classic S3 in laptops, but i don’t know about it happening on desktop platforms.

My assumption regarding sleep state was exactly because of the command you mention.

$ powercfg /A
The following sleep states are available on this system:
    Standby (S3)
    Hibernate

The following sleep states are not available on this system:
    Standby (S1)
        The system firmware does not support this standby state.

    Standby (S2)
        The system firmware does not support this standby state.

    Standby (S0 Low Power Idle)
        The system firmware does not support this standby state.

    Hybrid Sleep
        The hypervisor does not support this standby state.

    Fast Startup
        This action is disabled in the current system policy.

Another relevant part from within linux:

$ cat /sys/power/mem_sleep
s2idle [deep]

Sleep mode deep is selected as the active one, which should be mapped to the classic ACPI S3.

But as mentioned, this is a subject i’m very fresh looking into. If I’m making any wrong assumptions, i would be glad to have them corrected.

I have fast startup disabled, mainly because it causes issues, prevents write-mounting NTFS from linux and messes up Wake on LAN. Also as far as i know, fast startup only concerns powering off the computer and reboots actually fully reboot the kernel.

I have the EXACT same issue as you,

My specs are:

MSI x870e edge TI wifi - latest bios as of 19/02/26
9800x3d
32gb cl30 corsair vengeance 6000mhz ((XMP))
9070xt
rm1000x PSU

im running Omarchy linux, with sleep enabled.

like yourself - sleep is functioning perfectly fine and does not affect the system until after a reboot from the OS.

when my system reboots, it takes noticeably longer to POST then i will get a message saying components changed or CMOS cleared. if i go straight into setup after this my RAM SPD information will be missing or corrupt - manufacturer details etc, XMP profile missing and the amount of ram is a lottery, could be 2gb, could be 16gb, could be 24gb.

I have tried reseating everything, nothing seems to change it, it is 100% a software bug. im surprised more people havent come across this and the lack of forum posts about it.

I had tried disabling memory context restore so that memory would retrain on every boot, ive suffered through an extra 20 seconds each boot but still this occurs. the system still boots and works perfectly fine, but linux only sees the reduced amount (im currently writing this post on my system which is registering only 16gb of ram, with 32gb installed)

Quick workaround:

  • If using a linux distribution, pass the efi=noruntime kernel boot parameter. This will instruct the Linux kernel to stop talking to UEFI. This may disable some UEFI related features and/or break Secure Boot environments, but since your bootloader is handling secure boot anyway, this is probably fine. you just can’t access things UEFI.
    NOTE: if using systemd-boot as a boot loader, it is highly advised to run sudo bootctl install every time systemd updates on your system.. You don’t need to do this if you remove the efi=noruntime parameter.

What are you doing now? are you still using the same system?

Just an update to this -

Things i’ve tried that have failed to help the situation:

Adding these kernel parameters to limine:

  • efi=noruntime - Disabled EFI runtime services, issue persisted
  • acpi_osi="Windows 2022" - No improvement NOTE - since this flag should simulate a windows OS to the BIOS and the S3 state at this point is being initiated the exact same way windows would, does this mean that the corruption is happening during the waking stage? food for thought.
  • acpi_sleep=nonvs - Still corrupted
  • acpi_sleep=s3_bios - Made worse (black screen on wake, hard reset required)

Bios settings tested:

  • Memory Context Restore: Disabled - no improvement

  • Allow wake with USB devices: Both enabled/disabled - No improvement

  • Multiple BIOS versions: All pre-AGESA 1.3.0.0 tested - Issue persists across all

  • flashed oldest BIOS i could find using USB BIOS flash method (not m-flash) - same behaviour

  • flashed newest BIOS using USB flash method (not M-flash) - same behaviour

  • Enabled all USB controllers/devices for wake via /proc/acpi/wakeup

  • Tested all combinations with BIOS USB wake settings

  • Noted: Linux CAN wake via USB even when BIOS setting disabled (Windows cannot) this lead me to think that linux may be fighting with the BIOS to control sleep states and wake events, so i tried changing Wake/Sleep Handled By: in the bios from BIOS → OS but to no avail

  • Extracted full ACPI tables (DSDT + all SSDT files)

  • Analyzed _PTS/_WAK/MPTS/MWAK/SPTS/GPTS/NPTS methods

  • Traced OSVR (OS version) variable usage

  • Result: Only OSVR difference is HPET timer behavior - no OS-specific memory/sleep code found

Both Windows and Linux are going into an S3 state, yet windows has absolutely no issues, i cannot get memory controller to fail when sleeping multiple times then reboot on windows. Seems to be a linux specific issue.

Workaround for now is to disable suspend/sleep in linux.

Holy… I actually lost hope of anyone else commenting on this post.

As you say, I’m very surprised no one seems to having these issues - probably the combination of how many run linux on this fairly “modern” platform and actually using sleep. That and the amount of people willing to go this deep on an issue is probably low.

I agree it’s 100% a software bug - I’ve basically “ship of theseus’d” my entire computer a few times, buying and returning different motherboards, cpus, ram and so on. No clue why it’s not happening on Windows, but I haven’t been able to get it to exhibit the issue either.

One strange thing is - you seem to have the “corrupted SPD” with Corsair memory. This is the issue I’ve had with Kingston.
Corsair and G.SKILL seem to fail in a completely different way for me - as mentioned above 2 sleeps + reboot locks me to POST code 44 and the computer never boots until a hard reboot. Gonna guess different controller chips.

As what I’m doing these days… Yeah, the only workaround is just to not sleep the system. To have at least similar behavior to sleep, I chose to use hibernation and angrily accept the extra wear on my system drive.

Yeah agreed, also i think a lot less people are figuring issues out publicly on forums and instead just chatting privated with an LLM :frowning:

is it still the same PC as you started off with :wink:

i’m going to keep digging motivated by shear hatred for Microslop - if i come across anything i will post it here. i have a feeling MSI and AMD are working on this as in the last 4 months there has been like 5 different BIOS updates for my board. hopefully it will be fixed along with AGESA 1.3

Ok, I think ive found a fix - i dont want to speak too soon here as its very anecdotal but previously i was able to recreate this issue every single time by sleeping 3 times then rebooting, ive now tested this multiple times with up to 6 sleeps and a reboot and the issue seems to have stopped.

can you try adding this kernel boot parameter and let me know if its fixed for you?

usbcore.autosuspend=-1

here is my full limine config:

/+Omarchy
### This OS entry is auto-generated by limine-entry-tool
comment: Omarchy
comment: machine-id=redacted order-priority=50
  //linux
  ### This kernel entry is auto-generated by limine-entry-tool
  comment: Kernel version: 6.18.7-arch1-1
  comment: kernel-id=linux
  protocol: efi
  path: boot():/EFI/Linux/omarchy_linux.efi#0f703c389fac437d328f80eba38a1e8c7b2fc4e1d0178b9eecc21af5f657c0b4bfaba72d5beac0e696cf4384b2edd9475e10935eb6c401eadd7cca693c2a37a9
  cmdline: usbcore.autosuspend=-1 quiet splash cryptdevice=PARTUUID=9769317f-6883-4eeb-a1bf-77b484564b8d:root root=/dev/mapper/root zswap.enabled=0 rootflags=subvol=@ rw rootfstype=btrfs

for anyone running omarchy/limine:

add: KERNEL_CMDLINE+="usbcore.autosuspend=-1" to /etc/default/limine

then run sudo limine-mkinitcpio

if this doesnt work, try changing the bios setting Wake up event by: from BIOS to OS and test again

1 Like

Sure, actually since moving over to just hibernating, I haven’t attempted to sleep the system anyways (also somewhat driven by dealing with other, unrelated nvidia gpu issues)

Re: AMD/MSI, I did open tickets with both:

  • MSI is long closed, based on the grammatical errors I was dealing with a person, however it clearly wasn’t a priority to them once they heard other motherboard brands also exhibit the issue.
    They HAVE reproduced the SPD corruption with Kingston, but they haven’t reproduced code 44 I’m dealing with.
  • AMD claimed to have escalated it to engineering, however the email replies sounded a bit AI-like and they kept asking the same questions I answered earlier in the email chain. I haven’t heard from them since.

So not really sure if they’re “actively working on it”, but that might be my pessimism after months of no replies.

When i get home later today, I’ll try both if it actually still happens and your kernel param.

Finally had time to sit down and play peek-a-boo with my computer.

In the past months I haven’t tried sleeping my computer at all, during that time I’ve updated the BIOS a few times.

I’m currently sitting at latest available 7E59v2AA0 with AGESA PI pre-1.3.0.0.

I’ve tried maybe 15 times to sleep 2 times and then reboot. Last ditch effort was to sleep 10 times in a row and then reboot.
None of the attempts managed to reproduce the issue even before setting your kernel parameter (it’s currently sitting at default of 2)

I’m not confident enough to claim my issue has been fixed, because the reproduction scenarion has always been fickle, however I usually managed to reproduce it in one attempt, at most 2.

For the upcoming days, I will start putting my pc to sleep instead of hibernating and occasionally rebooting - will see if I manage to reproduce it or not.

What is the success/failure rate of your reproduction attempts?

Before adding that kernel parameter I could reproduce it every time, now it has stopped completely, usually I would notice it as I always let it sleep just out of habit, then i would reboot after a few days of uptime. Maybe you’re on a newer bios/kernel version than me?

Given how many kernel upgrades I’ve went through, I’m not too hopeful one would suddenly fix it.

I’m currently running 6.18.9-arch1-2.

If the issue is actually fixed and won’t suddenly happen again after a few days of sleeping the system, the possibility opens that they’re actually 2 or more different issues.

You’ve mentioned the SPD corruption to be fairly random - different amounts of RAM, etc. When it happened to me, I feel like it always corrupted predictably - same wrong manufacturer string and 2 GB capacity per stick. Sometimes one stick corrupted, rarely both, but always the same corruption.

That combined with the fact, the SPD corruption was fixed for me when i stopped using Kingston memory. Since I now get POST code 44 and freeze, I can theorize what is happening (is something critical corrupting in the SPD? or something else), but I can’t verify anything, since whatever happened prevents the computer from booting.

Are you using any RGB software controller ?

These often use the SPI bus and some have been known to corrupt DRAM SPD registers (Google for “spd corruption rgb controller” and you’ll find plenty of articles about it)…

Thanks for your tip, however at least in my case, I’ve tried multiple software “clean slates”. In my case the issue appeared despite:

  1. Replacing every single hardware component one by one (sometimes same piece, sometimes different)
  2. Running fresh Arch, Ubuntu, Fedora

Doing this at least for me eliminated everything that wasn’t Linux Kernel, Agesa, some other firmware.

Interesting to hear just how easy it is to corrupt the SPD though…

Replacing every single hardware component one by one (sometimes same piece, sometimes different)

But always the same mobo model, right ?… In case the SPD corruption doesn’t come from software, that would be the #1 suspect for me.

Doing this at least for me eliminated everything that wasn’t Linux Kernel, Agesa, some other firmware.

Interesting to hear just how easy it is to corrupt the SPD though…

If (and only if) you also dual-boot under Windows, there’s also the possibility that some MSI-specific driver package gets automatically installed via the UEFI software injection that vendors use and abuse to “ease” the Windows installation process and impose their sh*tty software dashboard on the user: not sure about MSI, but for ASUS it’s called “Armoury Crate”, and there’s a setting in the BIOS (that systematically defaults to Enabled after a BIOS update) to disable it (see ASUS Z390 Motherboards Automatically Push Software into Your Windows Installation | TechPowerUp ). Such vendor-specific dashboard is also used to control the RGB on the motherboard, and could equally corrupt the SPD registers on your RAM sticks…

As for the Linux kernel being the culprit, this is highly improbable; it would come down to some patch used by all the distro vendors you tried… Did you try to compile your own, vanilla kernel ?

I own two AM5 PCs with two different mobos (ASUS and Gigabyte, one with Corsair modules, the other with Kingston Furry modules), and I’m always running my own, self-compiled kernels on them (always the latest release kernel too), and I never encountered any such issue…