Linux [SOLVED] XBMCbuntu - prevent suspend on network activity
#1
Is there any way to prevent XBMC going to sleep if any network operation is in progress, but no movies/music is currently being watched?

Network operations mean copying files, retrieving content via uPnP and so on.
The configuration is as follows:
dedicated Intel PC with Intel 945 graphics connected to the network over cable (Ethernet) and runs XBMCbuntu 12.1 Frodo;
a few other computers connected via cable or WiFi and can be used for watching videos from XBMC via uPnP.
Those other computers can send a Magic Packet to wake up XBMC box, but after 10 minuts it would suddenly go to sleep. Any way to prevent this without disabling Power Features?

solved - see post #4
Reply
#2
Would love to know this as well.

My xbmc is currently setup to sleep after 30 mins of inactivity, but it also falls asleep when I stream movies / tv from it to other devices.
Reply
#3
If you're XBMC would have been on Windows, you could use Smart Power: http://ignatu.co.uk/SmartPower.aspx, this does the trick very well on Windows.

However, my XBMC is OpenElec, so can't use this. Maybe there's some script out there that can monitor network traffic and only shutdown if below a certain threshold, just like SmartPower?

Would also like to know, need it bad!
Reply
#4
Looks like I've made it. The solution is the "sleepd" daemon. Below is the steps to make it working (this is for Linux based XBMCbuntu v12.1 (Frodo), not Windows version; must work on other Linux flavours after some tuning).
I connected to the dedicated XBMCbuntu box via SSH just for convenience.

1. I needed to know the average load on my particular box:
Code:
top
Watching load values while videos were playing or not I concluded that 0.1 can serve as a threshold.

2. install sleepd
Code:
sudo apt-get install sleepd

3. as soon as sleepd installed, it is already running, must be stoped now
Code:
sudo service sleepd stop

4. configure sleepd
Code:
sudo leafpad /etc/default/sleepd
Note: I have -X in my SSH session (X graphics support)

5. the content of sleepd must be like this:
Code:
# This is a configuration file for /etc/init.d/sleepd.

# Parameters to pass to sleepd.
PARAMS="-l 0.1 -w -a -N -U 360"

6. restart sleepd
Code:
sudo service sleepd start

7. go to XBMC and disable "Shutdown function timer" (System->Settings->Power Saving)

That's all.

For explanation sleepd options see man pages e.g. this one
Reply

Logout Mark Read Team Forum Stats Members Help
[SOLVED] XBMCbuntu - prevent suspend on network activity0