Score:2

After upgrading Ubuntu from 18.04 to 20.04, `systemctl suspend` no longer works

cn flag
mjz

I have Ubuntu 20.04 installed on a desktop Dell machine. I access it through XRDP and SSH for routine use.

It has been hugely convenient with Ubuntu 18.04 to suspend the system using the systemctl suspend command and then resume the next day using a magic packet wake-on-LAN. A few seconds and I am back where I left off.

After the upgrade to Ubuntu 20.04, systemctl suspend would no longer function properly; the system tries to stop, but a second or two later, it resumes on its own. I suspect a process is preventing suspend:

$ sudo systemd-inhibit --list --mode=block
WHO UID USER PID  COMM           WHAT                                                    
gdm 125 gdm  1406 gsd-media-keys handle-power-key:handle-suspend-key:handle-hibernate-key>

After a bit of research, I tried:

echo mem | sudo tee /sys/power/state

to override the inhibit, which did stop the machine (although the power button remained lit instead of blinking like it did before). However, unfortunately, the IP address was changed on resume, creating a big mess. I use DHCP on my ISP's modem/router. I can't seem to fix the IP address and keep it static.

Is there some way to get systemctl suspend to work properly? A possible workaround is to find a way to keep the IP address from changing (manually setting the IP address statically didn't work).

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.