Black screen after waking up by closing laptop lid, hybrid sleep issues

Hello, I’ve been struggling with waking up from suspend for about a year now and I partially fixed it in this thread:

Black screen on laptop after waking up from a suspended session

What I fixed after that topic is suspending using systemctl suspend (hibernation works fine as well). But if I suspend the laptop by closing the lid, after I open it up I get a black screen and a white underline cursor in the top left corner. Hitting caps lock toggles the LED indicator but that’s it, I cannot even switch to another tty and have to hard shutdown.

Here is the output of journalctl -b-1 -p3 --no-hostname --no-pager (the timestamp is from the time of suspending):

bře 31 15:48:14 kernel: x86/cpu: SGX disabled by BIOS.
bře 31 15:48:14 kernel: Spectre V2 : WARNING: Unprivileged eBPF is enabled with eIBRS on, data leaks possible via Spectre v2 BHB attacks!
bře 31 15:48:14 kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.I2C2.TPD0], AE_NOT_FOUND (20210930/dswload2-162)
bře 31 15:48:14 kernel: ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210930/psobject-220)
bře 31 15:48:14 kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.I2C3.TPL1], AE_NOT_FOUND (20210930/dswload2-162)
bře 31 15:48:14 kernel: ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210930/psobject-220)
bře 31 15:48:15 kernel: 
bře 31 15:48:23 nmbd[821]: [2022/03/31 15:48:23.121894,  0] ../../source3/nmbd/nmbd.c:901(main)
bře 31 15:48:23 nmbd[821]:   nmbd version 4.15.5 started.
bře 31 15:48:23 nmbd[821]:   Copyright Andrew Tridgell and the Samba Team 1992-2021
bře 31 15:48:23 nmbd[821]: [2022/03/31 15:48:23.123693,  0] ../../lib/util/become_daemon.c:150(daemon_status)
bře 31 15:48:23 nmbd[821]:   daemon_status: daemon 'nmbd' : No local IPv4 non-loopback interfaces available, waiting for interface ...
bře 31 15:48:23 nmbd[821]: [2022/03/31 15:48:23.123922,  0] ../../source3/nmbd/nmbd_subnetdb.c:252(create_subnets)
bře 31 15:48:23 nmbd[821]:   NOTE: NetBIOS name resolution is not supported for Internet Protocol Version 6 (IPv6).
bře 31 15:48:30 kded5[896]: org.kde.plasma.dataengine.geolocation: error:  "Unknown host location.services.mozilla.com: Host not found"
bře 31 15:48:30 kded5[896]: org.kde.plasma.dataengine.geolocation: error:  "Unknown host location.services.mozilla.com: Host not found"
bře 31 15:48:36 smbd[1285]: [2022/03/31 15:48:36.433971,  0] ../../source3/smbd/server.c:1734(main)
bře 31 15:48:36 smbd[1285]:   smbd version 4.15.5 started.
bře 31 15:48:36 smbd[1285]:   Copyright Andrew Tridgell and the Samba Team 1992-2021
bře 31 15:48:47 nmbd[821]: [2022/03/31 15:48:47.401520,  0] ../../source3/libsmb/nmblib.c:923(send_udp)
bře 31 15:48:47 nmbd[821]:   Packet send failed to 10.0.0.255(138) ERRNO=Network is unreachable
bře 31 15:48:57 nmbd[821]: [2022/03/31 15:48:57.686510,  0] ../../source3/libsmb/nmblib.c:923(send_udp)
bře 31 15:48:57 nmbd[821]:   Packet send failed to 10.0.0.255(138) ERRNO=Network is unreachable
bře 31 15:48:57 systemd-udevd[1517]: controlC1: /usr/lib/udev/rules.d/78-sound-card.rules:5 Failed to write ATTR{/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/controlC1/../uevent}, ignoring: No such file or directory
bře 31 15:48:58 nmbd[821]: [2022/03/31 15:48:58.686891,  0] ../../source3/libsmb/nmblib.c:923(send_udp)
bře 31 15:48:58 nmbd[821]:   Packet send failed to 10.0.0.255(138) ERRNO=Network is unreachable
bře 31 15:48:58 nmbd[821]: [2022/03/31 15:48:58.686965,  0] ../../source3/libsmb/nmblib.c:923(send_udp)
bře 31 15:48:58 nmbd[821]:   Packet send failed to 10.0.0.255(137) ERRNO=Network is unreachable
bře 31 15:48:58 nmbd[821]: [2022/03/31 15:48:58.686975,  0] ../../source3/nmbd/nmbd_packets.c:180(send_netbios_packet)
bře 31 15:48:58 nmbd[821]:   send_netbios_packet: send_packet() to IP 10.0.0.255 port 137 failed
bře 31 15:48:58 nmbd[821]: [2022/03/31 15:48:58.686983,  0] ../../source3/nmbd/nmbd_nameregister.c:582(register_name)
bře 31 15:48:58 nmbd[821]: [82B blob data]
bře 31 15:49:23 systemd-udevd[1788]: controlC1: /usr/lib/udev/rules.d/78-sound-card.rules:5 Failed to write ATTR{/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/controlC1/../uevent}, ignoring: No such file or directory
bře 31 15:49:51 systemd-udevd[2068]: controlC1: /usr/lib/udev/rules.d/78-sound-card.rules:5 Failed to write ATTR{/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/controlC1/../uevent}, ignoring: No such file or directory
bře 31 15:50:24 systemd-udevd[2354]: controlC1: /usr/lib/udev/rules.d/78-sound-card.rules:5 Failed to write ATTR{/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/controlC1/../uevent}, ignoring: No such file or directory
bře 31 15:50:40 systemd-udevd[2621]: controlC1: /usr/lib/udev/rules.d/78-sound-card.rules:5 Failed to write ATTR{/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/controlC1/../uevent}, ignoring: No such file or directory
bře 31 15:53:56 kernel: ACPI Error: No installed handler for fixed event - PowerButton (2), disabling (20210930/evevent-255)

