Ubuntu 20.04 LTS locks up in shutdown (UEFI)

If I shutdown my Laptop (Lenovo ideapad 100) it freezes and won't shut down. I also have this problem in other distros like Deepin or Debian.

I've take me some time and googled about it.

I have tried to edit the grub file and replaced "quiet splash" with "quiet splash acpi=force". Doesn't Work.


Results from command sudo journalctl -b -1 -e:

Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: run-snapd-ns.mount: Succeeded.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: Unmounted /run/snapd/ns.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: Stopped target Swap.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: Deactivating swap /swapfile...
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: swapfile.swap: Succeeded.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: Deactivated swap /swapfile.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: snap-discord-109.mount: Succeeded.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: Unmounted Mount unit for discord, revision 109.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: snap-gnome\x2d3\x2d28\x2d1804-116.mount: Succeeded.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: Unmounted Mount unit for gnome-3-28-1804, revision 116.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: snap-gnome\x2d3\x2d34\x2d1804-24.mount: Succeeded.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: Unmounted Mount unit for gnome-3-34-1804, revision 24.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: snap-gnome\x2d3\x2d34\x2d1804-27.mount: Succeeded.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: Unmounted Mount unit for gnome-3-34-1804, revision 27.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: snap-gtk\x2dcommon\x2dthemes-1506.mount: Succeeded.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: Unmounted Mount unit for gtk-common-themes, revision 1506.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: snap-snap\x2dstore-433.mount: Succeeded.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: Unmounted Mount unit for snap-store, revision 433.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: snap-snapd-7264.mount: Succeeded.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: Unmounted Mount unit for snapd, revision 7264.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: Stopped target Local File Systems (Pre).
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: Reached target Unmount All Filesystems.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: systemd-tmpfiles-setup-dev.service: Succeeded.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: Stopped Create Static Device Nodes in /dev.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: systemd-sysusers.service: Succeeded.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: Stopped Create System Users.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: systemd-remount-fs.service: Succeeded.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: Stopped Remount Root and Kernel File Systems.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: Reached target Shutdown.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: Reached target Final Step.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: systemd-poweroff.service: Succeeded.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: Finished Power-Off.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: Reached target Power-Off.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd[1]: Shutting down.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd-shutdown[1]: Syncing filesystems and block devices.
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd-shutdown[1]: Sending SIGTERM to remaining processes...
Apr 29 11:53:39 marcel-lenovo-ubuntu systemd-journald[316]: Journal stopped

I don't know what's wrong with that. It's just freezing and doesn't completely shut down

Outputs from

@nobody

    journalctl -b -1 -e
