Ubuntu – Ubuntu 13.04 will not shutdown

13.04shutdown

I have just upgraded my computer from ubuntu 12.10 to ubuntu 13.04, and now when I go to turn off my computer, it will not shut down fully. The Power supply keeps running, even when it is "off"
Any suggestions please?

Best Answer

I modified the script responsible for sending the kill signal with allocated delay, /etc/init.d/sendsigs, and reduce the amount of time it does to kill the remaining processes in 2 iteration. Healthy or not it gets the job done on my system and is no longer hanging on shutdown and restart.

Below is a portion of the /etc/init.d/sendsigs with modification indicated by # <--- :

# Kill all processes.
log_action_begin_msg "Asking all remaining processes to terminate"
killall5 -15 $OMITPIDS # SIGTERM
log_action_end_msg 0
alldead=""
OMITPIDS0="$OMITPIDS"
#for seq in 1 2 3 4 5 6 7 8 9 10; do  # this is the original line
for seq in 1 2; do     # <--- the above line is replaced by this one.

then on the lower part of the script:

# Upstart has a method to set a kill timeout and so the job author
# may want us to wait longer than 10 seconds (as in the case of 
# mysql). (LP: #688541)
#
# We will wait up to 300 seconds for any jobs in stop/killed state. 
# Any kill timeout higher than that will be overridden by the need 
# to shutdown. NOTE the re-use of seq from above, since we already 
# waited up to 10 seconds for them.
while [ -n "$(upstart_killed_jobs)" ] ; do
    seq=$(($seq+1))
    #if [ $seq -ge 300 ] ; then # this is the original line
    if [ $seq -ge 2 ] ; then   # <--- I can't wait for another 300 iteration 
        break
    fi

NOTE: This may not be the best solution since the original script is working on other systems, for those systems like mine where several suggested solutions did not apply - this is what I can share considering I am only running the system as a workstation with no critical services running after closing all the desktop applications I use before clicking on the shutdown or restart icon.

System in use is an Asus X550DP laptop.

Related Question