Update: I upgraded to an Intel Arc B570 GPU... and ran into the exact same problem on an independent driver: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4288
Oh hey, another Intel Arc user! I got the LE B580 and so far it's been a pretty good experience for me, though I don't really use suspend. Also I got curious about your blog (haven't heard about Zola, recently migrated my own blog over to a newer version of Grav, which is a flat file CMS with no DB) and saw your post about looking for a new job. Hope things work out for you, stay safe!
I helped fix sleep-wake hangs on Linux with AMD GPUs
201–210 of 218 posts
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#202Earlier quoted context omitted.
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
Yes, my problem was with an Aorus ATX motherboard too. > The system seems to go into sleep state just fine, it just freezes when waking up again The behavior differs per device. Some sleep but freeze on wakeup, some immediately wakeup after sleeping, and some (like mine) will go to sleep 98% of the way, but the fans keep spinning. That was a dead giveaway for me that the bug was triggered. I suspect that on some syst…
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#203Props to you for this. I am not clever/experienced enough to solve my own issues with sleep-wake hangs on Linux at work. I’ve instead opted to work around it. I use Firefox, Obsidian, and Tmux with Neovim for all my work. Tmux has resurrect and a plugin that saves my entire terminal state automatically every few minutes. I also have a command that automatically sets up my i3wm/regolith windows exactly how I like. Bas…
Could you link to your i3wm/regolith window setup code? I'd like to set up something similar!
https://github.com/lkdm/dotfiles/blob/main/bin/executable_wk...
Hope it helps you out
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#204I 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…
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#205Earlier quoted context omitted.
> two problems ... overcommit Is there any other sensible way to do this though? It would be quite inefficient to constantly call mmap for additional small(ish) pieces of memory. In effect overcommit just means that until the page is actually written to it hasn't really been allocated. (Aside: I believe a malloc implementation that zero'd out blocks on allocation would fail abruptly rather than later in case that hap…
A potential workaround would be to still allow giant mmaps but not hang a program when it runs out of pages and instead send a signal to it. Obviously, neither Chrome nor Firefox actually use this much memory in practice.
However I think you'd need per-thread signal handlers for that to work sensibly. Which the kernel supports (see man 2 clone) but would require updates to (at least) posix and glibc.
It would probably also be nice to have a way to allocate pages without writing to them. Currently we have mlock but that prevents swapping which isn't desirable in this context.
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#206Earlier quoted context omitted.
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
#207Earlier quoted context omitted.
Because they own the now hardware, and MacOS iOS run exclusively on their hardware Source: I work on windows power management and I know system engineers at apple.
That's the often repeated argument. But as a counter point you have the Google Pixel. Google owns the hardware, even the SoC, and the software. And yet, battery is still poorer than third party Android phone manufacturers. And let's not even compare to Apple. So controlling the entire stack isn't enough. There has to be a desire to do better, as well as technical competency.
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#208Earlier quoted context omitted.
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!
This is more so for your future unit file use: did you use `Type=oneshot` and `RemainAfterExit=yes`? I remember there being some strange interaction with the wakeup behaviour being toggled otherwise. But this could be due to me being on NixOS.
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#209"We have tried to solve these issues case by case, but found that may not be the right way. Especially about the unbalanced irq reference count, there will be new issues appear once we fixed the current known issues. After analyzing related source code, we found that there may be some fundamental implementation flaws behind these resource tracking issues.
So we try to fix those issues by two enhancements/refinements to current device management state machines."
Re: I helped fix sleep-wake hangs on Linux with AMD GPUs
#210Earlier quoted context omitted.
This is more so for your future unit file use: did you use `Type=oneshot` and `RemainAfterExit=yes`? I remember there being some strange interaction with the wakeup behaviour being toggled otherwise. But this could be due to me being on NixOS.
I just did `ExecStart` with `multi-user.target`. That implies the unit is `simple`, so it very well could be sequencing incorrectly at boot and failing. That's a good point; I'll have to keep that in mind!
If you don't add "RemainAfterExit", the service will run at every boot, because after a reboot it is considered "inactive. This will execute your shell code, which effectively toggles wakeup.
"RemainAfterExit" is meant for unit files that change the state of your system. After running once, the service will be considered "active", until you manually deactivate it, which will execute whatever you might have set in "ExecStop".
"Type=Oneshot" is necessary for "RemainAfterExit".
In this case I still would prefer doing it via udev though. I've made it my rule of thumb to evade shell scripting wherever feasible, because it usually ends up being more brittle, and more prone to footgunning :)