TL;DR: During suspend, for graphics cards, GPU VRAM needs to be transferred to system RAM. However, during high memory usage scenarios the VRAM + RAM usage could exceed system memory -- this would ordinarily involve system swap coming into play and handling the temporarily out of memory issue. However system swap was already deactivated when it came time to suspending the AMD card causing all sorts of problems. The f…
Technically it was the suspend notifier; even suspend prepare executes after swap is disabled. See replies.
I helped fix sleep-wake hangs on Linux with AMD GPUs
61–70 of 218 posts
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#62Earlier quoted context omitted.
Sleep & suspend doesn’t work on Windows either. 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…
> Sleep & suspend doesn’t work on Windows either. What's strange is that it never used to be a problem. There are five Windows laptops floating around our house at various times (mixture of work and personal) and suspend works properly on none of them. Oddly, it works on my personal laptop with Debian Stable almost every time, failing maybe 1/25 times. Other distros are about the same as Windows.
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#63Since 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…
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#64Earlier quoted context omitted.
Technically it was the suspend notifier; even suspend prepare executes after swap is disabled. See replies.
Isn’t the hook called PM_SUPEND_PREPARE as per https://nyanpasu64.gitlab.io/blog/amdgpu-sleep-wake-hang/#so...
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#65Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#66Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#67This 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?
So it's not really a problem unless you really wanna do deeper sleeps.
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#68Apple 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
#69For 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!
https://learn.microsoft.com/en-us/windows-hardware/design/de...
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#70I used to think that naming things, cache invalidation, and off-by-one errors were the 2 biggest problems in CS, but then I learned about the "sleep/wake" problem and realized it's NP-complete.