Sometimes I get a slightly different log, like this one. The last times are after trying hybrid sleep, which doesn’t work either:

bře 31 19:32:31 kernel: x86/cpu: SGX disabled by BIOS.
bře 31 19:32:31 kernel: Spectre V2 : WARNING: Unprivileged eBPF is enabled with eIBRS on, data leaks possible via Spectre v2 BHB attacks!
bře 31 19:32:31 kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.I2C2.TPD0], AE_NOT_FOUND (20210930/dswload2-162)
bře 31 19:32:31 kernel: ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210930/psobject-220)
bře 31 19:32:31 kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.I2C3.TPL1], AE_NOT_FOUND (20210930/dswload2-162)
bře 31 19:32:31 kernel: ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210930/psobject-220)
bře 31 19:32:32 kernel: 
bře 31 19:32:32 systemd-udevd[319]: could not read from '/sys/module/pcc_cpufreq/initstate': No such device
bře 31 19:32:39 nmbd[800]: [2022/03/31 19:32:39.685247,  0] ../../source3/nmbd/nmbd.c:901(main)
bře 31 19:32:39 nmbd[800]:   nmbd version 4.15.5 started.
bře 31 19:32:39 nmbd[800]:   Copyright Andrew Tridgell and the Samba Team 1992-2021
bře 31 19:32:39 nmbd[800]: [2022/03/31 19:32:39.688687,  0] ../../lib/util/become_daemon.c:150(daemon_status)
bře 31 19:32:39 nmbd[800]:   daemon_status: daemon 'nmbd' : No local IPv4 non-loopback interfaces available, waiting for interface ...
bře 31 19:32:39 nmbd[800]: [2022/03/31 19:32:39.688979,  0] ../../source3/nmbd/nmbd_subnetdb.c:252(create_subnets)
bře 31 19:32:39 nmbd[800]:   NOTE: NetBIOS name resolution is not supported for Internet Protocol Version 6 (IPv6).
bře 31 19:32:43 kded5[874]: org.kde.plasma.dataengine.geolocation: error:  "Unknown host location.services.mozilla.com: Host not found"
bře 31 19:32:43 kded5[874]: org.kde.plasma.dataengine.geolocation: error:  "Unknown host location.services.mozilla.com: Host not found"
bře 31 19:32:45 smbd[1226]: [2022/03/31 19:32:45.286336,  0] ../../source3/smbd/server.c:1734(main)
bře 31 19:32:45 smbd[1226]:   smbd version 4.15.5 started.
bře 31 19:32:45 smbd[1226]:   Copyright Andrew Tridgell and the Samba Team 1992-2021
bře 31 19:33:09 nmbd[800]: [2022/03/31 19:33:09.892367,  0] ../../source3/nmbd/nmbd_become_lmb.c:398(become_local_master_stage2)
bře 31 19:33:09 nmbd[800]:   *****
bře 31 19:33:09 nmbd[800]: 
bře 31 19:33:09 nmbd[800]:   Samba name server HYPERION-NB is now a local master browser for workgroup WORKGROUP on subnet 192.168.1.128
bře 31 19:33:09 nmbd[800]: 
bře 31 19:33:09 nmbd[800]:   *****
bře 31 19:47:12 dolphin[2720]: inotify_add_watch(/lost+found) failed: (Permission denied)
bře 31 19:47:13 dolphin[2720]: inotify_add_watch(/etc/sudoers.d) failed: (Permission denied)
bře 31 19:58:16 systemd-udevd[3471]: controlC1: /usr/lib/udev/rules.d/78-sound-card.rules:5 Failed to write ATTR{/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/controlC1/../uevent}, ignoring: No such file or directory

