HDMI DDC brightness setting in Admin Brightness menu

Is there a way to set the brightness for the HDMI screen backlight in the Brightness menu?
The screen uses ddcutil setvcp 10 x with x in range 0 to 100.
The python script refers to /sys/class/backlight, which is not populated by default. Adding dtoverlay=rpi-backlight in Webconf Display Config (so it shows up in config.txt) creates /sys/class/backlight/rpi-backlight, but still the zyngui shows only LED brightness.
I’ve found this: ddci-driver-linux
It installs, but no way to make things work.
So could this ddcutil be used by zyngui? Or how is the correct way to make adjusting HDMI display brightness work (if there is any)?

Hi @fussl !

Could you test if this file does exist:

/sys/class/backlight/rpi-backlight/brightness

This should be detected by zynthian-ui when starting, enabling the brightness config view in the admin menu.

If it doesn’t work, please open an issue, explaining the issue and attaching the ui logs.

Thanks,

1 Like

after restarting zyngui

(venv) root@zynthian:/# dmesg
[  247.083767] raspberrypi-firmware soc:firmware: Request 0x0004800f returned status 0x80000001
[  247.083776] rpi-backlight rpi_backlight: Failed to set brightness
[  247.084670] raspberrypi-firmware soc:firmware: Request 0x0004800f returned status 0x80000001
[  247.084674] rpi-backlight rpi_backlight: Failed to set brightness
[  247.125630] raspberrypi-firmware soc:firmware: Request 0x0004800f returned status 0x80000001
[  247.125640] rpi-backlight rpi_backlight: Failed to set brightness
[  247.136599] raspberrypi-firmware soc:firmware: Request 0x0004800f returned status 0x80000001
[  247.136609] rpi-backlight rpi_backlight: Failed to set brightness
[  247.147721] raspberrypi-firmware soc:firmware: Request 0x0004800f returned status 0x80000001
[  247.147731] rpi-backlight rpi_backlight: Failed to set brightness
[  247.157746] raspberrypi-firmware soc:firmware: Request 0x0004800f returned status 0x80000001
[  247.157846] rpi-backlight rpi_backlight: Failed to set brightness
(venv) root@zynthian:/#

Display config is:

max_usb_current=1
disable_overscan=1
hdmi_force_hotplug=1
hdmi_drive=1
hdmi_group=2
hdmi_mode=87
hdmi_cvt=1280 800 60 6 0 0 0
dtoverlay=rpi-backlight
dtoverlay=vc4-kms-v3d-pi5,noaudio
dtparam=rtc_bbat_vchg=3000000

Backlight class has brightness:

(venv) root@zynthian:/sys/class/backlight/rpi_backlight# ls -l
total 0
-r--r--r-- 1 root root  16384 Dec 10 19:08 actual_brightness
-rw-r--r-- 1 root root  16384 Dec 10 19:06 bl_power
-rw-rw-r-- 1 root video 16384 Dec 10 19:11 brightness
lrwxrwxrwx 1 root root      0 Dec 10 19:08 device -> ../../../rpi_backlight
-r--r--r-- 1 root root  16384 Dec 10 19:08 display_name
-r--r--r-- 1 root root  16384 Dec 10 19:06 max_brightness
drwxr-xr-x 2 root root      0 Dec 10 19:08 power
-r--r--r-- 1 root root  16384 Dec 10 19:08 scale
lrwxrwxrwx 1 root root      0 Dec 10 19:06 subsystem -> ../../../../../class/backlight
-r--r--r-- 1 root root  16384 Dec 10 19:06 type
-rw-r--r-- 1 root root  16384 Dec 10 19:06 uevent
(venv) root@zynthian:/sys/class/backlight/rpi_backlight#

BTW, there’s something wrong with the HifiBerry driver name:

[    2.812119] pcm186x 1-004a: supply avdd not found, using dummy regulator
[    2.813284] pcm186x 1-004a: supply dvdd not found, using dummy regulator
[    2.813438] pcm512x 1-004d: supply AVDD not found, using dummy regulator
[    2.813685] pcm186x 1-004a: supply iovdd not found, using dummy regulator
[    2.813739] pcm512x 1-004d: supply DVDD not found, using dummy regulator
[    2.813748] pcm512x 1-004d: supply CPVDD not found, using dummy regulator
[    2.853263] snd-rpi-hifiberry-dacplusadcpro soc:sound: ASoC: driver name too long 'HifiberryDacpAdcPro' -> 'HifiberryDacpAd'
[    2.921029] Bluetooth: hci0: BCM: chip id 107
[    2.921287] Bluetooth: hci0: BCM: features 0x2f