Shutdown does not work sometimes

In 1 of 10 times when i shut down my PC (via menu), it does not work.
What happens is the icon theme will vanish and it goes to a very basic looking icon theme
here’s a screen of the taskbar: https://imgur.com/a/QhNcM

Also I can’t open a terminal or anything. I can’t open anything from the menu.
I either have to press the on/off button, then it will shut down immediately
or if I wait for ~30 seconds it will also shut down.

This problem accures on a PC running 16.04.2 LTS and on a notebook running 16.10
I think I even had this problem even once in a virtual machine
Is this problem know. Do others have that too?

( Don’t know if it is related to that problem.
After startup sometimes the “show desktop” , calender/clock, “desktop switcher”
icons on the taskbar will stay black and are not usable )

Hi

Well, it's known and some others including me have experienced it, however I'm not sure if the people able to do something about it are aware.

Therefore highlight! @Wimpy, @lah7

See if these scripts work as they do for me.

#!/bin/bash
# 
#  Shutdown computer  

echo password | sudo -S sudo shutdown -h now


#!/bin/bash
# 
#    Reboot computer

echo password | sudo -S sudo reboot

For the record, I don’t recommend having your password stored in cleartext in a file.

2 Likes

8 posts were split to a new topic: Security and windows

@fixit7

The use of “sudo” in shutdown or reboot is not necessary.

small mistake, i meant 1 out of 10 times, not 9 out of 10 - that would really suck.

That problem also might be releated to the topic “PC takes forever to shutdown”
where you have to edit a file so that it waits for maximum 10 seconds

That would happen every time you shutdown and not just once in a while. Try shutting down in terminal and look for errors or a hanging process.

Code:

shutdown -h now

May take a while to catch it.

Thanks v3xx.

I have made changes to my scripts.