Edit for anybody who finds this post later: It was an Ubuntu specific issue. Swapping it for Fedora has allowed sleep to work perfectly. I suspect the Ubuntu kernels have an issue with certain motherboards.

So this is a problem I’ve had for a while, but I’ve finally decided I’m sick of it enough to see if anybody has any ideas.

Basically, I replaced my PCs motherboard and PSU to make them fit into a mini itx case so I’d have more space.

Ever since then, I’ve had an issue where putting my PC to sleep causes it to appear to sleep properly for a split second, all the lights and fans turning off. But then immediately after that, the lights and fans come back on as if it were trying to wake from sleep, except it just gets stuck like that, with no video output to the monitor, no audio output to the speakers, and unresponsive to any button presses. Even pressing and holding the power button does nothing.

I can restore it from this state by shutting off my power supply then immediately turning it back on. This results in the computer acting like I woke it up from sleep completely normally. Even the logs show no errors, saying that it went to sleep properly and that it woke up properly when I flicked the switch.

Weirdly, I had no issues having it sleep on Windows initially, displaying the expected behavior of all the fans and lights turning off and staying off, and coming back to life with video and audio when I tap the power button. This behavior started the first time I tried to put it to sleep in Ubuntu, where it did what I explained above. Since then, not even Windows will sleep properly anymore.

This behavior seems to exclusively happen when using suspend to ram. Hibernation works fine on Windows and Linux, as well as standby. As a result, I’ve been using those as a workaround.

My setup is the following:
Motherboard: Gigabyte a520i AC
PSU: Cooler Master v850 SFX
GPU: Radeon RX5700 XT (can’t remember the exact brand)
CPU: Ryzen 5 3500
RAM: 16 gigabytes. Corsair Vengeance sounds like the right one, but I don’t entirely remember.

Not sure if it’s important, but I’m also running an Samsung 970 Evo Plus NVME, a Samsung 860 Evo 2.5 inch SSD, some kind of western digital HDD, a Viotek monitor, and a wireless Logitech mouse and keyboard (which aren’t Bluetooth, they use receivers.) I’ve tested without the mouse and keyboard just in case though and the same behavior was exhibited.

Any help is appreciated. Even if nobody knows what’s going on, being a few steps closer to finally solving this would be nice. I’m posting this right before bed though, so I may not see any replies until tomorrow unless I end up too hyper focused on this to sleep.

EDIT: Issue was fixed on Windows by running “powercfg/a” to check sleep states, which shouldn’t have worked, so I think the windows issue was just a fluke since it didn’t start until Ubuntu started doing it.
Ubuntu’s still broken though. Nothing I do fixes it and I suspect there’s an incompatibility between it and my motherboard. Probably need to wait for a new kernel update that happens to fix it.

  • remotelove@lemmy.ca
    link
    fedilink
    arrow-up
    7
    ·
    edit-2
    10 months ago

    If you haven’t done your BIOS updates, you probably should.

    I Googled a little and there are some notes about needing to disable the ~~S5 and/or ~~ S3 sleep states in the BIOS as well. I already click away from the forum I saw that in, but it seems others were having similar issues in Linux as well.

    My initial impression is that the issue is pointed directly at the motherboard as the problem is similar between two different operating systems. The GPU would be next in line to check as it may not like the way the motherboard is trying to sleep. I am fairly sure there are sleep state flags for NVIDIA drivers, so it’s fair to assume that AMD would have something similar as well.

    Unless there are major compatibility issues between the other components, it fairly safe to say that those shouldn’t be causing problems. I mean, it’s still possible but it’s something to check last. (I believe your NVME might also have some type of sleep/idle state as well so we can’t completely discount anything else. I have 3 EVO 990’s and I seem to remember there being power savings/sleep settings for them. I could be wrong.)

    Edit: S5 is the powered off state. Lulz. Try disabling that!

    • SombyrOP
      link
      fedilink
      arrow-up
      3
      ·
      10 months ago

      I’ve been updating the bios every time a new version comes out hoping it fixes the issue, but unfortunately no luck so far. I also can’t find any options related to sleep states in my bios besides some energy saving settings that I’ve already tested and don’t fix the issue.

      As far as checking the sleep states of the GPU and potentially the NVME, I don’t know how to do that. I could see though that it’s possible the GPU and motherboard are trying to sleep in different ways.

      Oddly though, the one example I’ve found of the same issue occurring to other people was that it happened on certain AMD thinkpads on older versions of the Linux kernel. My issue seems a bit different though since it applies to windows too.

      • remotelove@lemmy.ca
        link
        fedilink
        arrow-up
        3
        ·
        10 months ago

        Here is the forum where I got the info about the S3 sleep state: https://bbs.archlinux.org/viewtopic.php?id=291345. It talks a little about NVIDIA, but obviously that won’t help you.

        You could also play around with powrcfg in Windows to see if here are errors. That’s all I got as I don’t know how to tinker with APM/ACPI in Linux.

        Quite frankly, when I have had sleep issues in the past, I just disabled it since power management can be extremely problematic in a lot of instances. (This might be related in some way: https://community.amd.com/t5/graphics-cards/graphic-card-prevents-windows-11-sleep-mode/td-p/576586)

        • SombyrOP
          link
          fedilink
          arrow-up
          2
          ·
          10 months ago

          Yeah, I’m suspecting now that some of my hardware just has incompatible sleep states with each other. Since hibernation and such work, it’s possible my motherboard tries to go into it’s sleep state, and gets interrupted by another piece of hardware that doesn’t support that sleep state and the whole thing just panics and dies.

          I’ll look into that tomorrow. I think if that’s the case the only possible solution is to just disable sleep entirely and rely on hibernation if I really need to suspend the system.