RPi4 how control HDMI ports while using kms
#1
I run kodi-rpi on arch ARM (linux-rpi, aarch64) on a RPi4.

On HDMI 0 a monitor is connected, on HDMI 1 an audio system. I tend to listen to music for hours and since the monitor consumes a lot of power I want to toggle it off/on using a script mapped to a key on my remote.

When using fkms I use vcgencmd display_power 0/1 2 for that (0 = off, 1 = on). When using kms the vcgencmd doesn't work anymore, but kodi has the option of putting the monitor to sleep after 5 mins or more when idle under system power saving, and that also works with kms.

How does kodi do that? How can I use that in a script?
Reply
#2
CEC

Disable the use of CEC in Kodi and use the cec cmdline tool cec-client for your script
Kodi 18.6 @ openSUSE 13.1 x86_64 - Asus E35M1-I DELUXE | 8GB Ram | 240G 2.5" SSD
Kodi 20.2 on 1st Raspberry Pi B @ XBian | Kodi 20.2 on Raspberry Pi 3B+ @ XBian | Kodi 21a2 on Raspberry Pi4B @ XBian | Kodi 19.0 on SolidRun i.MX6 @ XBian
VDR 2.4.5 & Tvheadend4.3-1917 (for recording) on Cubieboard2 @ Debian Buster
Reply
#3
I went to Settings > System > Input > Peripherals > CEC Adapter and disabled it. I rebooted the Pi just to be sure. Kodi is now started with CEC disabled. I'm not familiar with CEC and I also I don't know if my monitor supports it, its an old model but Kodi power save does put it in supsend after 5 minutes. When I login via SSH I tried the following:
Code:

[user@PC19 ~]$ cec-client -l
libCEC version: 6.0.2,  compiled on 2021-02-20 17:53:55 by builduser on Linux 5.1.16-1-ARCH (aarch64), features: P8_USB, DRM, P8_detect, randr, Linux
Found devices: 1

device:              1
com port:            Linux
vendor id:           0000
product id:          0000
firmware version:    0
type:                Linux
Any ideas?
Reply
#4
(2023-02-27, 13:30)unformatted Wrote: Any ideas?
using a search engine instead of a forum i found this - https://www.endpointdev.com/blog/2012/11...mi-devices
Reply
#5
"cec-client -l" does not show any devices. That's because my monitor does not support CEC (found that in the documentation). So my question still remains: how does kodi power saving option works? I need to put my monitor to sleep (supsend) using a script.
Reply
#6
https://raspberrypi.stackexchange.com/qu...o-to-sleep

https://forums.raspberrypi.com/viewtopic.php?t=13801

https://duckduckgo.com/?q=how+to+put+mon...spberry+pi
Reply
#7
@jepsizofye , I appriciate your efforts but I'm afraid you misunderstood my first post. I'm running kms and kodi-rpi standalone, no X or other OS involved.
Reply
#8
clearly...

i found kodi-rpi and it makes it look like its on archlinux but you say there is no linux involved so i cannot help as i dont understand what you have installed
Reply
#9
I didn't say there's no linux involved, just as I wrote in my first post: "I run kodi-rpi on arch ARM (linux-rpi, aarch64) on a RPi4.". So that's an Arch ARM install running the linux-rpi kernel. The boot configuration file contains "dtoverlay=vc4-kms-v3d", so it's using KMS. There's no GUI installed, only kodi-rpi, which is a stand-alone version.
Reply

Logout Mark Read Team Forum Stats Members Help
RPi4 how control HDMI ports while using kms0