Black Screen After Closing the Lid in Ubuntu 24.04

A laptop upgraded from Ubuntu 22.04 to 24.04: close the lid for a few seconds, open it, log in, all fine. Close it for a minute or longer, and the screen stays black when you open it. Ctrl+Alt+Del shows the login screen for a second, then it is gone, and nothing answers the keyboard. The only way out is to hold the power button.

This page finds the cause in the system log and fixes it. Tested on Ubuntu 24.04.5 LTS with kernel 6.8 and GNOME on X11, on a Lenovo V510-14IKB with Intel HD Graphics 520 and no NVIDIA card. The outputs are shortened and month names are shown in English. Tools used here: systemctl, grep, find, sudo.

Short answer. If the log of the frozen session has Unit nvidia-suspend.service not found and the laptop has no NVIDIA card, go to Fix: remove the dead links.

1. Did the laptop sleep at all?

After the power button, the frozen session is the previous boot. List the boots:

journalctl --list-boots | tail -3

-2 95efaaf2c3ec493aa99312f5373622af Sun 2026-11-01 22:08:03 EET Mon 2026-11-02 11:03:59 EET -1 cd7998fec561457eaeeca9427dab6f1d Mon 2026-11-02 11:04:25 EET Mon 2026-11-02 12:40:28 EET 0 60c971f5c9c34354a734c8f565b4e1a3 Mon 2026-11-02 12:41:31 EET Mon 2026-11-02 13:35:01 EET

Boot 0 is the current one. Boot -1 ended at 12:40:28, when the power button was held. Each time the laptop really goes to sleep, the kernel writes PM: suspend entry, and PM: suspend exit when it wakes up. Look for them in boot -1:

journalctl -b -1 -k -g 'PM: suspend'

-- No entries --

-b -1 is the previous boot, -k the kernel messages only, -g the lines that match. No entries: the laptop never slept in that session, although the lid was closed twice. It stayed on with the screen off, using the battery and getting warm in a bag.

2. Why suspend fails

The lid switch is watched by systemd-logind, and it is the service that puts the laptop to sleep. Its lines about the lid and suspend in boot -1; the pattern uspend matches both Suspending and suspend:

journalctl -b -1 --no-hostname -u systemd-logind -g 'Lid|uspend' | head -9

Nov 02 11:04:55 systemd-logind[1078]: Watching system buttons on /dev/input/event1 (Lid Switch) Nov 02 12:38:57 systemd-logind[1078]: Lid closed. Nov 02 12:38:57 systemd-logind[1078]: Suspending... Nov 02 12:39:01 systemd-logind[1078]: Error during inhibitor-delayed operation (already returned success to client): Unit nvidia-suspend.service not found. Nov 02 12:39:04 systemd-logind[1078]: Lid opened. Nov 02 12:39:08 systemd-logind[1078]: Lid closed. Nov 02 12:39:16 systemd-logind[1078]: Suspending... Nov 02 12:39:16 systemd-logind[1078]: Error during inhibitor-delayed operation (already returned success to client): Unit nvidia-suspend.service not found. Nov 02 12:39:16 systemd-logind[1078]: Suspending...

Every attempt fails at once. To sleep, logind starts systemd-suspend.service, and systemd refuses to start it, because it needs a unit that does not exist:

systemctl status nvidia-suspend.service

Unit nvidia-suspend.service could not be found.

The same log is full of Lockdown: systemd-logind: hibernation is restricted. That is Secure Boot blocking hibernation, not suspend, and it has nothing to do with this problem.

3. Why the screen stays black

The first close lasted 7 seconds: one failed attempt, the lid opened, the desktop came back. After the second close, logind kept trying for as long as the lid stayed closed:

journalctl -b -1 -u systemd-logind | grep -c 'Suspending'

221

221 attempts, from 12:39:16 to 12:40:18. Every attempt tells all programs that the system is about to sleep and then that it has woken up, and each time gsd-power, the GNOME service that switches the screen on and off, asks GNOME Shell to switch the screen on again. After about a minute GNOME Shell stopped answering:

journalctl -b -1 --no-hostname _COMM=gsd-power | tail -2

Nov 02 12:40:27 gsd-power[2532]: Error setting property 'PowerSaveMode' on interface org.gnome.Mutter.DisplayConfig: Timeout was reached (g-io-error-quark, 24) Nov 02 12:40:28 gsd-power[2532]: Error setting property 'PowerSaveMode' on interface org.gnome.Mutter.DisplayConfig: Timeout was reached (g-io-error-quark, 24)

Mutter is the part of GNOME Shell that drives the screen. While it does not answer, the screen stays off, the login screen that Ctrl+Alt+Del brings up shows for a moment and disappears, and the keyboard does nothing. That is why a short close works and a long one ends with the power button.

4. Where the NVIDIA dependency comes from

What systemd-suspend.service requires:

systemctl show systemd-suspend.service -p Requires

Requires=nvidia-suspend.service sleep.target system.slice nvidia-resume.service

Requires is a hard dependency: when a required unit is missing, systemd does not start the unit that needs it. Besides the unit file, requirements come from links in a folder named after the unit plus .requires:

ls -l /etc/systemd/system/systemd-suspend.service.requires/

