hw.acpi.lid_switch_state=S3I helped fix sleep-wake hangs on Linux with AMD GPUs
31–40 of 218 posts
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#32Fantastic news. AMD's linux graphics drivers have mostly worked great for me but this has been the one exception that I've hit multiple times.
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#33Apple became a trillion dollar company by mastering sleeping / waking up of electronic devices. why nobody else sees this?
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#34I have an Nvidia GPU and a sporadic crash (black screen) with no logs on Linux. I suspect it's a driver issue too. Going to try some of these tips to enable the debug shell, but I'm not sure if they'll be effective. Anyone have other tips for this type of thing? I did try upgrading drivers/kernels already
Run a memtest. Graphics cards usually crash badly when given invalid data, which can happen sporadically if you have bad RAM. If memtest shows a specific memory region as failing, swap out sticks to check which it is, and buy a new one. (Or if you're on a tight budget, you can disable that region with kernel boot options.) If memtest gives errors in lots of places, might be a bad overclock. Loosen timings or give it…
I would also recommend running it on one memory slot only (do this one by one).
Recently it happened that even a multi-day memtest run did not catch the defect in one of my ram slots.
But when I emptied it, all the gpu driver problems immediately stopped.
The symptom was a crash followed by garbage on screen and a "zzzz" sound. Sometimes followed by a shutdown.
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#35Since a couple Linux versions something around 6.10 IIRC I've had it where my Nvidia system wakes into a black screen, but with a cursor and alt shells work, specifically KDE Plasma seems bugged here, but they say it's a kernel issue, or at least there are dozens of separate issues open about this kind of bug and it's rather annoying that I can't put my machine to sleep. If anyone has ideas what could fix this I'd re…
$ uname -a
Linux hostname 6.13.1-arch1-1 #1 SMP PREEMPT_DYNAMIC Sun, 02 Feb 2025 01:02:29 +0000 x86_64 GNU/Linux
NVIDIA-SMI 570.86.16
Driver Version: 570.86.16
CUDA Version: 12.8
Instead of powering off the monitor, I've created an alias: alias off='xset dpms force off && await.sh && xset -dpms'
And shell script (press any key to unblank the screen): $ cat ~/bin/await.sh
#!/usr/bin/env bash
xinput test-xi2 --root 2>&1 | \
grep --line-buffered -m 1 'EVENT type 2 (KeyPress)' &> /dev/null
This allows me to run "off", a comromise to put the monitor in low-power mode. This solves the problem of having to kill lightdm, which improves the workflow. Still, sometimes I have to open an alt shell and then press Alt+F7 to return to X. Rarely, I'll have to go to the alt shell/Alt+F7 a second time to suppress sporadic screen glitching.Adding nomodeset to the GRUB configuration was another suggestion:
# grep vmlinuz /boot/grub/grub.cfg | head -1
linux /vmlinuz-linux root=UUID=... rw nomodeset quiet resume=UUID=...
Hope it helps.Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#36This is amazing work! If folks have ever wondered why suspend is so difficult to get working on linux and why debugging it is equally difficult, this is a single datapoint with lots of information about all the things that can go wrong. Even now I have a thinkpad P1G4 where the fans won't turn off automatically unless I turn them off before going into suspend. Recently I also started having crackling issues with my b…
Remarkable that it's 2025 and laptop sleep/suspend still doesn't work right on linux. I think the first time I encountered this was probably 15 years ago now?
Power control is the kind of stuff that benefits from very tight integration, and PCs just don’t have that.
Firmware is seen by most vendors as a pure cost to minimize, so you get a fragmented market full of subcontractors delivering the bare minimum that is considered “working”. Manufacturers also know most people aren’t going to use a big part of the functions they’re supposed to provide to OSes, and no one is really checking them, so it’s very common for devices to have only partial support for things they supposedly do.
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#37For all the years I've been using Linux, I've always had some kind of sleep issues. I've used Intel, AMD, ATI, and NVIDIA hardware across countless distros and setups, yet nothing seems to make a difference, there's always something that doesn’t work properly with sleep or hibernation. Honestly, it's one of the main issues I wish the Linux community would take a closer look at and finally fix!
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#38This is amazing work! If folks have ever wondered why suspend is so difficult to get working on linux and why debugging it is equally difficult, this is a single datapoint with lots of information about all the things that can go wrong. Even now I have a thinkpad P1G4 where the fans won't turn off automatically unless I turn them off before going into suspend. Recently I also started having crackling issues with my b…
Remarkable that it's 2025 and laptop sleep/suspend still doesn't work right on linux. I think the first time I encountered this was probably 15 years ago now?
It also plagues Windows on custom PC builds, even when there are vendor drivers. Not every component plays nicely with suspend states, ASPM, C-sates, load line calibration, etc. And while often the capability exists natively to address issues (in BIOS, Linux, etc), how many people know how to start looking?
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#39Earlier quoted context omitted.
Remarkable that it's 2025 and laptop sleep/suspend still doesn't work right on linux. I think the first time I encountered this was probably 15 years ago now?
This space is problematic enough that you could reliably segfault 2017-2019 Intel MacBooks by closing the lid before unplugging HID peripherals, preventing suspend (and cooking it in your bag on the commute home). It also plagues Windows on custom PC builds, even when there are vendor drivers. Not every component plays nicely with suspend states, ASPM, C-sates, load line calibration, etc. And while often the capabili…
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#40Earlier quoted context omitted.
Remarkable that it's 2025 and laptop sleep/suspend still doesn't work right on linux. I think the first time I encountered this was probably 15 years ago now?
It doesn't work right on Windows either to be fair. With a mixed laptop fleet at work, we've just disabled sleep/hibernate company wide because it causes way too many problems.