news.volyx.in

I helped fix sleep-wake hangs on Linux with AMD GPUs (nyanpasu64.gitlab.io)

772 points by fanf2 · 533 days ago · 212 comments on HN

Article summary

The author of the article experienced sleep-wake hangs on their Linux system with an AMD GPU and spent over a year debugging the issue. They discovered that the problem was caused by a bug in the amdgpu driver's power and memory management. The author worked with the amdgpu developers to implement a fix, which is expected to be included in the Linux 6.14 kernel. The fix involves moving VRAM eviction to an earlier stage of the suspend process to prevent out-of-memory errors.

Main themes

  • Linux sleep-wake issues
  • AMD GPU driver bugs
  • Kernel debugging
  • Power management
  • System suspend and resume

What commenters say

  • The article's fix may not work for everyone, as some users are still experiencing sleep-wake issues with their AMD GPUs.
  • Disabling wake-up from certain devices, such as USB ports or PCIe devices, can help resolve sleep-wake issues.
  • Running a memtest can help identify bad RAM as a potential cause of GPU crashes and sleep-wake issues.
  • The use of udev rules and systemd units can be effective in resolving sleep-wake issues, but may require careful configuration.
  • Some users are experiencing similar issues with Nvidia GPUs, and the article's tips may not be directly applicable.
  • The article's fix may have unintended consequences, such as deadlocks, and may need to be reverted or modified.
  • Using a serial console can be a useful debugging tool for diagnosing sleep-wake issues.
  • The order of operations during system suspend and resume is complex and can affect the success of the suspend process.