Ubuntu 24.04.4 LTS don't shutdown/power off properly since last Friday

Ubuntu Version:
24.04.4 LTS

Desktop Environment (if applicable):
GNOME

Problem Description:
Last Thursday there was some update that brought my system to not shutdown/power off anymore. I have any time to power off manually via power button after freeze. I really can’t tell which update it was. I already opened a Launchpad Bug Thread Bug #2148061 “Ubuntu 24.04.4 LTS shutdown freeze/no poweroff” : Bugs : linux package : Ubuntu . There you can see some more information about my setup.

The system starts and runs very stable and fine but fails on power off. I just get a black screen without any message.

Relevant System Information:
See Bug #2148061 “Ubuntu 24.04.4 LTS shutdown freeze/no poweroff” : Bugs : linux package : Ubuntu

Screenshots or Error Messages:
I posted the latest journal also on the bugtracker. But here my dsmeg:

[  154.737410] Buffer I/O error on dev sr0, logical block 6, async page read
[  154.737411] Buffer I/O error on dev sr0, logical block 7, async page read
[  163.551289] sr 2:0:0:0: [sr0] tag#8 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s
[  163.551294] sr 2:0:0:0: [sr0] tag#8 Sense Key : Not Ready [current] 
[  163.551296] sr 2:0:0:0: [sr0] tag#8 Add. Sense: Medium not present - tray closed
[  163.551298] sr 2:0:0:0: [sr0] tag#8 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[  163.551299] I/O error, dev sr0, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 2 prio class 2
[  163.586240] sr 2:0:0:0: [sr0] tag#9 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s
[  163.586243] sr 2:0:0:0: [sr0] tag#9 Sense Key : Not Ready [current] 
[  163.586245] sr 2:0:0:0: [sr0] tag#9 Add. Sense: Medium not present - tray closed
[  163.586247] sr 2:0:0:0: [sr0] tag#9 CDB: Read(10) 28 00 00 00 00 00 00 00 02 00
[  163.586248] I/O error, dev sr0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 8 prio class 2
[  163.586252] Buffer I/O error on dev sr0, logical block 0, async page read
[  163.586254] Buffer I/O error on dev sr0, logical block 1, async page read
[  163.586255] Buffer I/O error on dev sr0, logical block 2, async page read
[  163.586256] Buffer I/O error on dev sr0, logical block 3, async page read
[  163.586257] Buffer I/O error on dev sr0, logical block 4, async page read
[  163.586258] Buffer I/O error on dev sr0, logical block 5, async page read
[  163.586259] Buffer I/O error on dev sr0, logical block 6, async page read
[  163.586260] Buffer I/O error on dev sr0, logical block 7, async page read

What I’ve Tried:
Tried some workarounds in GRUB or other configs mentioned by AI. Tried older kernels (6.8.0-106 and 6.8.0-101). Cleaned my system a bit (removed docker). Updated systemd and other things last Friday (also a bunch of QEMU updates).

I also tried shutdown and restart without logging into my profile to exclude if it’s affeceted by an program.

Before Posting:
None.

It is looking for your CD/DVD but cannot find a DVD in there.

[  163.586245] sr 2:0:0:0: [sr0] tag#9 Add. Sense: Medium not present - tray closed

Are you using a DVD?

Nope. The Blu Ray drive is always empty.

Let’s have a look. Please show the output of:

sed -n '/Start-Date: 2026-04-09/,/End-Date: 2026-04-09/p' /var/log/apt/history.log

@mylinde Here you are:

johannes@johannes:~$ sed -n '/Start-Date: 2026-04-09/,/End-Date: 2026-04-10/p' /var/log/apt/history.log
Start-Date: 2026-04-09  08:52:38
Commandline: /usr/bin/unattended-upgrade
Upgrade: libgdk-pixbuf2.0-bin:amd64 (2.42.10+dfsg-3ubuntu3.2, 2.42.10+dfsg-3ubuntu3.3), gir1.2-gdkpixbuf-2.0:amd64 (2.42.10+dfsg-3ubuntu3.2, 2.42.10+dfsg-3ubuntu3.3), libgdk-pixbuf-2.0-0:amd64 (2.42.10+dfsg-3ubuntu3.2, 2.42.10+dfsg-3ubuntu3.3), libgdk-pixbuf-2.0-0:i386 (2.42.10+dfsg-3ubuntu3.2, 2.42.10+dfsg-3ubuntu3.3), libgdk-pixbuf2.0-common:amd64 (2.42.10+dfsg-3ubuntu3.2, 2.42.10+dfsg-3ubuntu3.3)
End-Date: 2026-04-09  08:52:42
Start-Date: 2026-04-09  08:52:44
Commandline: /usr/bin/unattended-upgrade
Upgrade: libssl-dev:amd64 (3.0.13-0ubuntu3.7, 3.0.13-0ubuntu3.9), libssl3t64:amd64 (3.0.13-0ubuntu3.7, 3.0.13-0ubuntu3.9), libssl3t64:i386 (3.0.13-0ubuntu3.7, 3.0.13-0ubuntu3.9), openssl:amd64 (3.0.13-0ubuntu3.7, 3.0.13-0ubuntu3.9)
End-Date: 2026-04-09  08:52:48

