2K display issues in Chromium kiosk mode

Creating a bug report/issue

I have searched the existing open and closed issues

Yes - several topic solutions attempted after searching and recommendations whilst creating post.

Required Information

  • DietPi version | Core = 9, Sub = 16, RC = 3
  • Distro version | trixie 0
  • Kernel version | 6.12.34+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.34-1+rpt1 (2025-06-26) aarch64 GNU/Linux
  • Architecture | arm64
  • SBC model | RPi 4 Model B (aarch64)
  • Power supply used | Raspberry Pi 4 Official Adapter
  • SD card used | SanDisk Extreme 64GB

Additional Information (if applicable)

  • Using 13inch “ZSUS” generic IPS 2160 x 1440 4:3 monitor
  • Software title | Chromium Kiosk
  • Was the software title installed freshly or updated/migrated? New install
  • Can this issue be replicated on a fresh installation of DietPi? Yes

Steps to reproduce

  1. Fresh install of DietPi
  2. Follow instructions here to set up Immich Kiosk
  3. Set dietpi.txt chromium resolution parameters to match display resolution
  4. Enabled custom HDMI output in config.txt
  5. Note correct resolution in both text terminal and window manager
  6. Edited chromium-autostart.sh as follows:
#!/bin/dash
# Autostart script for kiosk mode, based on @AYapejian: https://github.com/MichaIng/DietPi/issues/1737#issue-318697621

# Resolution to use for kiosk mode, should ideally match current system resolution
RES_X=$(sed -n '/^[[:blank:]]*SOFTWARE_CHROMIUM_RES_X=/{s/^[^=]*=//p;q}' /boot/dietpi.txt)
RES_Y=$(sed -n '/^[[:blank:]]*SOFTWARE_CHROMIUM_RES_Y=/{s/^[^=]*=//p;q}' /boot/dietpi.txt)

# Create a temporary xinitrc file to launch unclutter before chromium
cat > /tmp/xinitrc.tmp << 'EOF'
#!/bin/dash
# Hide cursor
unclutter -idle 0 -root &

# Launch Chromium with provided arguments
exec "$@"
EOF
chmod +x /tmp/xinitrc.tmp

# Command line switches: https://peter.sh/experiments/chromium-command-line-switches/
# - Review and add custom flags in: /etc/chromium.d
CHROMIUM_OPTS="--kiosk --window-size=${RES_X:-2160},${RES_Y:-1440} --window-position=0,0"

# If you want tablet mode, uncomment the next line.
#CHROMIUM_OPTS+=' --force-tablet-mode --tablet-ui'

# Home page
URL=$(sed -n '/^[[:blank:]]*SOFTWARE_CHROMIUM_AUTOSTART_URL=/{s/^[^=]*=//p;q}' /boot/dietpi.txt)

# RPi or Debian Chromium package
FP_CHROMIUM=$(command -v chromium-browser)
[ "$FP_CHROMIUM" ] || FP_CHROMIUM=$(command -v chromium)

# Use "startx" as non-root user to get required permissions via systemd-logind
STARTX='xinit'
[ "$USER" = 'root' ] || STARTX='startx'

exec "$STARTX" /tmp/xinitrc.tmp "$FP_CHROMIUM" $CHROMIUM_OPTS "${URL:-https://dietpi.com/}"

Expected behaviour

  • Chromium Kiosk should load and display at intended resolution with correct colour depth

Actual behaviour

  • Chromium kiosk loads in a 1920x1080 resolution (reported by screen), displaying only the top left corners of images (using vc4-kms-v3d), or a resized image using 1080p coverage of the screen (when using vc4-fkms-v3d
  • Colour depth is low, resulting in banding and dithering in both modes
  • Switching to 1080p in display mode per other posts causes a fatal x-server error.

Extra details

A couple more thoughts based on this mornings troubleshooting.

I’ve set the resolution in dietpi.txt, also noting that the URL remains set to the default dietpi website.

I set the new URL for my Immich frame instance via the autostart dialogue and this webpage is being shown despite the chromium starting URL in the dietpi.txt file being different.

Leads me to wonder whether this setting is being stored and read somewhere else - and so could the resolution settings also be stored elsewhere and set to 1920 x 1080. Any thoughts on how to test / verify this?

You can try dietpi-config to set resolution. Does it change something?

I tried this before I gave up last night but only had 1920*1080 available on the dialog. Since then I think I’ve enabled the “4k60” option for hdmi but I didn’t think to check if that opened up additional display options in dietpi-config.

Will check this when I get home.

The only options I have on dietpi-config are 1920x1080 and less, unfortunately.

Just noted that the display is now at native resolution, provided that I am in vc4-fkms-v3d in the resolution settings. However, the Chromium window only scales to the 1920x1080 portion, and the colour issue remains. I’ve attached a photo to illustrate.

I’ve gone into menu 0 of dietpi-config (Display Mode and Rotation) and changed from a fixed mode to a custom one as defined here: modedb default video mode support — The Linux Kernel documentation . The command I’m using is 2160x1440R-32@60 which I believe means the resolution stated, with reduced blanking, at 32 bits-per-pixel at 60Hz.

I feel like I’m closer - but my chromium-autostart script still has every resolution I can see set to 2160 x 1440 with no change in the final result, and still wonky colour.

OK! Some progress. Colour rendering now sorted, thanks to these commands:

ln -sf /usr/lib/aarch64-linux-gnu/libGLESv2.so /usr/lib/chromium/libGLESv2.so
ln -sf /usr/lib/aarch64-linux-gnu/libEGL.so /usr/lib/chromium/libEGL.so

As noted here: [Solved] Color depth issue with Chromium Kiosk - #7 by locutusweb

Just the resolution issue to crack.

Super weird. Seems to be working as expected now - but I’ve no idea what I did :joy:

Once I got the colour sorted, I went back to /boot/config.txt and /boot/dietpi.txt. Noted that a few of the resolution fields had reverted to 1080p. Changed them back to the intended resolution and that did the trick. Wonder if some combination of changing dietpi-config settings and the display mode did the trick.

Only minor niggle (which I’ll live with if I have to) is that the transitions are a bit choppy - I assume due to GPU load. I could only set the RAM / GPU split to 96M on my device via dietpi-config. Can this be adjusted any other way? I’ve a 4gb model.

Proof if proof were needed that if you throw enough :poop: at the wall, some of it will stick!

I’ll see what happens over a few reboots.

Nevermind - found it.

gpu_mem_4096=256

In /boot/config.txt helped

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.