Kodi retrive screensaver status

If Kodi is running on Linux, DPMS status can also be read or toggled using a shell command (via SSH). I use this method with LibreELEC + Kodi. To read the status:

cat /sys/class/drm/card1-HDMI-A-1/dpms

The actual HDMI port might differ. The output is either On (video signal active) or Off (inactive). To toggle it:

kodi-send --action="ToggleDPMS" > /dev/null 2>&1