
If you’re an Ubuntu 22.04 LTS user and you’ve encountered a black screen after suspending your computer, it can be a frustrating experience. This issue is often related to the graphics card driver, and it can be resolved by following a few steps. In this article, we’ll provide several solutions to tackle this problem.
Solution for NVIDIA Graphics Cards (Driver 510)
For users with NVIDIA graphics cards using driver 510, the issue may be caused by NVIDIA systemd services. Here’s how to disable them:
- Open your terminal.
- Run the following commands:
These commands stop and disable the NVIDIA systemd services related to suspend, hibernate, and resume.sudo systemctl stop nvidia-suspend.service sudo systemctl stop nvidia-hibernate.service sudo systemctl stop nvidia-resume.service sudo systemctl disable nvidia-suspend.service sudo systemctl disable nvidia-hibernate.service sudo systemctl disable nvidia-resume.service
- Now, remove the NVIDIA systemd script by executing the command:
This command removes the script that NVIDIA uses during system sleep.sudo rm /lib/systemd/system-sleep/nvidia
- Finally, reboot your system. The suspend and resume functionality should now work properly with driver 510 for both X11 and Wayland.
Downgrading NVIDIA Driver from 510 to 470
Another solution that has worked for some users is downgrading the NVIDIA driver from version 510 to 470. Here’s how to do it:
- Open the “Additional Drivers” application. This application allows you to manage proprietary drivers for your hardware.
- Select the NVIDIA driver version 470 and apply the changes. This will downgrade your NVIDIA driver to a version that may be more stable.
- Reboot your system. The black screen issue should now be resolved.
Workaround for NVIDIA Driver 515 and CUDA 11.7
If you’re using NVIDIA driver 515 and CUDA 11.7, you may encounter the black screen problem after suspension. Here’s a workaround:
- If you encounter a black screen after suspension, press
Ctrl
+Alt
+F1
to switch to a virtual console. This is a terminal-like interface that operates outside of your graphical user interface (GUI). - Now, revert to the GUI session by pressing
Ctrl
+Alt
+FX
, whereX
is the virtual console number you switched from. This should bring you back to your GUI session.
Solution for AMD Graphics Cards
For users with AMD graphics cards, the solution may involve installing the amdgpu-install
package. Here’s how to do it:
- Open your terminal.
- Run the following command:
This command installs theamdgpu-install --usecase=graphics
amdgpu-install
package, which is designed to improve the performance of AMD graphics cards. - Make sure to check the secure boot support before installing the AMD graphic card components. This ensures that your system’s security features will not interfere with the installation.
Changing Graphics Card Driver
If you’re using an NVIDIA graphics card, changing the driver to “NVIDIA driver 515 tested” may resolve the issue. Here’s how to do it:
- Open the “Additional Drivers” application.
- Select “NVIDIA driver 515 tested” and apply the changes.
- Reboot your system.
Upgrading NVIDIA Driver to Version 525
Finally, if you’re using a GeForce GTX 1060 graphics card on Ubuntu 22.04, upgrading the NVIDIA driver to version 525 may resolve the problem. Here’s how to do it:
- Open the “Software & Updates” application. This application allows you to manage your system’s software and updates.
- Select the NVIDIA driver version 525 and apply the changes. This will upgrade your NVIDIA driver to the latest version.
- Reboot your system.
We hope that these solutions help you resolve the black screen issue after suspension in Ubuntu 22.04 LTS. Remember to back up your important data before making any changes to your system. If you encounter any issues, don’t hesitate to seek help from the Ubuntu community.
You can check if you have an NVIDIA graphics card on your Ubuntu system by opening the terminal and running the command lspci -k | grep -A 2 -i "VGA"
. This command will display information about your graphics card, including the manufacturer.
To open the terminal in Ubuntu, you can use the keyboard shortcut Ctrl
+Alt
+T
. Alternatively, you can click on the "Activities" button in the top-left corner of the screen, type "terminal" in the search bar, and click on the Terminal application that appears.
To install packages in Ubuntu using the terminal, you can use the apt
command. For example, to install a package named "package-name", you can run the command sudo apt install package-name
. You will need to enter your password when prompted.