BalenaDash Raspberry Pi 4 Chromium Kiosk black borders top and left

Hi there, I am using Raspberry Pi 4 with BalenaDash
The Chromium Kiosk is displaying video and web content fine,
however there are black top and left borders, I tested it on 2 monitors and get the same result.
As seen below:

I’ve tried:
Adding and setting WINDOW_SIZE and WINDOW_POSITION env variable

so far no luck solving this problem, Any hints?

Cheers, Kevin

Hi there,

As you’re using a Raspberry Pi, you can explicitly set the video output to whatever you want using device variables within the balenaCloud dashboard.

Please take a look at the settings on this page https://www.raspberrypi.org/documentation/configuration/config-txt/video.md, specifically the settings for hdmi_group and hdmi_mode.

Any of the configuration options detailed here can be applied on the dashboard by prefixing them with BALENA_HOST_CONFIG_. For example, BALENA_HOST_CONFIG_hdmi_mode.

Using these options you should be able to set the output resolution of your device to precisely match that of your monitor.

Thank you for the quick reply,

I have also tried balena pushing the electronjs kiosk project
and it occupied the entire area nicely, which makes me suspect the problem is chromium.

They seem to have the exact same problem:
https://www.raspberrypi.org/forums/viewtopic.php?t=259128
https://raspberrypi.stackexchange.com/questions/99331/pi-7-touchscreen-chromium-in-kiosk-mode-shifted-down-right-by-10px

However, I could not try the solution for now since I do not know how to modify ~/.config/chromium/Default/Preferences with the dockerfile yet

I think using sed to modify the Preferences file inside a Dockerfile or in your start script would do the trick.
Please let us know how it goes.