My Ubuntu 16.04 hangs on shutdown/restart requiring me to press and hold the power key to turn the machine off... I don't know how to report this as a bug and what commands to run to show the necessary hardware/sys log info? Any help would be hugely appreciated!
I too had this issue. It appears to be a bug in multiple distributions.
My simple fix was to edit
/etc/default/grub
line:to
Run
update-grub
.Works every time now. I use a Lenovo G50 laptop. I'm pretty sure I changed this line in Grub with previous (other) linux distros on this laptop too.
Once you have finished your work and completed closing all your applications in order to shutdown or reboot your OS please follow these steps to alleviate frustrations.
sudo swapoff -a && systemctl poweroff
as a workaround for now./usr/share/doc/systemd/README.Debian.gz
to check if there are any hanging jobs at shutdown. You will need to start the debug shell prior to each shutdown or reboot by entering:systemctl start debug-shell
Capturing a screen photo ofjournalctl -b
in the rescue shellctl+alt+F9
might be enlightening. Also the output ofsystemctl list-jobs
andsystemctl --failed
Besides a screen shot you can dump the output of these commands and appended each into the same "filename.text" on/
root by adding>>filename.text
at the end of the commands e.g.journalctl -b >>filename.text
journalctl -xe >>filename.text
systemctl list-jobs >>filename.text
systemctl --failed >>filename.text
lsblk >>filename.text
All of these will be in the same file appended together for you to analyze upon your next boot and if you do file a bug report it can be helpful to attach the file into your bug report.Update
I had these Hangs for quite a while but was eventually at a point where I learned my HDD was beginning to fail sectors etc. So, it was time for a new HDD and reinstall. I reinstalled the OS on a single boot HDD with Swap as the 1st, Root as 2nd, and Home as 3rd logical partitions as per recommendations from Ubuntu. Technically, sda1 is Grub, sda2 is Extended, sda5, sda6, sda7 are swap, root, and home respectively; sda3 and sda4 are not present. This problem has not been present on the newly installed OS on the HDD since then, 9+ months approximately. I am running 16.04.02 LTS at this point without any of the Hangs on restart or shutdown. The previous OS was a dual install Win7/Ubuntu and the Swap partition was at the end of the HDD.
I am not stating that this problem is tied to a dual boot system, a failing HDD, or the order in which I placed the partitions but, in my case one, two, or all of these factors existed. Now, I do not suffer the aggravation of the "Reached Target Shutdown" hang.
I had an issue with hanging on shutdown, this is what I did:
OPEN TERMINAL
Change the line:
to
By removing
quiet
andsplash
allows text during shutdown, helps to see where the hang may be.Save and close Gedit
Then update Grub in terminal:
ADDITIONAL:
I noticed I had a 'STOP JOB' running too, so I reduce the timeout in
/etc/systemd/system.conf
:remove
#
and change timings in the following lines:Then run:
This worked for me.
I've tried almost all suggestions here. The only action that solved my same problem of shutdown/reset was changing
DefaultTimeoutStartSec
&DefaultTimeoutStopSec
in/etc/systemd/system.conf
to '10':and then edit to
I was just experiencing somewhat the same issue, restarting would take me to a black screen or sometimes a black screen with blinking cursor and it would never accomplish, I have to note I didn't have a problem with shut down.
So what I did was, I opened Drive Manager, and I installed Intel-Microcode firmware for the CPU, I shutdown the computer, and then I tired restarting the OS, and it finally worked.
I'm on Linux Mint Cinnamon 18.3 which is based on Ubuntu Xenial Xerus 16.04 LTS.
Adding the comment of user ssasa in the answer since it could help others and might get purged with the "no longer needed" flag:
Tdenham. I have the same situation. I just updated the system from 14.04 to 16.04 with
do-release-upgrade -d
.If you don't have direct access to the system, and you really need to reboot, you might try hard reset as a workaround (as described here: https://major.io/2009/01/29/linux-emergency-reboot-or-shutdown-with-magic-commands/)
which does the trick. Probably you should run
sync
right before second command.reboot -f
may help but I didn't try it as I can't access server if it hangs again.You may check /var/log/syslog file. Find the place where you turn on the computer and check lines right before that. You may paste it here.
My syslog:
It seems that dhclient tries to achieve ip address even when reboot is requested.
In case this is a hardware-dependent issue I pasted output of
lspci
, to help troubleshut it.I tried several methods including: editing
/etc/default/grub
, runsudo swapoff -a
before shutdown, etc... But none of those worked for me.Turning off
USB 3.0 legacy mode
in the BIOS worked for me.My solution is here
But in simple words:
sudo vim /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="noefi"
I had this problem on my ASUS Zenbook UX433FN and the solution I used was to update the BIOS. The BIOS version I had was 301 and updated it to 305. All these issues disappeared right after this updated.
I then reinstalled Ubuntu 18.04 and then installed NVIDIA drivers without any issues.
Note: I suggest installing the NVIDIA drivers BEFORE any other updates to verify if NVIDIA drivers can be successfully installed without interference of anything else.