Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

XBMC kill when RPi are in Standby
Thank you for your donation

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
XBMC kill when RPi are in Standby
20th Jan, 2014, 07:04 AM
Post: #1
Blightrt Offline
Registered
Posts: 19
Joined: Jan 2014
Reputation: 2
XBMC kill when RPi are in Standby
Hello,

i search for a solution, that kills XBMC when i turn off my TV and when i turn on my TV it starts XBMC.

It should relieve the CPU and to have more power for other programs, like pyload or downloaddeamon

I think it would be work when CEC is disconnect with a script or on a button on my remote.

Any Idea? Thanks in Advance
Find all posts by this user
Quote this message in a reply
21st Jan, 2014, 05:35 AM
Post: #2
IriDium Offline
Inquisitor
******
Posts: 2,025
Joined: Jan 2013
Reputation: 170
RE: XBMC kill when RPi are in Standby
Something similar has been discussed elsewhere.

In essence, it shouldn't really be needed as XBian in "Non" usage uses so little CPU as to be insignificant - in fact a program running in the background checking for an input every ~500ms will probably consume more CPU than just letting Xbian do nothing.

I'm sure they might be a clever way around this but I on't know of it - maybe someone else does.

Please read before you post
How to post a log file

If you liked my help, click on "Thanks" to show your appreciation.
Find all posts by this user
Quote this message in a reply
25th Jan, 2014, 05:25 PM
Post: #3
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: XBMC kill when RPi are in Standby
when XBMC starts screensaver, XBIAN changes XBMC's priority to very very low. this together with taking only 15% by default, is not taking more than 5-7% of cpu time.

but still if you want to kill it, there is upstart script "xbmc-screensaver". when this changes state to "running", you know XBMC turned on screensaver. then you can create very simple upstart job like this:
Code:
start on started xbmc-screensaver

exec stop xbmc

with running xbmc back on you have a play a bit, but one of the solutions would be enhance this job for a loop which is asking TV status. if is not "standby", start xbmc

Code:
start on started xbmc-screensaver

pre-start exec stop -qn xbmc || :

script
   while :; do
      echo "pow 0" >> /run/cc/in
      [ "$(tail -1 /run/cc/out)" = standby ] || break
   done
end script

post-stop start -nq xbmc || :

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
26th Jan, 2014, 02:29 AM
Post: #4
Blightrt Offline
Registered
Posts: 19
Joined: Jan 2014
Reputation: 2
RE: XBMC kill when RPi are in Standby
Thanks for your help
Find all posts by this user
Quote this message in a reply
14th Mar, 2014, 03:58 AM
Post: #5
LeoSum Offline
Registered
Posts: 10
Joined: Mar 2014
Reputation: 0
RE: XBMC kill when RPi are in Standby
Hey mk01,
I am looking for something exactly like you are supposing but I am struggling to understand your post.
  • What is happening inside the brackets? Is this the command for checking the CEC status?
  • How do I make this script start running everytime the pi boots?

CEC works with my tv as I can use the remote to control my pi when I am in xbmc. But via ssh using tvservice -M i cannot register any events from the TV when I switch sources or turn it on or off.
Find all posts by this user
Quote this message in a reply
16th Mar, 2014, 08:16 AM
Post: #6
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: XBMC kill when RPi are in Standby
(14th Mar, 2014 03:58 AM)LeoSum Wrote:  Hey mk01,
I am looking for something exactly like you are supposing but I am struggling to understand your post.
  • What is happening inside the brackets? Is this the command for checking the CEC status?
  • How do I make this script start running everytime the pi boots?

CEC works with my tv as I can use the remote to control my pi when I am in xbmc. But via ssh using tvservice -M i cannot register any events from the TV when I switch sources or turn it on or off.

monitor mode doesn't work natively in libCEC and direct access to libCEC controls disables other open sessions.

enable SCREENOFF=yes in /etc/default/xbmc

this will upon start of xbmc create shared in and out files at /run/cc/in,out

then independently on running XBMC you can issue commands to cec bus as follows

echo "command" >> /run/cc/in

and read what is returned "cat or tail /run/cc/out"

if you need messages from 3rd devices (like promisc mode), then we need a small change in the code.

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Possibly Related Threads...
Thread: Author Replies Views: Last Post
  XBMC standby (sleep mode) alexg 1 8,776 26th Apr, 2013 07:10 AM
Last Post: Uncle_Tubbie

  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 9th May, 2025, 07:04 PM Powered By MyBB, © 2002-2025 MyBB Group.