Start-Date: 2026-04-10  11:08:33
Commandline: /usr/bin/unattended-upgrade
Upgrade: qemu-system-x86:amd64 (1:8.2.2+ds-0ubuntu1.14, 1:8.2.2+ds-0ubuntu1.16), qemu-system-modules-opengl:amd64 (1:8.2.2+ds-0ubuntu1.14, 1:8.2.2+ds-0ubuntu1.16), qemu-system-modules-spice:amd64 (1:8.2.2+ds-0ubuntu1.14, 1:8.2.2+ds-0ubuntu1.16), qemu-system:amd64 (1:8.2.2+ds-0ubuntu1.14, 1:8.2.2+ds-0ubuntu1.16), qemu-utils:amd64 (1:8.2.2+ds-0ubuntu1.14, 1:8.2.2+ds-0ubuntu1.16), qemu-system-s390x:amd64 (1:8.2.2+ds-0ubuntu1.14, 1:8.2.2+ds-0ubuntu1.16), qemu-system-mips:amd64 (1:8.2.2+ds-0ubuntu1.14, 1:8.2.2+ds-0ubuntu1.16), qemu-system-misc:amd64 (1:8.2.2+ds-0ubuntu1.14, 1:8.2.2+ds-0ubuntu1.16), qemu-system-common:amd64 (1:8.2.2+ds-0ubuntu1.14, 1:8.2.2+ds-0ubuntu1.16), qemu-block-extra:amd64 (1:8.2.2+ds-0ubuntu1.14, 1:8.2.2+ds-0ubuntu1.16), qemu-system-arm:amd64 (1:8.2.2+ds-0ubuntu1.14, 1:8.2.2+ds-0ubuntu1.16), qemu-system-sparc:amd64 (1:8.2.2+ds-0ubuntu1.14, 1:8.2.2+ds-0ubuntu1.16), qemu-system-data:amd64 (1:8.2.2+ds-0ubuntu1.14, 1:8.2.2+ds-0ubuntu1.16), qemu-system-gui:amd64 (1:8.2.2+ds-0ubuntu1.14, 1:8.2.2+ds-0ubuntu1.16), qemu-system-ppc:amd64 (1:8.2.2+ds-0ubuntu1.14, 1:8.2.2+ds-0ubuntu1.16)
End-Date: 2026-04-10  11:08:42

I also added the Friday.

maybe qemu mounts the DVD drive?

QEMU VMs often fail to shut down when a DVD/CD-ROM is mounted because the guest OS locks the device or fails to unmount it properly during shutdown, leaving the process hung. To resolve this, force a shutdown via virsh destroy <vmname>, use kill -9 <pid> on the host, or eject the ISO in the QEMU monitor before powering off.

Hm, maybe but it shouldn’t run if I don’t use it. I use the Windows VM not that much - more rarely. But I can’t see any drive in the VM preferences.

Edit: I also disabled all QEMU services to test if the problem is here. But I think I will remove QEMU and use Virtualbox instead because for only one VM such a big thing like QEMU…

some process is holding /dev/sr0 hostage … Try, sudo lsof /dev/sr0

The lsof (list open files) is used to identify which processes are accessing a DVD drive.

If you find a process, sudo kill -9 <PID>, then you can safely eject /dev/sr0

I remove QEMU now and no change. The lsof-List also shows no processes that accessing my BD-Drive:

johannes@johannes:~$ sudo lsof /dev/sr0
[sudo] Passwort für johannes: 
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
      Output information may be incomplete.
lsof: WARNING: can't stat() fuse.portal file system /run/user/1000/doc
      Output information may be incomplete.
lsof: WARNING: can't stat() fuse.SeaDrive.AppImage file system /tmp/.mount_SeaDri5aJO1B
      Output information may be incomplete.
lsof: WARNING: can't stat() fuse.seadrive file system /home/johannes/SeaDrive
      Output information may be incomplete.

