Weird behavior on suspend

Hi
Ubuntu-Mate 24.04.4 on this box
If I put on suspend and reactive by touching any key, then it shows the password window. Fine.
Sometime the cursor shows and can input the pw - then back to the active desktop.
Other times it seems to be frozen and no cursor appears - so can’t input the pw and need a hard reboot.
Seems to be random.
Others experience that ?
Any solution to make it work always ?
Thanks
W

3 Likes

i have not, but I seldom put mine into suspend. The only time is if I walk away to long i have it is set to got to suspend.

2 Likes

Never had this problem, but others have.

You might try this:

6 Likes

Thanks TKN I’ll try this.

W

4 Likes

Now… I did as suggested, TKN.
My observation:
If it gets into suspend by itself after some time, then I get the password window and can re-enter the desktop
If I ASK for suspend using the shutdown, then I get the password window but no possibility to enter password and re-enter the desktop
So… two different behaviour.

W

4 Likes

Hi @Watford! I recently had a similar issue on a Zorin laptop that has an Nvidia GPU. If your laptop also has an Nvidia GPU, then this might be worth checking into. If not, it might give you something to look at but may end up not being relevant.

Under the /lib/systemd/system/ folder you should have a /lib/systemd/system/systemd-suspend.service file.

If you have an Nvidia GPU, then you will also have a /lib/systemd/system/nvidia-suspend.service service.

In my situation, this service file was not configured correctly. It was missing the WantedBy= section that used the systemd-suspend.service dependency. So the system would suspend but the GPU would freeze, so the display wouldn’t work until I did a hard reboot.

Here’s what my /lib/systemd/system/nvidia-suspend.service file looks like now:

[Unit]
Description=NVIDIA system suspend actions
Before=systemd-suspend.service

[Service]
Type=oneshot
ExecStart=/usr/bin/logger -t suspend -s "nvidia-suspend.service"
ExecStart=/usr/bin/nvidia-sleep.sh "suspend"

[Install]
WantedBy=systemd-suspend.service

Again, if your system has an Nvidia GPU, then you might want to inspect these two files. If you do not have an Nvidia GPU, then maybe the /lib/systemd/system/systemd-suspend file may still be helpful to look at.

Otherwise, I might suggest looking at the last bootlog after a hard reset with: sudo journalctl -b -1. There might be some helpful output there, and it might be worth sharing here if other efforts don’t work out!

7 Likes

In addition to this, if you have an Nvidia GPU, make sure the nvidia-suspend and nvidia-resume services are enabled.

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

This solved a black screen on resume-from-suspend issue for me.

6 Likes