Talk: System is frozen after resume from suspend, when a virtual machine is running

This is a discussion topic for the following Common Issue:

You can discuss the problem and its solutions here, but please note that debugging and technical feedback should primarily go to the issue trackers (e.g. Bugzilla) linked in the Common Issue, because that’s the place that developers watch, not here.

If there are any updates/changes/amendments for the Common Issue description, which you believe should be performed, please post it here.

1 Like

Please see the Common Issue for solution/workarounds:

1 Like

The bug report contains a suggestion for a workaround that doesn’t require sshd, knowing your machine’s IP and login credentials, and a second device to SSH from:

Synthesizing from several comments (1, 2, 3), the workaround is

sudo systemctl edit --stdin --drop-in=50-keep-warm.conf systemd-suspend.service <<EOF
[Service]
Environment=SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=0
EOF

This is in line with what systemd suggests in its NEWS file, although that also suggests modifying systemd-homed.service like so:

sudo systemctl edit --stdin --drop-in=50-keep-warm.conf systemd-suspend.service <<EOF
[Service]
Environment=SYSTEMD_HOME_LOCK_FREEZE_SESSION=0
EOF

Finally, to apply those changes, one needs to do systemctl daemon-reload (or reboot).

I haven’t been able to find any information on what it means, in practical terms, to not “freeze the session”. If someone else could explain that, I’d be very grateful.

(For example, if there’s security implications, users would probably like to know. I know I would)

Added freeze, libvirt, suspend-resume, virt-manager, virtualization

I updated the issue description with the workaround (tested to be working). Unfortunately I don’t know what the drawbacks are. My assumption is that in an S2idle suspend, unfrozen services could possibly use some system power or wake up the machine, but that’s just my speculation.

Hi, since this workaround, laptop screen do not suspend…

You have to be a bit more specific than that. What happens exactly when you run systemctl suspend in a terminal?