Shutting down fails

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
IIINeOIIINL Offline
Member
Posts: 71
Joined: Jun 2008
Reputation: 0
Location: Netherlands
Post: #1
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
(This post was last modified: 2014-06-06 22:32 by IIINeOIIINL.)
find quote
wgstarks Offline
Posting Freak
Posts: 1,005
Joined: Jun 2013
Reputation: 6
Location: North Carolina, USA
Post: #2
I find that pressing "S" on a keyboard or mapped remote button and choosing "Exit" is much more reliable.

[Image: all-thin-banner.jpg]
MacMini5,2 HTPC (Gotham 13.2/Aeon Nox Redux 5.1.4/MacOSX 10.8.5)/Onkyo TXNR609/Panny65VT30
find quote
IIINeOIIINL Offline
Member
Posts: 71
Joined: Jun 2008
Reputation: 0
Location: Netherlands
Post: #3
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
find quote
IIINeOIIINL Offline
Member
Posts: 71
Joined: Jun 2008
Reputation: 0
Location: Netherlands
Post: #4
Anyone an idea?
find quote
Memphiz Offline
Team-Kodi Developer
Posts: 10,942
Joined: Feb 2011
Reputation: 113
Location: germany
Post: #5
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...

AppleTV2/iPhone/iPod: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for XBMC: Wiki NFS
HowTo configure avahi (zeroconf): Wiki Avahi
READ THE IOS FAQ!: iOS FAQ
find quote
desepticon Offline
Junior Member
Posts: 45
Joined: Jul 2013
Reputation: 0
Post: #6
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.
find quote
IIINeOIIINL Offline
Member
Posts: 71
Joined: Jun 2008
Reputation: 0
Location: Netherlands
Post: #7
(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.
find quote
desepticon Offline
Junior Member
Posts: 45
Joined: Jul 2013
Reputation: 0
Post: #8
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'
(This post was last modified: 2014-06-08 22:53 by desepticon.)
find quote
IIINeOIIINL Offline
Member
Posts: 71
Joined: Jun 2008
Reputation: 0
Location: Netherlands
Post: #9
(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
find quote
IIINeOIIINL Offline
Member
Posts: 71
Joined: Jun 2008
Reputation: 0
Location: Netherlands
Post: #10
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.
find quote
IIINeOIIINL Offline
Member
Posts: 71
Joined: Jun 2008
Reputation: 0
Location: Netherlands
Post: #11
Updated OSX last weekend to 10.8.5.
The shutting down problem didn't appear so far....fingers crossed
find quote