Can't shutdown xubuntu after updating to 16.04
I updated from Xubuntu 16.04 beta-2 to 16.04 today. And now I can't shutdown my laptop but I am able to restart. When I try it the GUI way it just logging out.
When I tried
sudo shutdown -h now
I got the following error:
Failed to start poweroff.target: Transaction is destructive.
See system logs and 'systemctl status poweroff.target' for details.
Output of /var/log/messages
:
tail /var/log/messages
tail: cannot open '/var/log/messages' for reading: No such file or directory
Output of systemctl status poweroff.target
● poweroff.target - Power-Off
Loaded: loaded (/lib/systemd/system/poweroff.target; disabled; vendor preset:
Active: inactive (dead)
Docs: man:systemd.special(7)
The accepted answer sudo init 0
doesn't work for me in Xubuntu based in Ubuntu 16.04.
While waiting for a patch this is how I can shutdown my laptop:
Using poweroff
-
sudo poweroff -f
-f to force the computer to shutdown without contacting the init system.
Detecting the process that prevents the computer to shutdown
In my case there is always the tty process that blocks the poweroff process. So detecting it, killing the process and starting the systemctl target.
-
ps aux | grep tty
root 983 0.0 0.0 15408 1128 ? Ss 11:49 0:00 /bin/systemd-tty-ask-password-agent --wall
Kill the process:
sudo kill 983
Shutdown the computer: First
sudo systemctl start poweroff.target
and if it fails execute the command again:sudo systemctl start poweroff.target
.
Related questions
- Debian won't shut down (Failed to start poweroff.target: Transaction is destructive)
- Ubuntu 16.04 won't power off: poweroff.target is disabled
I have same problem in my laptop dell Inspiron 5110. After tried this, my computer shutdown normaly
sudo init 0