Mär 07 10:18:28 Guilmon systemd[1]: Deactivated swap /dev/disk/by-uuid/927f38a0-c962-47de-9361-f1730032704e.
Mär 07 10:18:28 Guilmon systemd[1]: media-debian\x2dhome\x2dpartition.mount: Succeeded.
Mär 07 10:18:28 Guilmon systemd[1]: Unmounted /media/debian-home-partition.
Mär 07 10:18:28 Guilmon systemd[1]: systemd-fsck@dev-disk-by\x2duuid-1ebf0f02\x2dcdd8\x2d44d9\x2d80f9\x2d7078de79e191.service: Succeeded.
Mär 07 10:18:28 Guilmon systemd[1]: Stopped File System Check on /dev/disk/by-uuid/1ebf0f02-cdd8-44d9-80f9-7078de79e191.
Mär 07 10:18:28 Guilmon systemd[1]: home.mount: Succeeded.
Mär 07 10:18:28 Guilmon systemd[1]: Unmounted /home.
Mär 07 10:18:28 Guilmon systemd[1]: Reached target Unmount All Filesystems.
Mär 07 10:18:28 Guilmon systemd[1]: systemd-fsck@dev-disk-by\x2duuid-3bbf1ad8\x2db0d0\x2d464e\x2da73b\x2d9337e16d95d0.service: Succeeded.
Mär 07 10:18:28 Guilmon systemd[1]: Stopped File System Check on /dev/disk/by-uuid/3bbf1ad8-b0d0-464e-a73b-9337e16d95d0.
Mär 07 10:18:28 Guilmon systemd[1]: Removed slice system-systemd\x2dfsck.slice.
Mär 07 10:18:28 Guilmon systemd[1]: Stopped target Local File Systems (Pre).
Mär 07 10:18:28 Guilmon systemd[1]: systemd-tmpfiles-setup-dev.service: Succeeded.
Mär 07 10:18:28 Guilmon systemd[1]: Stopped Create Static Device Nodes in /dev.
Mär 07 10:18:28 Guilmon systemd[1]: systemd-sysusers.service: Succeeded.
Mär 07 10:18:28 Guilmon systemd[1]: Stopped Create System Users.
Mär 07 10:18:28 Guilmon systemd[1]: systemd-remount-fs.service: Succeeded.
Mär 07 10:18:28 Guilmon systemd[1]: Stopped Remount Root and Kernel File Systems.
Mär 07 10:18:28 Guilmon systemd[1]: Reached target Shutdown.
Mär 07 10:18:28 Guilmon systemd[1]: Reached target Final Step.
Mär 07 10:18:28 Guilmon systemd[1]: systemd-poweroff.service: Succeeded.
Mär 07 10:18:28 Guilmon systemd[1]: Finished Power-Off.
Mär 07 10:18:28 Guilmon systemd[1]: Reached target Power-Off.
Mär 07 10:18:28 Guilmon systemd[1]: Shutting down.
Mär 07 10:18:28 Guilmon systemd-shutdown[1]: Syncing filesystems and block devices.
Mär 07 10:18:28 Guilmon systemd-shutdown[1]: Sending SIGTERM to remaining processes...
Mär 07 10:18:28 Guilmon systemd-journald[319]: Journal stopped

what @nobody try to fix it

  • disable ondemand.service #in debian I have not such service
  • add mds=full bootoption #because of MDS CPU bug present and SMT on, data leak possible
  • disable wake on lan #in uefi

Note my Sytems boot in bios mode (legacy only in uefi); my kernel is 5.4 kerneltree, not hw stack.

nobody's dmesg


There seem to be a number of reasons for Ubuntu not to complete shutdown. As examples:

  1. Encrypted swap.
  2. Bug #1464917.
  3. CMOS corruption.

There seem to be also a number of things you can try. As examples:

  1. Waiting for 35 minutes after shutdown, in case a timeout of 30 minutes is in place. Then, execute sudo journalctl -b -1 -e as you did (it is not clear if you did wait for the 35 minutes).
    Post in the question the results.
  2. This solution (no need to copy entirely here since it is in askubuntu)
    sudo swapoff -a prior to shutdown.
    Post in the question the results.
  3. Post in the question a screen capture or photo of the point where the system freezes.
  4. This solution (no need to copy here since it is in askubuntu).
  5. Check if swap is encrypted:
    If swapon --summary returns a description line for the swap, then it is encrypted, if it returns only the header line, then it is not.
    If sudo blkid | grep swap returns a description of the swap, then it is encrypted.
    Post in the question the results.
  6. Using GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=off" in grub (ref).
    Post in the question the results.

Additional information would be useful for you to Post:

  1. uname -a
  2. What ways are you using to shutdown?

As per the output you show, and comparing to this, it appears that swap encryption may be the cause. I will wait until you post the extra info mentioned above (see "Post..." above).

Related:

  1. ubuntu 20.04 desktop does not shut down
  2. https://www.reddit.com/r/linux4noobs/comments/isi3wx/shutdown_is_unable_to_power_off_system_in_ubuntu/
  3. https://forums.linuxmint.com/viewtopic.php?t=318330
  4. https://ubuntu-mate.community/t/17-10-shutdown-swap-issue/15458
  5. https://feeding.cloud.geek.nz/posts/encrypted-swap-partition-on/