Tiny Core Base > Raspberry Pi

hdmi output

(1/3) > >>

jbbum:
is there a way to monitor if raspberry 0w hdmi output is active?  (iow)Have pi 0w output only when selected as input to monitor.

Rich:
Hi jbbum
It sounds like you want to be able to test if a monitor is connected
to the HDMI port.

I do that with another video port on a laptop to see if an external
monitor is connected:

--- Code: ---if [ $(cat /sys/class/drm/card0-VGA-1/status) = "connected" ]
then
        # Copy our special xorg.conf where Xorg can find it.
        busybox cp -f xorg.conf.2monitors /etc/X11/xorg.conf
        Monitors=2
fi
--- End code ---

I don't know if pi uses a similar layout, but start by looking for a subdirectory
with HDMI in its name under  /sys/class/drm/.

jbbum:
Hi Rich,
Scenario-Raspberry pi 0w connected as input to TV. Pi is programmed with ffmpeg to access stream from esp32 webcam and output to fbdev, no X, want pi to be idle with no stream output until the pi is selected on the tv with the "input or source" button on remote, a cli is then ran to access stream from esp32 webcam.

Rich:
Hi jbbum
Maybe  udev  would be of some help?
Try this:

--- Code: ---udevadm monitor
--- End code ---
Then toggle the "input or source" button on remote and
see if any events are generated.

jbbum:
Hi Rich
Got no responses.

Navigation

[0] Message Index

[#] Next page

Go to full version