Today I ran into a rather annoying issue: whenever I resumed my laptop after a suspend, my external monitor won’t work; even when unplugging plugging the USB-C cable back in.

My configuration

So far, I am using:

  • Ubuntu 24.10
  • Hyprland
  • Hyperidle (to suspend and hibernate)
  • Nvidia graphic card 2070 MaxQ

The problem

At the time of writing, there seems to be a problem with some open drivers for Nvidia graphic cards.

The solution

The solution consists in installing Nvidia’s proprietary drivers and configure the systemd to suspend/resume Nvidia services when needed.

Step 1: Enable mandatory services

Your systemd needs to be able to restart Nvidia services when resuming. Make sure they are enabled.

Bash
sudo systemctl enable nvidia-suspend.service
sudo systemctl enable nvidia-hibernate.service
sudo systemctl enable nvidia-resume.service

For all three services, the output should say enabled when checking for status:

Bash
sudo systemctl status nvidia-suspend.service
sudo systemctl status nvidia-hibernate.service
sudo systemctl status nvidia-resume.service

Step 2: Add required kernel parameter for the Nvidia card

Edit the grub configuration file:

Bash
sudo vi /etc/default/grub

Edit the GRUB_CMDLINE_LINUX_DEFAULT property as follows:

Bash
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvidia.NVreg_PreserveVideoMemoryAllocations=1"

Update the grub service with the new configuration:

Bash
sudo update-grub

Step 3: Install Nvidia’s proprietary drivers

Check the Nvidia drivers you are currently using:

Bash
dpkg -l | grep nvidia

If you are using nvidia-*-open drivers, you will need to change them. At least until the issue is resolved. If you are already using nvidia-*-dkms drivers, you can skip this step.

Bash
sudo apt-get remove --purge '^nvidia-.*'
sudo apt-get install nvidia-dkms

Step 4: Reboot your system and test

Once your system is rebooted, you can test the fix using the command:

Bash
systemctl suspend

References