But as I already said: I also tested shutdown and restart without logging into my profile. So it avoids any apps that could access the drive while shutdown/restart. And it was no problem til the last updates of last Thursday and Friday.

Unload the module and try a shutdown.

sudo modprobe -r sr_mod

you have seadrive AppImage, not sure if this is causing issues.

@mylinde Can’t do this:

johannes@johannes:~$ sudo modprobe -r sr_mod
modprobe: FATAL: Module sr_mod is builtin.

Edit: I unplugged the BD-Drive and it did nothing. It’s not the drive I think it libmount because sometimes I can see a Kernel Panic with libmount. You can see a photo in the bug tracker.

you should not get kernel panic with libmount1

user@u24:~$ apt policy libmount1
libmount1:
  Installed: 2.39.3-9ubuntu6.5
  Candidate: 2.39.3-9ubuntu6.5
  Version table:
 *** 2.39.3-9ubuntu6.5 500
        500 http://us.archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu noble-security/main amd64 Packages
        100 /var/lib/dpkg/status
     2.39.3-9ubuntu6 500
        500 http://us.archive.ubuntu.com/ubuntu noble/main amd64 Packages

qemu i still running? Try stopping libvrtd service und shutdown.

sudo systemctl stop libvirtd

Just because I’ve made the mistake of (erroneously) attributing faulty behavior to the most recent update, how long was your machine up, including sleep/hibernation, before that reboot attempt last Friday? You can use journalctl -b <offset> (e.g. -b -1 means boot before last) to help finding the boot prior to the first bad shutdown. That should establish the time frame in which the change that prevents power-off can have happened.

I tend to have quite long uptimes and only suspend to RAM (S3) my laptop, most of the time, so periods in which a change like that might happen tend to span multiple unattended-upgrade cycles. And I often found that it was some change I made myself, totally unrelated to what I had initially thought to be the cause. So, best be sure that it couldn’t have been anything else. :wink:

sudo snap refresh to make sure you have the latest libmount.so.1

@pavlos But sadly I get Kernel Panic. But all snaps are up-to-date.

@mylinde Not anymore. I uninstalled QEMU only just.

@peterwhite23 My PC is only up as long as I need it. Mostly a couple of hours. I shut down my PC completely every time.

OK, and you have changed nothing else on your system in the time frame in question? And, since unplugging the Bluray drive changed nothing, I think we can rule that out. At some point, albeit very late, during shutdown, logging stops working, so you may not even see what’s happening after that and those last messages are thus, maybe, not related to the issue.
Have you tried waiting a few minutes? Sometimes some shutdown jobs take longer. Maybe pressing the Home key can reveal some console output to show systemd waiting for some job to finish with a timeout counter.

I do vaguely remember that I had a similar problem a long time ago. The shutdown was clean but the final poweroff wasn’t happening; I had to manually hit the power switch. But I cannot remember how I fixed it, but I believe it was some BIOS/UEFI interaction that failed; any firmware updates in that time? Perhaps your shutdown command changed from shutdown --poweroff now to shutdown --halt now, somehow?

user@u24:~$ snap list
Name                       Version                         Rev    Tracking         Publisher   Notes
bare                       1.0                             5      latest/stable    canonical✓  base
core22                     20260225                        2411   latest/stable    canonical✓  base
core24                     20260317                        1587   latest/stable    canonical✓  base
firefox                    149.0.2-1                       8107   latest/stable/…  mozilla✓    -
firmware-updater           0+git.9e387e4                   224    1/stable/…       canonical✓  -
gnome-42-2204              0+git.c1d3d69-sdk0+git.015db9a  247    latest/stable/…  canonical✓  -
gnome-46-2404              0+git.f1cd5fa-sdk0+git.ca9c59c  153    latest/stable    canonical✓  -
gtk-common-themes          0.1-81-g442e511                 1535   latest/stable/…  canonical✓  -
mesa-2404                  25.0.7-snap211                  1165   latest/stable    canonical✓  -
snap-store                 0+git.515109e7                  1310   2/stable/…       canonical✓  -
snapd                      2.74.1                          26382  latest/stable    canonical✓  snapd
snapd-desktop-integration  0.9                             361    latest/stable/…  canonical✓  -

then
-rw-r--r-- 1 root root 309960 Jan 13 08:37 /snap/gnome-46-2404/153/usr/lib/x86_64-linux-gnu/libmount.so.1.1.0

do you have the same libmount.so ?

Are you running any other hypervisor’s, and if so, which one(s). Do you host any VM’s that auto start?