blog,
@blog@shkspr.mobi avatar

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!

  • sudo /lib/systemd/systemd-sleep suspend
  • sudo echo "mem" > /sys/power/state
  • sudo acpitool -s

The Fix

I found what was causing suspend to fail by running:

  • sudo systemd-analyze verify systemd-suspend.service

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:

nvidia-resume.service -> /lib/systemd/system/nvidia-resume.servicenvidia-suspend.service -> /lib/systemd/system/nvidia-suspend.service

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

For good measure, I also checked what Nvidia stuff I had installed:

  • apt list --installed | grep -i nvidia

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

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 . I couldn't get PXSX to be disabled. But even with everything else off, the suspend didn't work.

Killing Bluetooth with didn't work. Nor did disabling WiFi.

I have an updated Kernel 6.8.0. I'm not sure of the ramifications of swapping to an older one.

Running 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 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

syntaxseed,
@syntaxseed@phpc.social avatar

@blog I had a similar problem last week on Ubuntu. It was an incomplete Snap Store update that was waking my PC up 30s after suspend.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • megavids
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • provamag3
  • JUstTest
  • All magazines