0

I got my HTPC/Server connected to my Denon receiver. I was wondering if it's possible to get a signal from the receiver when the HDMI channel is active so I can run XBMC when I change the source input? I'm running Ubuntu 14.04 Server edition.

phmsk
  • 25

1 Answers1

0

Rather than recreate the wheel, a user asked a very similar question to your own here:

Possible to run a script when something plugged in / disconnected from Mini DisplayPort?

This seems to be what you are looking for. Then you just set the script referred to here to run XMBC when the HDMI is plugged in. Please pay special attention to whether or not your card records when the HDMI is disconnected. You could then design a script to:

1) Verify that XMBC is running

2) Verify that the HDMI port is still connected using the same UDEV script in the link

3) Kill XMBC gracefully should the HDMI port be unplugged

This assumes that you want the XMBC daemon killed when the HDMI gets unplugged, of course.

  • It doesn't seem to take the signal from the receiver that the channel is active. Added this: SUBSYSTEM=="drm", ACTION=="change", ENV{HOTPLUG}=="1", RUN+="/usr/local/bin/hdmi_change"

    In the run file I echo some text to another file. But it does not run the file. (I've tried running it myself, works fine)

    – phmsk Nov 10 '14 at 20:52
  • Could you post the following output then: run udevadm monitor , then plug in the HMDI port and unplug it. – Geary Shull Nov 10 '14 at 21:47
  • I believe this has to do that my motherboard does not support CEC and therefore cannot recognise the change. If I run cat /sys/class/drm/card0-HDMI-A-1/status it is always connected no matter the channel I change to. – phmsk Nov 10 '14 at 22:17
  • If your motherboard doesn't detect when the HDMI is plugged in, then we will have to use a different method. Maybe a website with a button to turn XMBC on and off? – Geary Shull Nov 10 '14 at 22:23
  • I get the same info from the udevadm monitor as the one you linked. It recognises a change when I unplug the HDMI cable but can't get any input from the receiver. I could always use Webmin to run scripts but that solution seems very tedious. – phmsk Nov 11 '14 at 00:47
  • We're rapidly approaching my limits, so anyone with greater experience in this area please feel free to chime in. That said, I'm wondering if HDMI requires X-server. I'll keep looking into it – Geary Shull Nov 11 '14 at 14:16