GekBuzz

Answers, Explainers & Everyday Guides

How to Fix AMD GPU Black Screen on Suspend in Ubuntu

How to Fix AMD GPU Black Screen on Suspend in Ubuntu

If you use an AMD GPU on Ubuntu and experience a black screen after your system resumes from suspend or sleep mode, this guide will help you fix that issue. The black screen problem typically occurs due to driver or kernel incompatibilities with power management features, causing the display not to wake properly. By following this step-by-step tutorial, you can configure your system to resume cleanly without the black screen, improving your workflow and reducing frustration.

What You’ll Need

  • An Ubuntu system with an AMD GPU installed
  • Basic familiarity with the Linux terminal
  • Access to sudo privileges to edit system files
  • Internet connection to install or update packages
  • Optional: A backup solution to save important data before modifying system settings

Step-by-Step

  1. Update your system packages: Open a terminal and run:
    sudo apt update && sudo apt upgrade -y

    This ensures you have the latest kernel and AMD drivers that might already include fixes.

  2. Check your current kernel version:
    uname -r

    Note it down; sometimes upgrading to a newer kernel can resolve suspend/resume issues.

  3. Install or update the AMD GPU drivers: Ubuntu typically uses the open-source amdgpu driver by default. To ensure you have the latest, run:
    sudo apt install --reinstall xserver-xorg-video-amdgpu

    Alternatively, consider installing the proprietary AMDGPU-PRO driver from AMD’s official website if open-source drivers fail.

  4. Modify kernel parameters to improve power management: Edit your GRUB configuration:
    sudo nano /etc/default/grub

    Find the line starting with GRUB_CMDLINE_LINUX_DEFAULT and add the following parameters inside the quotes:
    amdgpu.runpm=0 amdgpu.dc=0
    For example:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash amdgpu.runpm=0 amdgpu.dc=0"
    These options disable runtime power management and the display code, which are common causes of black screen on resume.

  5. Update GRUB and reboot:
    sudo update-grub
    sudo reboot

    After rebooting, test suspending your system (e.g., close the lid or run systemctl suspend) and verify if the black screen persists.

  6. Create a systemd sleep hook to reload the AMD GPU driver on resume: Sometimes reloading the driver helps reset the GPU state.
    sudo nano /lib/systemd/system-sleep/amdgpu-resume.sh

    Paste the following script:

    #!/bin/bash
    
    case "$1" in
      post)
        modprobe -r amdgpu
        modprobe amdgpu
        ;;
    esac
    

    Save and exit, then make the script executable:

    sudo chmod +x /lib/systemd/system-sleep/amdgpu-resume.sh
  7. Disable Wayland if you use GNOME: Wayland sometimes causes compatibility issues with AMD GPUs.
    Edit the GDM config:

    sudo nano /etc/gdm3/custom.conf

    Uncomment or add the line:
    #WaylandEnable=false
    Change it to:
    WaylandEnable=false
    Save, exit, and reboot.

  8. Check logs for errors: If problems persist, inspect system logs after resume:
    journalctl -b -1 | grep amdgpu

    or

    dmesg | grep amdgpu

    This can help identify driver or kernel messages related to the GPU.

  9. Consider upgrading your kernel: If your Ubuntu version uses an older kernel, upgrading to a newer stable kernel (e.g., from Ubuntu Mainline PPA) may provide better AMD GPU support.
    Follow official Ubuntu kernel upgrade instructions carefully.
  10. Test alternative display managers or desktop environments: Sometimes the desktop environment or display manager may cause issues. Testing with LightDM instead of GDM or switching to XFCE or KDE can help isolate the problem.

Common Mistakes

  • Editing GRUB incorrectly: Forgetting to update GRUB after modifying /etc/default/grub means changes won’t apply.
  • Not making scripts executable: The systemd sleep hook won’t run unless it has execute permissions.
  • Overlooking Wayland as a cause: Not disabling Wayland can cause black screen issues with AMD GPUs on GNOME.
  • Ignoring kernel version compatibility: Using outdated kernels may lack fixes for AMD GPU suspend/resume problems.
  • Not backing up configuration files: Failing to save copies before changes can complicate rollback if something breaks.

Tips

  • Always keep your system and kernel updated as AMD and Linux kernel developers frequently improve GPU support.
  • Test suspend/resume cycles after each change to isolate which fix works best for your hardware.
  • Use systemctl suspend from the terminal to test suspend behavior without closing the lid.
  • Check AMD’s official Linux support pages and Ubuntu forums for model-specific advice.
  • If you have hybrid graphics (AMD + Intel), consider configuring PRIME or disabling one GPU to simplify troubleshooting.

Troubleshooting

If the black screen problem continues despite following the above steps, try the following troubleshooting methods:

  • Boot into recovery mode: Use the GRUB menu to boot into recovery mode and test if the suspend/resume issue persists. If it doesn’t, the problem might be related to user-space drivers or desktop environment.
  • Check Xorg logs: Review /var/log/Xorg.0.log for errors related to the AMD GPU or display server.
  • Test with a live Ubuntu USB: Boot from a live USB session to see if the problem exists on a clean environment. This helps determine if the issue is hardware or software related.
  • Try disabling other power management tools: Tools like TLP or laptop-mode-tools can interfere with GPU power states. Temporarily disable them and test suspend behavior.
  • Check firmware updates: Ensure your system BIOS/UEFI firmware is up to date, as some suspend/resume issues stem from outdated firmware.
  • Switch to a different kernel version: If you upgraded the kernel without success, try booting into an older kernel version from the GRUB menu.
  • Seek community help: Post detailed information including logs, GPU model, kernel version, and Ubuntu version on forums like Ask Ubuntu or AMD’s Linux community.

Frequently Asked Questions

Why does my AMD GPU cause a black screen after suspend on Ubuntu?

This is usually due to driver or kernel power management incompatibilities that prevent the GPU from properly reinitializing the display after suspend.

Is it better to use the open-source or proprietary AMD drivers?

Ubuntu defaults to the open-source amdgpu driver, which is well-supported and regularly updated. The proprietary AMDGPU-PRO driver may offer additional features but can introduce complexity and is not always necessary.

What do the kernel parameters amdgpu.runpm=0 and amdgpu.dc=0 do?

amdgpu.runpm=0 disables runtime power management, and amdgpu.dc=0 disables the display code (DC) component. Both can help avoid black screen issues related to GPU power state transitions.

Will upgrading the kernel fix my suspend/resume black screen?

Sometimes yes. Newer kernels often include improved AMD GPU support and bug fixes, but upgrading should be done carefully and is not guaranteed to fix every issue.

Why should I disable Wayland for AMD GPU suspend issues?

Wayland support for AMD GPUs is still evolving, and some users report fewer suspend/resume issues when using Xorg by disabling Wayland in GDM.

Can hybrid graphics setups cause this problem?

Yes, systems with both AMD and integrated GPUs can have complex power management interactions. Configuring PRIME or disabling one GPU may help isolate or fix suspend/resume issues.

By carefully applying these steps and recommendations, you should be able to resolve black screen issues related to AMD GPUs on Ubuntu during suspend and resume cycles, allowing for a smoother and more reliable desktop experience.

Related

How to Fix AMD GPU Black Screen on Suspend in Ubuntu

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top