What is Nostr?
Terence Eden’s Blog /
npub1y66…eusx
2024-04-06 11:34:00

Terence Eden’s Blog on Nostr: **Fixing broken suspend on Pop_OS** ...

**Fixing broken suspend on Pop_OS**
https://shkspr.mobi/blog/2024/04/fixing-broken-suspend-on-pop_os/

My Linux laptop used to suspend perfectly. I'd close the lid and it would go to sleep. Open it up, it would spring to life - presenting me with a password screen. But, some time in the last few months, it has stopped doing that.

If I close the lid, it keeps running. This is unhelpful.

If I manually run the suspend command - systemctl suspend - the laptop blanks the screen then immediately turns it back on at the lock screen. It doesn't suspend.

I know that suspend physically works - becasue running any of these other command *does* properly suspend the machine. But powering it back up goes straight to the desktop - no lock screen!<li><code>sudo /lib/systemd/systemd-sleep suspend</code></li><li><code>sudo echo "mem" &gt; /sys/power/state</code></li><li><code>sudo acpitool -s</code></li>##



[The Fix](#the-fix)I found what was [causing suspend to fail](https://github.com/systemd/systemd/issues/21991#issuecomment-1005020257) by running:<li><code>sudo systemd-analyze verify systemd-suspend.service</code></li>

That spat out any errors in the suspend service. Highlighted in red was:systemd-suspend.service: Failed to create systemd-suspend.service/start: Unit nvidia-resume.service is masked.



That was odd, because I don't have an Nvidia graphics card.

Looking in the relevant directory:cd /etc/systemd/system/systemd-suspend.service.requires



I found:<code>nvidia-resume.service -&gt; /lib/systemd/system/nvidia-resume.servicenvidia-suspend.service -&gt; /lib/systemd/system/nvidia-suspend.service</code>

I deleted the nvidia-resume.service and nvidia-suspend.service files.

For good measure, I also checked what Nvidia stuff I had installed:<li><code>apt list --installed | grep -i nvidia</code></li>

I used sudo apt purge to remove the remnants of any Nvidia stuff. Probably installed by mistake.

After that, suspend worked fine.##



[What "Fixes" Didn't Work](#what-fixes-didnt-work)I went down a bit of a rabbit hole, following lots of suggestions from various people on the Internet. None of these helped me - but they may be useful pointers to you.

I tried [disabling everything in /proc/acpi/wakeup](https://www.vegard.net/how-to-suspend-pop-os/). I couldn't get PXSX to be disabled. But even with everything else off, the suspend didn't work.

[Killing Bluetooth with rfkill block bluetooth](https://github.com/pop-os/pop/issues/2356#issuecomment-1987290124) didn't work. Nor did disabling WiFi.

I have [an updated Kernel](https://www.reddit.com/r/pop_os/comments/ukyl7s/suspend_is_not_working_in_2204_lts/) 6.8.0. I'm not sure of the ramifications of swapping to an older one.

Running [sudo kernelstub -a mem_sleep_default=deep](https://github.com/pop-os/pop/issues/1368) and then rebooting didn't make a difference.

Switching from Wayland to X11 didn't fix it. Nor did unplugging the laptop from power. No external peripherals or screens were connected.

The whole system - including Flatpaks and Snaps - was updated.

This [shell script](https://www.reddit.com/r/pop_os/comments/vr7uco/network_manager_wake_requested/jxxm0e4/) works. But there's no way to tie it in to having the power button pressed or the lid closed.

https://shkspr.mobi/blog/2024/04/fixing-broken-suspend-on-pop_os/

#linux #popOs #ubuntu
Author Public Key
npub1y66rre8r3yptrcumrxelkmpr2hd8tpg35rxsx4eqcuejpgj5dgcslreusx