Kodi Community Forum
Shutting down fails - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Mac OS X (https://forum.kodi.tv/forumdisplay.php?fid=56)
+---- Thread: Shutting down fails (/showthread.php?tid=197207)



Shutting down fails - IIINeOIIINL - 2014-06-06

Choosing the shutdown option in XBMC doesn't work all the time. 80% percent of the time XBMC only is stopped without shutting down the mac mini.
This is happening for a while, but I didn't had the time to post a thread with a log.
XBMC Gotham 13.1-BETA2, but did also happen with previous version.
MAC Mini late 2009, OSX Mounain lion

Anyone any idea?

XBMC log


RE: Shutting down fails - wgstarks - 2014-06-06

I find that pressing "S" on a keyboard or mapped remote button and choosing "Exit" is much more reliable.


RE: Shutting down fails - IIINeOIIINL - 2014-06-06

Primairly I don't use the keyboard, but a PS3 BT remote control.
I assume that choosing shutdown through the menu will call the same method as pressing S on the keyboard.

Hopefully some one can find some error in the debug post in post 1


RE: Shutting down fails - IIINeOIIINL - 2014-06-08

Anyone an idea?


Shutting down fails - Memphiz - 2014-06-08

it says "computer is going to shutdown" - have a look in osx own log files and see if you can find anything which prevents it to happen...


RE: Shutting down fails - desepticon - 2014-06-08

Why even shutdown the mini (or even quit XBMC)? I keep mine on for months at a time. It uses very little power. Perhaps your needs differ but I need mine on to run rTorrent, Couchpotato, Sickbeard, SABnzbX and Plex Media Server among other things. My mini is a dedicated entertainment box/server/streamer and must be on at all times to function properly.

For those times it actually needs to be rebooted or shutdown I just do it over ssh. Or you could just use screen sharing if you want to do it through the GUI.

OS X is generally very stable and Minis are very power friendly so no real need to do shutdowns often.


RE: Shutting down fails - IIINeOIIINL - 2014-06-08

(2014-06-08, 21:18)desepticon Wrote: Why even shutdown the mini (or even quit XBMC)? I keep mine on for months at a time. It uses very little power. Perhaps your needs differ but I need mine on to run rTorrent, Couchpotato, Sickbeard, SABnzbX and Plex Media Server among other things. My mini is a dedicated entertainment box/server/streamer and must be on at all times to function properly.

For those times it actually needs to be rebooted or shutdown I just do it over ssh. Or you could just use screen sharing if you want to do it through the GUI.

OS X is generally very stable and Minis are very power friendly so no real need to do shutdowns often.

The mini is only used for media playback with xbmc, sickbeard and couchpotato are on my Nas, so personally I don't see the need for leaving it on, but you're right the mini is power friendly.

Still I'm going to find the problem in the osx logs, problems as this needs to be located.


RE: Shutting down fails - desepticon - 2014-06-08

If you turn verbose boot on with

sudo nvram boot-args="-v"

then do a reboot you can see which processes are hanging on shutdown. I'm not sure how XBMC calls shutdown but the issue is probably some kind of timeout error.

Turn off verbose boot with

sudo nvram boot-args=

If you can't figure that out you could map a shutdown script to a button if your remote supports it.
Something like:

#!/bin/bash
killall -9 XBMC
sudo shutdown -h now

To make it not need a password use the NOPASSWD option in the /etc/sudoers file. You'll want a line in there like:

<username> ALL = NOPASSWD: /usr/bin/shutdown

Or an bash/applescript:

#!/bin/bash
osascript -e 'tell application "System Events"' -e 'shut down' -e 'end tell'


RE: Shutting down fails - IIINeOIIINL - 2014-06-08

(2014-06-08, 22:27)desepticon Wrote: If you turn verbose boot on with

sudo nvram boot-args="-v"

then do a reboot you can see which processes are hanging on shutdown. I'm not sure how XBMC calls shutdown but the issue is probably some kind of timeout error.

Turn off verbose boot with

sudo nvram boot-args=

If you can't figure that out you could map a shutdown script to a button if your remote supports it.
Something like:

#!/bin/bash
killall -9 XBMC
sudo shutdown -h now

To make it not need a password use the NOPASSWD option in the /etc/sudoers file. You'll want a line in there like:

<username> ALL = NOPASSWD: /usr/bin/shutdown

Or an bash/applescript:

#!/bin/bash
osascript -e 'tell application "System Events"' -e 'shut down' -e 'end tell'

Thanks for the tips! Certainly will give it a try, dunno about the mapping but I think using an apppescript is the easiest way, but still normal shutting through the menu should be possibleBlush


RE: Shutting down fails - IIINeOIIINL - 2014-06-09

Found out in the osx logs a lot of: cgxgetconnectionproperty invalid connection.
After googling found out that it could be related to the slow shutting down problem. Link
Actions that other users advises: empty the login list.
Clear the cache directory (Mine was 500 mb+)
Also reduced some exit time outs of some service

I'll keep you guys informed about the progress, because the problem doesn't appear all the time.


RE: Shutting down fails - IIINeOIIINL - 2014-06-16

Updated OSX last weekend to 10.8.5.
The shutting down problem didn't appear so far....fingers crossed