Docker container not respecting resolution from /boot/config.txt (rpi4)

Hey there,

so i am building a kiosk with different types of raspberries.

Using balena > Fleet config > custom:
RESIN_HOST_CONFIG_hdmi_group 2
RESIN_HOST_CONFIG_hdmi_mode 82

Which works for gen. 2 and 3 raspberries. But my 4B ones keep falling back to 4K when docker container is started. Weird is that Balena splash is in desired 1080p on all devices.

I even tried lower resolution. Only the guest of rpi4s ignoring my configuration.

My Docker-Image is balenalib/%%BALENA_MACHINE_NAME%%

Can anybody help me force them to 1080p?

Paul

Hey Paul,

Looking at the list of video modes here I can see that RESIN_HOST_CONFIG_hdmi_mode 82 when using group 2 is correct for 1080P for all of your devices. I don’t have a 4K monitor to test this on, but I agree it should be working.

Two things for your to try:

  1. You can set BALENA_HOST_CONFIG_hdmi_force_mode to 1 to stop it switching to a different mode. As per the documentation:
This option may help if a display seems to be ignoring the hdmi_mode and hdmi_group settings.
  1. You can set a custom mode using the hdmi_timings setting if you use hdmi_mode = 87. You could override the fleet setting for a Pi4 to test if this fixes it to the correct resolution.

Phil

Hey Phil,

thanks for your reply. Sadly this did not work.
I solved this now on the guest by enforcing 1920x1080 on xinit.

startx /usr/bin/chromium-browser --no-sandbox – -config /etc/X11/1920x1080

Where /etc/X11/1920x1080 is:

Section “Screen”
SubSection “Display”
Modes “1920x1080”
EndSubSection
Device “Device[0]”
Identifier “Screen[0]”
Monitor “Monitor[0]”
EndSection

Sorry cant get the formatting done

Paul

Hey Paul,

Glad you got it sorted. Are you running custom software, or the balenaDash project? I ask because we now have a browser balenaBlock here:

If you use that block for your Chromium instance, you can also set the screen resolution through an environment variable called WINDOW_SIZE

Phil