Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: jbbum on May 01, 2024, 01:05:02 PM
-
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.
-
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:
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
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/.
-
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.
-
Hi jbbum
Maybe udev would be of some help?
Try this:
udevadm monitor
Then toggle the "input or source" button on remote and
see if any events are generated.
-
Hi Rich
Got no responses.
-
Found this "cec-client which is part of cec utils package on raspbian. Checking to see if it can be loaded on piCore, and achiece desired result.
-
https://libcec.pulse-eight.com/
https://github.com/Pulse-Eight/libcec
Also found this text on there site:
If your TV cannot detect the Raspberry Pi's CEC, or if the the Pi can't detect the TV, try adding the following line in /boot/config.txt and reboot the Pi: hdmi_force_hotplug=1
-
Trying to get cec-utils over to piCore but can't get libudev.so.1 required by cec-client. There is no libudev.tcz in 14.xv7 and the 13.x does not include libudev.so.1. Is there a way to get updated library without using the debian version with all the unnessary dependencies?
-
The extension is udev-lib.tcz
-
The extension is udev-lib.tcz
I have not invested time in cec packaging, because every application I've heard of works only about 75% of what the user needs.
-
Hi jbbum
... There is no libudev.tcz in 14.xv7 and the 13.x does not include libudev.so.1. ...
Tinycore/piCore only have libudev.so.0 because they run an older
version of udev. I'm not certain, but I think that later versions of
udev are somehow tied to systemd.
-
Hi Rich,
You are probably correct. Did manage to get dependencies loaded, including 'libudev1' but ran into an error with libcec. Sorry but I didn't note the error as I gave up at that point.
-
It is possible to run later versions of the udev library (libudev.so.1) alongside the tinycore version, you have to be careful when compiling though.