Detect hdmi disconnect/tv off - AVS Forum | Home Theater Discussions And Reviews
Forum Jump: 
Thread Tools
post #1 of 2 Old 08-15-2012, 08:53 AM - Thread Starter
Budric's Avatar
Join Date: Aug 2012
Posts: 1
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10

I'd like to write a cron job to detect when the TV is off and kill a bunch of programs - chrome, vlc, etc. This is because my bandwidth is limited and I don't want it to continue streaming when the TV is off. Does anyone know how I could go about detecting monitor off/hdmi unplugged?

xrandr doesn't seem to suit my needs because it has to be run as a user with a $DISPLAY. So it wouldn't work in a script.

Assume I have no CEC over HDMI.

Budric is offline  
Sponsored Links
post #2 of 2 Old 08-17-2012, 02:06 PM
AVS Forum Special Member
waterhead's Avatar
Join Date: May 2007
Posts: 1,280
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 17 Post(s)
Liked: 12
Since no one has replied, I will give you a few things to think about. smile.gif

I don't believe that a cron job would be the best way to achieve what you want to do. I think a script that is driven by an event is what you want. You need to identify what event takes place when the TV turns off, then create a file or script that will be triggered by the event.

I don't know a lot about this, but it seems that a script in /etc/init.d or /etc/udev may be what you want.
waterhead is offline  
Sponsored Links
Reply HTPC - Linux Chat

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page

Forum Jump: 

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off