And one more log after trying hybrid sleep, also different from the first two:

bře 31 20:08:24 kernel: x86/cpu: SGX disabled by BIOS.
bře 31 20:08:24 kernel: Spectre V2 : WARNING: Unprivileged eBPF is enabled with eIBRS on, data leaks possible via Spectre v2 BHB attacks!
bře 31 20:08:24 kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.I2C2.TPD0], AE_NOT_FOUND (20210930/dswload2-162)
bře 31 20:08:24 kernel: ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210930/psobject-220)
bře 31 20:08:24 kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.I2C3.TPL1], AE_NOT_FOUND (20210930/dswload2-162)
bře 31 20:08:24 kernel: ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20210930/psobject-220)
bře 31 20:08:24 kernel: 
bře 31 20:08:32 nmbd[822]: [2022/03/31 20:08:32.273044,  0] ../../source3/nmbd/nmbd.c:901(main)
bře 31 20:08:32 nmbd[822]:   nmbd version 4.15.5 started.
bře 31 20:08:32 nmbd[822]:   Copyright Andrew Tridgell and the Samba Team 1992-2021
bře 31 20:08:32 nmbd[822]: [2022/03/31 20:08:32.274949,  0] ../../lib/util/become_daemon.c:150(daemon_status)
bře 31 20:08:32 nmbd[822]:   daemon_status: daemon 'nmbd' : No local IPv4 non-loopback interfaces available, waiting for interface ...
bře 31 20:08:32 nmbd[822]: [2022/03/31 20:08:32.275164,  0] ../../source3/nmbd/nmbd_subnetdb.c:252(create_subnets)
bře 31 20:08:32 nmbd[822]:   NOTE: NetBIOS name resolution is not supported for Internet Protocol Version 6 (IPv6).
bře 31 20:08:34 kded5[896]: org.kde.plasma.dataengine.geolocation: error:  "Unknown host location.services.mozilla.com: Host not found"
bře 31 20:08:34 kded5[896]: org.kde.plasma.dataengine.geolocation: error:  "Unknown host location.services.mozilla.com: Host not found"
bře 31 20:08:34 smbd[1178]: [2022/03/31 20:08:34.578553,  0] ../../source3/smbd/server.c:1734(main)
bře 31 20:08:34 smbd[1178]:   smbd version 4.15.5 started.
bře 31 20:08:34 smbd[1178]:   Copyright Andrew Tridgell and the Samba Team 1992-2021

I previously couldn’t wake up from suspending even after hitting the suspend button and what fixed that is editing my /etc/mkinitcpio.conf file by adding the fsck option to hooks. It now looks as follows:

HOOKS=(base udev autodetect modconf block filesystems resume fsck keyboard)

After that I did: sudo mkinitcpio -P and sudo update-grub, both successfully. Yet I found that after closing the laptop lid I still cannot wake up, even after fixing the hooks.

Interesting observations

if I suspend the laptop and THEN close the lid, I can wake it up just fine! It seems that suspending it by closing the lid is the only troublemaker.

Also, when the laptop is powered, both suspend and hibernation seems to work fine. Hybrid sleep doesn’t work even with A/C power, after waking up I see a blank screen with no cursor and even the caps lock LED indicator isn’t working.

Update

Just found that waking up on the next day (on battery), after I suspended before closing the lid, gives me a black screen as well. The error log is the same, with the x86/cpu: SGX disabled by BIOS and Spectre V2 warning messages.

Also enabled SGX in BIOS to get rid of the SGX message in boot logs.

Switch to 5.17 kernel.

Is it a good idea to try out a release candidate kernel? I’ll install it nevertheless and report back after trying out various scenarios.

As I mentioned in the other thread that I linked, this issue has chased me for several kernel versions, that I stopped believing in kernel updates ever fixing it.

517 is no longer a release candidate…atleast in testing and unstable.

Using that kernel will solve the “Spectre…” issue for sure. Can’t say about other stufff.

Upgrading to 5.17 indeed got rid of the Spectre issue, but the boot behaviour is the same and I still can’t get past a white cursor at the top left corner of a black screen. On stable Manjaro the currently newest 5.17 is rc7.