lrwxrwxrwx 1 root root 41 May 31 2022 nvidia-resume.service -> /lib/systemd/system/nvidia-resume.service lrwxrwxrwx 1 root root 42 May 31 2022 nvidia-suspend.service -> /lib/systemd/system/nvidia-suspend.service

The folder systemd-hibernate.service.requires next to it has the same kind of links, to nvidia-hibernate.service and nvidia-resume.service. An NVIDIA driver package made them on 31 May 2022. Their targets are gone:

ls -l /lib/systemd/system/nvidia-suspend.service

ls: cannot access '/lib/systemd/system/nvidia-suspend.service': No such file or directory

And the laptop has no NVIDIA card at all, only Intel graphics with the i915 driver:

lspci -k | grep -A3 -E 'VGA|3D'

00:02.0 VGA compatible controller: Intel Corporation HD Graphics 520 (rev 0a) Subsystem: Lenovo HD Graphics 520 Kernel driver in use: i915 Kernel modules: i915

5. Why it started after the upgrade

dpkg -l | grep -i nvidia

ii linux-firmware-nvidia-graphics 20240318.git3b128b60-0ubuntu3.1 all ii nvidia-firmware-580-server-580.178.04 580.178.04-0ubuntu0.24.04.1 amd64 rc nvidia-kernel-common-580-server 580.178.04-0ubuntu0.24.04.1 amd64

rc means removed, with configuration files left. nvidia-kernel-common is the package that ships nvidia-suspend.service. The apt history shows when it went:

zgrep -h -B4 'Remove:.*nvidia-kernel-common' /var/log/apt/history.log* | grep -E 'Start-Date|Commandline|Remove'

Start-Date: 2025-05-03 11:35:33 Commandline: /usr/bin/unattended-upgrade Remove: nvidia-kernel-common-525-server:amd64 (525.147.05-0ubuntu2.22.04.1) Start-Date: 2026-10-21 08:52:17 Commandline: aptdaemon role='role-commit-packages' sender=':1.133' Remove: nvidia-kernel-common-515-server:amd64 (525.147.05-0ubuntu2.22.04.1), nvidia-kernel-common-535-server:amd64 (535.309.01-0ubuntu0.24.04.2), nvidia-kernel-common-580-server:amd64 (580.178.04-0ubuntu0.24.04.1)

The removal in May 2025 left other versions installed. On 21 October 2026, right after the upgrade to 24.04, aptdaemon, the back end of the graphical updater, removed the last three. A remove deletes the unit files but not the links that enable them; the package's removal script deletes those only on purge:

grep -B3 'deb-systemd-helper purge' /var/lib/dpkg/info/nvidia-kernel-common-*.postrm | head -4

# Automatically added by dh_installsystemd/13.14.1ubuntu5 if [ "$1" = "purge" ]; then if [ -x "/usr/bin/deb-systemd-helper" ]; then deb-systemd-helper purge 'nvidia-suspend.service' >/dev/null || true

The upgrade did a remove, not a purge, so systemd-suspend.service still requires a unit that is no longer on disk. On Ubuntu 22.04 the units were there and suspend worked.

6. Fix: remove the dead links

Only for a laptop without an NVIDIA card, as lspci showed in step 4; with an NVIDIA card, see below. Delete the four links and the two folders that held them, then make systemd read its units again:

sudo rm /etc/systemd/system/systemd-suspend.service.requires/nvidia-{suspend,resume}.service /etc/systemd/system/systemd-hibernate.service.requires/nvidia-{hibernate,resume}.service

sudo rmdir /etc/systemd/system/systemd-{suspend,hibernate}.service.requires

sudo systemctl daemon-reload

Without daemon-reload, systemd keeps the old dependency in memory until the next boot, even with the links gone. Check:

systemctl show systemd-suspend.service -p Requires

Requires=system.slice sleep.target

Look for other dead links among the units:

find /etc/systemd/system -xtype l

/etc/systemd/system/multi-user.target.wants/snapd.aa-prompt-listener.service

-xtype l lists links whose target is missing. The one left is in a .wants folder. Wants is a soft dependency: a missing unit is skipped and nothing breaks. Only dead links in a .requires folder stop a unit.

The leftover package can be purged afterwards; its removal script then also clears what deb-systemd-helper remembers about these links:

sudo apt purge nvidia-kernel-common-580-server

7. Test suspend

Close the lid for a few minutes, not seconds, open it, and look for the kernel lines in the current boot:

journalctl -b -k --no-hostname -g 'PM: suspend'

Nov 02 13:29:57 kernel: PM: suspend entry (deep) Nov 02 13:32:52 kernel: PM: suspend exit

The laptop slept from 13:29:57 to 13:32:52 and woke up normally. deep is suspend to RAM. The modes the kernel offers are in /sys/power/mem_sleep, with the active one in brackets:

cat /sys/power/mem_sleep

s2idle [deep]

Laptops with an NVIDIA card

Not tested here, because this laptop has no NVIDIA card. With an NVIDIA card and the proprietary driver, these units are needed: before sleep they let the driver save the video memory of the card. Do not delete the links. Install the driver again instead, so that its nvidia-kernel-common package brings the units back; ubuntu-drivers devices shows the recommended driver. Then systemctl status nvidia-suspend.service must find the unit.

Checklist

Article author: Klavdiya Kondakova