Live data from Hacker News

I helped fix sleep-wake hangs on Linux with AMD GPUs

nyanpasu64.gitlab.io

161–170 of 218 posts

Re: I helped fix sleep-wake hangs on Linux with AMD GPUs

#161

Earlier quoted context omitted.

For some reason, people really insist on being able to put their machines to sleep, I honestly don't know why. Long boot times, maybe?

I mean I totally get it. At the end of the day I have a billion tabs open and 14 instances of notepad. But after getting burned by sleep failing enough times, you gotta change your habits.

LOL yeah... this always makes me laugh. I always get the "well it should work". My response, "Well, should's don't mean anything when it comes to computer technology". People want to conform to what the technology may be able to do, instead of working around it when it can't do what it designed to do, its a huge time sink for most people.

Just change your fucking habits and move on. I think Linus Tech tips complained about a unrelated but equally frustrating issue with S0 awhile back. I fucking hate S0 it makes me feel like tech companies are trying to force people to have always on computers by removing S3 support entirely from modern hardware.

Re: I helped fix sleep-wake hangs on Linux with AMD GPUs

#162
post #3

> Through some digging, I found that when a desktop enters S3 sleep, the system cuts power to PCIe GPUs I am not sure how correct this assumption is. S3 is supposed to cut power to everything but RAM, but for example Gigabyte Aorus motherboards are notorious for an NVMe SSD sleep bug that randomly prevents the system from properly sleeping or waking. This is fixed by adding the following udev rule: # Generic PCIe fix…

Wow, thanks for this tip! I've been dealing with suspend issues with an X570 Aorus Master as well.

Running `echo GPP0 >> /proc/acpi/wakeup` into a systemd unit at boot solved the issue for me... except the first sleep after a boot would always wake back up immediately.

I applied your udev rule and that issue seems to be resolved as well!

Re: I helped fix sleep-wake hangs on Linux with AMD GPUs

#163
post #11

> On my laptop, I opened a terminal and ran sudo minicom --device /dev/ttyUSB0 --baudrate 115200 to monitor the computer over serial. In addition to saving logs You can just use screen for that and have a working terminal with color support et al.

Another lightweight option is tio.

Re: I helped fix sleep-wake hangs on Linux with AMD GPUs

#164
post #23

Earlier 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?

After my (closed) gaming laptop started making annoying Windows noises earlier today, I'm led to believe that it doesn't work properly on Windows either. It seems like it's basically hardware whack-a-mole at this point. The only reason Apple does it reasonably well is they control more of the stack and they support less hardware. The only reason Windows does it better than Linux is they have more eyes on it.

The reason it works better on Mac and windows is because they're designed to be desktop OSs. On Linux the funding goes to things cloud services and Android use, which decidedly does not include suspension or other desktop features

Re: I helped fix sleep-wake hangs on Linux with AMD GPUs

#165
post #16

This 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…

To add: for the end user, the way to easily get working suspend is to buy known-good compatible hardware.

It's been solid on every business Thinkpad for a long long time for me and consistently seems people on Windows with the same models have more sleep problems.

Re: I helped fix sleep-wake hangs on Linux with AMD GPUs

#166
For a second I thought this was referring to the other reset bug on Polaris, Vega and Navi. (These apparently have broken Function Level Reset sequences, requiring quite specific reset code as a separate module or a system reboot to bring back to a working state.)

Re: I helped fix sleep-wake hangs on Linux with AMD GPUs

#167
post #54
post #17

Earlier quoted context omitted.

As somebody with an Aorus motherboard who has probably burned a few kWh on this issue, I was really excited to try these solutions - no luck. Thank you anyway!

Did you try the general fix? And reload udev rules? You also have to make sure it applies after the default rules. You can check if the rule applies once you have everything set up by doing an `udevadm` attribute walk of your SSD device (not partition), and then following it up all the way up the device tree until you see your specific device port (target fix) or PCIe driver subsystem (general fix). Then check if "po…

Maybe I should have clarified more - I'm using a desktop PC, not a laptop

The system seems to go into sleep state just fine, it just freezes when waking up again

Re: I helped fix sleep-wake hangs on Linux with AMD GPUs

#168
post #107

Earlier quoted context omitted.

It’s much better on ARM. And their external monitor support is so much faster and reliable now. Having control over all their hardware has made a noticeable improvement.

This is not my experience. My M1 Pro MacBook has very strange issues with sound over HDMI. I usually need to reboot it when I connect it to my TV or media won't play if the sound is output over HDMI.

That's annoying but could also be caused by the monitor or TV HDMI implementation.

Re: I helped fix sleep-wake hangs on Linux with AMD GPUs

#169

I have a problem similar to what OP faced but with an NVIDIA GPU (RTX 4080). When I wake the computer from suspend, the computer will usually wake up, show me the timestamp changing on the lock screen. But sometimes randomly, the timestamp will not change the the screen will freeze on the old timestamp. After this, it is either REISUB or hard reset. @nyanpasu64, do you think enabling nvidia-suspend/nvidia-resume serv…

I have encountered this running Ubuntu with an nvidia gpu. Have you tried adding button.lid_init_state=open as a kernel boot parameter? That is what solved it for me.

Thanks. Will try.

Re: I helped fix sleep-wake hangs on Linux with AMD GPUs

#170
post #57

Earlier quoted context omitted.

Modern Standby. Windows wanted to do the Apple "power nap" stuff, but never realized how painful it'd be if you don't control all the hardware and have millions of different hardware permutations (with a lot of terrible drivers) instead of just a few. Not that it would've helped, half the time my machine is either overheating or off it seems to be wake timers doing windows updates (which yes, you can disable, but mos…

I'm super happy with S0 on Linux. The implementation is all about doing as little as possible but effectively remain "on".

What's the point, though? If it doesn't actually do anything, why keep it on?
Post reply on HN