Systemd poweroff.service issue - hangs when not logged in! Any tips?

Hi everyone,

Following a recent update (where I also updated the kernel from 6.1 to 6.6) my system fails to shutdown correctly when the shutdown is initiated by the systemd poweroff.service (via a timer) and when no users are logged in.

Testing shows the issue ONLY appears with linux6.6, no issues with linux6.1.

It only happens when no users are logged in (I can trigger a successful shutdown when I’m logged in with 6.6, either by calling the service directly or if it’s initiated by the systemd timer (while logged in).

However, if I’m logged out, and the associated systemd timer calls the shutdown, the shutdown hangs (indefinitely).

I’ve been through the logs for both successful and failed shutdowns, and at the point at which they seem to deviate, I see this:

Successful shut down:

systemd[1]: Stopping D-Bus System Message Bus…
systemd[1]: dbus.socket: Deactivated successfully.

…(then it continues to shutdown correctly)

Failed Shutdown:

systemd[1]: Stopping D-Bus System Message Bus…
systemd[1]: Listening on D-Bus System Message Bus Socket.
systemd[1]: Rebuild Dynamic Linker Cache was skipped because no trigger condition checks were met.
systemd[1]: Set Up Additional Binary Formats was skipped because no trigger condition checks were met.

…(then a few lines later it seems to restart the D-bus?)

systemd-logind[3307]: New seat seat0.
systemd[1]: Starting D-Bus System Message Bus…

I’m not seeing anything helpful (errors or the like).

Despite googling extensively I’m not really sure where to start in terms of trying to diagnosing the issue. I gathered from other threads I’ve looked at that this maybe kernel related, and my testing seems to corroborate that.

I’m also running libvrt. I mention this as the messages I see onscreen during failed shutdowns hang just after VM shutdown, although the logs don’t report any errors relating to libvrt / VMs.

I was wondering if anyone could anyone point me in the right direction of how to proceed investigating this please?

Thank you.

EDITED: extra info added

Welcome to the Forum!

You seem quite knowledgeable; indeed I’d say definitely kernel issue. I had fairly similar issues (albeit in my case, startup issues and sleep/hibernate were a disaster) with 6.6.26-x, whereas the previous 6.6.25 and later 6.6.32-x and current 6.6.34-1 are fine.

I’d stick with 6.1 for the time being, like I did, until the next update comes out.

Also, it certainly wouldn’t hurt to provide a bit of system info e.g. inxi -zv8 with the output highlighted and pressing the </> button above the edit window.

Cheers! :slight_smile:

ETA: I should also mention that there have been some recent changes in systemd which haven’t been adopted yet in all LTS kernels.

1 Like