I wonder whether the systemd-udevd ‘No such device’ initstate error at the beginning of the log is related to the issue?

Boot log
dub 03 12:44:05 kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.I2C2.TPD0], AE_NOT_FOUND (20211217/dswload2-162)
dub 03 12:44:05 kernel: ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20211217/psobject-220)
dub 03 12:44:05 kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.I2C3.TPL1], AE_NOT_FOUND (20211217/dswload2-162)
dub 03 12:44:05 kernel: ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20211217/psobject-220)
dub 03 12:44:06 kernel: 
dub 03 12:44:07 systemd-udevd[307]: could not read from '/sys/module/pcc_cpufreq/initstate': No such device
dub 03 12:44:07 systemd-udevd[317]: could not read from '/sys/module/pcc_cpufreq/initstate': No such device
dub 03 12:44:10 nmbd[754]: [2022/04/03 12:44:10.923532,  0] ../../source3/nmbd/nmbd.c:901(main)
dub 03 12:44:10 nmbd[754]:   nmbd version 4.15.5 started.
dub 03 12:44:10 nmbd[754]:   Copyright Andrew Tridgell and the Samba Team 1992-2021
dub 03 12:44:10 nmbd[754]: [2022/04/03 12:44:10.926206,  0] ../../lib/util/become_daemon.c:150(daemon_status)
dub 03 12:44:10 nmbd[754]:   daemon_status: daemon 'nmbd' : No local IPv4 non-loopback interfaces available, waiting for interface ...
dub 03 12:44:10 nmbd[754]: [2022/04/03 12:44:10.926739,  0] ../../source3/nmbd/nmbd_subnetdb.c:252(create_subnets)
dub 03 12:44:10 nmbd[754]:   NOTE: NetBIOS name resolution is not supported for Internet Protocol Version 6 (IPv6).
dub 03 12:44:16 kded5[880]: org.kde.plasma.dataengine.geolocation: error:  "Unknown host location.services.mozilla.com: Host not found"
dub 03 12:44:16 kded5[880]: org.kde.plasma.dataengine.geolocation: error:  "Unknown host location.services.mozilla.com: Host not found"
dub 03 12:44:21 smbd[1275]: [2022/04/03 12:44:21.488027,  0] ../../source3/smbd/server.c:1734(main)
dub 03 12:44:21 smbd[1275]:   smbd version 4.15.5 started.
dub 03 12:44:21 smbd[1275]:   Copyright Andrew Tridgell and the Samba Team 1992-2021
dub 03 12:44:44 nmbd[754]: [2022/04/03 12:44:44.461334,  0] ../../source3/nmbd/nmbd_become_lmb.c:398(become_local_master_stage2)
dub 03 12:44:44 nmbd[754]:   *****
dub 03 12:44:44 nmbd[754]: 
dub 03 12:44:44 nmbd[754]:   Samba name server HYPERION-NB is now a local master browser for workgroup WORKGROUP on subnet 10.0.0.22
dub 03 12:44:44 nmbd[754]: 
dub 03 12:44:44 nmbd[754]:   *****```

Something to try: HandleLidSwitch=ignore in logind.conf & reboot.
Does this let you open/close the lid without a problem?
If so, then you can try setting ignore to suspend ~ that is actually the default behaviour, but I found that making it explicit in that file is somehow different.

sudo nano /etc/systemd/logind.conf

# uncomment these lines & set ignore
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore

There is also the iommu=soft fix for some Lenovo laptops, not sure if it applies to you. But worth checking out.

Setting it to ignore or both LidSwitch lines to suspend and rebooting hasn’t made a difference. After the first trial with lid closing, even with AC plugged in, I got a black screen after booting.

Although the guide you sent is for Thinkbooks with AMD and I have Ideapad Gaming with Intel, I decided to give it a shot, but the results were the same… My journalctl boot log remains the same as well.

Interestingly, there appears to be something going on during the black screen as my fan RPM goes slightly up if I keep it on for some time.

With the newest Manjaro stable update and kernel 5.17, the system behaves the same.

Currently on 5.18.3-1 and newest stable update

This is my journalctl -b-1 -p3 --no-hostname --no-pager:

16:05 is after I opened the lid while the laptop was suspended and saw a black screen again. It seems nvidia-modeset is the culprit. Any ideas what to do about it?

I was struggling with getting my hybrid GPU setup working correctly before, and I don’t even need to use Nvidia if using Intel only is more stable. I’ll use whatever fixes my suspend issues…

čen 15 09:04:25 kernel: x86/cpu: SGX disabled by BIOS.
čen 15 09:04:25 kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.I2C2.TPD0], AE_NOT_FOUND (20211217/dswload2-162)
čen 15 09:04:25 kernel: ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20211217/psobject-220)
čen 15 09:04:25 kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.I2C3.TPL1], AE_NOT_FOUND (20211217/dswload2-162)
čen 15 09:04:25 kernel: ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20211217/psobject-220)
čen 15 09:04:26 kernel: 
čen 15 09:04:28 kernel: Bluetooth: hci0: Malformed MSFT vendor event: 0x02
čen 15 09:04:33 nmbd[805]: [2022/06/15 09:04:33.603504,  0] ../../source3/nmbd/nmbd.c:901(main)
čen 15 09:04:33 nmbd[805]:   nmbd version 4.16.1 started.
čen 15 09:04:33 nmbd[805]:   Copyright Andrew Tridgell and the Samba Team 1992-2022
čen 15 09:04:33 nmbd[805]: [2022/06/15 09:04:33.605108,  0] ../../lib/util/become_daemon.c:150(daemon_status)
čen 15 09:04:33 nmbd[805]:   daemon_status: daemon 'nmbd' : No local IPv4 non-loopback interfaces available, waiting for interface ...
čen 15 09:04:33 nmbd[805]: [2022/06/15 09:04:33.605295,  0] ../../source3/nmbd/nmbd_subnetdb.c:252(create_subnets)
čen 15 09:04:33 nmbd[805]:   NOTE: NetBIOS name resolution is not supported for Internet Protocol Version 6 (IPv6).
čen 15 09:04:36 kded5[879]: org.kde.plasma.dataengine.geolocation: error:  "Unknown host location.services.mozilla.com: Host not found"
čen 15 09:04:36 kded5[879]: org.kde.plasma.dataengine.geolocation: error:  "Unknown host location.services.mozilla.com: Host not found"
čen 15 09:04:36 smbd[1179]: [2022/06/15 09:04:36.909517,  0] ../../source3/smbd/server.c:1741(main)
čen 15 09:04:36 smbd[1179]:   smbd version 4.16.1 started.
čen 15 09:04:36 smbd[1179]:   Copyright Andrew Tridgell and the Samba Team 1992-2022
čen 15 09:04:59 nmbd[805]: [2022/06/15 09:04:59.882955,  0] ../../source3/nmbd/nmbd_become_lmb.c:398(become_local_master_stage2)
čen 15 09:04:59 nmbd[805]:   *****
čen 15 09:04:59 nmbd[805]: 
čen 15 09:04:59 nmbd[805]:   Samba name server HYPERION-NB is now a local master browser for workgroup WORKGROUP on subnet 10.0.0.22
čen 15 09:04:59 nmbd[805]: 
čen 15 09:04:59 nmbd[805]:   *****
čen 15 10:57:45 login[10283]: gkr-pam: unable to locate daemon control file
čen 15 16:05:00 nmbd[805]: [2022/06/15 16:05:00.171413,  0] ../../source3/libsmb/nmblib.c:923(send_udp)
čen 15 16:05:00 nmbd[805]:   Packet send failed to 10.0.0.255(138) ERRNO=Network is unreachable
čen 15 16:05:00 nmbd[805]: [2022/06/15 16:05:00.181512,  0] ../../source3/libsmb/nmblib.c:923(send_udp)
čen 15 16:05:00 nmbd[805]:   Packet send failed to 10.0.0.255(138) ERRNO=Network is unreachable
čen 15 16:05:00 nmbd[805]: [2022/06/15 16:05:00.183701,  0] ../../source3/nmbd/nmbd.c:359(reload_interfaces)
čen 15 16:05:00 nmbd[805]:   reload_interfaces: No subnets to listen to. Waiting..
čen 15 16:05:00 kernel: nvidia-modeset: ERROR: GPU:0: Failed detecting connected display devices
čen 15 16:05:00 systemd-udevd[21624]: controlC1: /usr/lib/udev/rules.d/78-sound-card.rules:5 Failed to write ATTR{/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/controlC1/../uevent}, ignoring: No such file or directory
čen 15 16:05:16 kernel: ACPI Error: No installed handler for fixed event - PowerButton (2), disabling (20211217/evevent-255)

I had a similar problem with my Asus Vivobook laptop and I managed to solve it by disabling IOMMU in the BIOS (UEFI).
The CPU is an Intel one, so I had to disable VD-t

Now suspend works flawlessly

Edit: I realized that the default sleep mode was s2idle, instead of deep. I’ve changed that by adding a kernel parameter and now the power consumption dropped by a lot.