BunsenLabs (Debian derrivative) won’t shut down (Failed to start poweroff.target: Transaction is destructive)

bunsenlabsshutdownsystemdudev

I stumbled upon a weird behaviour of my BunsenLabs GNU/Linux (which is based on Debian).

Sometimes I cannot turn off the OS. I doesn't matter whether I use sudo poweroff or the GUI approach.

This is what I get after running sudo poweroff:

Failed to start poweroff.target: Transaction is destructive

Is there a workaround? Why is it happening?


Here is the content of my /lib/udev/rules.d/70-power-switch.rules:

ACTION=="remove", GOTO="power_switch_end"

SUBSYSTEM=="input", KERNEL=="event*", SUBSYSTEMS=="acpi", TAG+="power-switch"
SUBSYSTEM=="input", KERNEL=="event*", KERNELS=="thinkpad_acpi", TAG+="power-switch"

LABEL="power_switch_end"

Best Answer

I've been ducking for the solution for a while and finally I've found a solution. It worked for me. I don't know what triggers this weird behaviour though.

This is the recipe for shutting down your Debian:

  1. Run ps aux | grep suspend.
  2. One of the results should be looking like this

    root 3651 0.0 0.0 8668 1716 ? Ss 07:18 0:00 /lib/systemd/systemd-sleep suspend
    
  3. Run sudo kill 3651 or whatever the pid of your result is.

  4. At the first time, I was able to shutdown the PC. The second time the PC went to sleep immediately after the kill command.

It is suggested that you log out of the graphical desktop environment before killing the process.

Source: Ubuntu Forums.

Related Question