Open pfzetto opened 8 months ago
As I have forgotten to ping the maintainers, I hope that these are the correct maintainers for the linux kernel:
Looks like upstream is working on this: https://gitlab.freedesktop.org/drm/amd/-/issues/3208
And it also looks like you could help get it fixed by testing the suggested patch.
Looks like upstream is working on this: https://gitlab.freedesktop.org/drm/amd/-/issues/3208
And it also looks like you could help get it fixed by testing the suggested patch.
Thanks, I'm not sure if this is the same issue (as mine happens every time, even just with hyperland running), but I will try to get that patch running.
Motherboard: MSI B550-A PRO
I think it's this b550 bug with a fix in-thread, I found this issue while trying to solve it this time around, I'd only fixed it on manjaro previously and it solved one of the two sleep issues.
I have a temporary fix for now. You have to disable GPP0 wakeup which is a GPP bridge to the NVMe drive in M.2 slot. Check your wakeup table using cat /proc/acpi/wakeup and look at GPP0. It should say enabled. Using
sudo /bin/sh -c '/bin/echo GPP0 > /proc/acpi/wakeup'
you can set it to disabled. PC should suspend normally then.
so the way to test this is
echo GPP0 > /proc/acpi/wakeup
cat /proc/acpi/wakeup
if not, repeat, with
echo GPP8 > /proc/acpi/wakeup
cat /proc/acpi/wakeup
otherwise you may have to poke I think PXE0, its mentioned in thread I believe.
the way to make this permanent on boot, is
# in _suspend-bugfix.nix
{ pkgs, lib, ...}:
{
systemd.services.bugfixSuspend-GPP0 = {
enable = true;
description = "Fix immediate wakeup or 'zombie suspend crash' on suspend/hibernate";
unitConfig = {
Type = "oneshot";
};
serviceConfig = {
User = "root";
ExecStart = "-${pkgs.bash}/bin/bash -c \"echo GPP0 > /proc/acpi/wakeup\"";
RemainAtExit = "yes";
};
wantedBy = ["multi-user.target"];
};
systemd.services.bugfixSuspend-GPP8 = {
enable = true;
description = "Fix immediate wakeup or 'zombie suspend crash' on suspend/hibernate";
unitConfig = {
Type = "oneshot";
};
serviceConfig = {
User = "root";
ExecStart = "-${pkgs.bash}/bin/bash -c \"echo GPP8 > /proc/acpi/wakeup\"";
RemainAtExit = "yes";
};
wantedBy = ["multi-user.target"];
};
}
If you manually toggled them before, you'll need to make sure they're set to 'disabled' after the first time you run this, otherwise you will have to manually toggle GPP0 and GPP8 one more time if you don't reboot.
I also added
environment.systemPackages = with pkgs; [ zenstates ];
systemd.services.before-sleep = {
description = "_BUGFIX-suspend (Ryzen disable c6 suspend)";
wantedBy = [ "sleep.target" "hibernate.target" ];
before = [ "sleep.target" ];
serviceConfig.Type = "oneshot";
# serviceConfig.ExecStart="${before-sleep}";
serviceConfig.ExecStart="zenstates --c6-disable";
};
for belt-and-suspenders, but GPP0/GPP8 seem to be the issue with my b550 motherboard. (gigabyte b550m d3sh, but it seems like it's a b550 family thing)
I'm very new to nixos and there's probably better ways to do it. This one might toggle itself if you rebuild-switch, I'm going to bed and can't troubleshoot that right now.
for root cause / debugging purposes, you can bring it back from the zombie-suspend by flicking off the power switch on the PSU, playing chicken with volatile storage, and flicking it back on within 2-3 seconds, trying to get the cards to power down before you lose the sleep state in memory. Sometimes it doesn't work -- too soon and it hangs and you can try it again, too late and it just powers off or boots.
edit: its tomorrow, and I figured out (thanks to @toxicfrog's help) how to make it not toggle when you nixos-rebuild --switch
I'll try to write something for nixos-hardware this week if no one beats me to it.
Thanks, I've updated the BIOS to the latest version and tried your fixes. Sadly it didn't help. The PC wakes up and displays the last image, but is completely frozen (even when just using the tty). I think I will just disable hibernation and suspend until I have the time to recompile the kernel with the amdgpu patch.
Describe the bug
Hello, when resuming my PC from suspend, I get a blackscreen or the last content of the screen without anything else (no response to user input, no network, no logs into rsyslog). I came to the conclusion that the kernel might crash on resume and started investigating. First I tried the steps described in https://wiki.ubuntu.com/DebuggingKernelSuspend and https://www.kernel.org/doc/html/latest/power/basic-pm-debugging.html, but couldn't compile the Kernel with
PM_TRACE
. Looking for other options I triedsuspend-to-idle
which produced the same error (blackscreen) and logged to rsyslog.Steps To Reproduce
Steps to reproduce the behavior:
echo freeze > /sys/power/state
Expected behavior
I expect the PC to resume from suspend like nothing happened.
Additional context
Kernel: 6.7.1 Motherboard: MSI B550-A PRO CPU: AMD Ryzen 7 5800X GPU: AMD Radeon RX 6600XT
Notify maintainers
Metadata
Add a :+1: reaction to issues you find important.