Issue with Screen Resolution on Raspberry Pi after HDMI Cable Swap

Hi,

I’m Alexander from EasyComp Zeeland, also a volunteer for the Netherlands Red Cross. I’m building a digital screen for the waiting area of our Medical tent, The setup uses Screenly/Anthias on a Raspberry Pi 4. After replacing a broken micro HDMI to full HDMI cable (original Pi cable) with another original Pi cable, I’ve noticed the following:

  • The boot screen and any web UI screens show black borders and are not fullscreen.
  • Videos, however, play in fullscreen without issues.

I’ve already tried adjusting the resolution in config.txt, but it doesn’t seem to fix the web UI black borders. Additionally, for our wait screen, which includes a clock and weather display, I need to ensure the screen refreshes automatically without caching or that I can clear the cache when needed.

Could you advise how I can fix the resolution issue and set the web screens to refresh without caching?

Thanks in advance for your support!

Here is the video of the issue: Send by EasyComp Zeeland (The link is valid for 100 downloads or 7 days until October 8, 2024, 16:30:00 ). Please avoid clicking the link unless necessary to give the developer a chance to access it. Thank you!

Here are also some screens (videoplayback):

Informational display:

Kind regards,
Shaady Alexander
EasyComp Zeeland / Netherlands Red Cross Volunteer

1 Like

@ECZ, while we’re looking closely at the issue, I’d like to ask the following questions:

  • Do you reboot your device every time you modify config.txt?
  • Have you taken a look at config.txt and checked if disable_overscan is set to 1? (This could remove the black borders around the screen when playing assets.)
  • What Raspberry Pi OS version does the device run? (e.g., Bookworm, Bullseye, etc.)
    • You can check this by running cat /etc/os-release.
  • Did you restart your Raspberry Pi 4 after the cable swap?

Let me verify if caching is disabled for web assets. I’ve tested the default assets (the Screenly Clock and Weather apps) seems to display data without any issues. Let me know if you’re having issues with caching.

Hi sorry for the late reply but what config.txt do you mean, there are plenty files with that name, a location could be useful.

@ECZ, if your Raspberry Pi 4 is running Bookworm (also known as Debian 12, which you can check this by running cat /etc/os-release), it’s /boot/firmware/config.txt. For Debian versions 11 or older, you should modify /boot/config.txt.

Oh that one

For more options and information see

Some settings may impact device functionality. See link above for details

Uncomment some or all of these to enable the optional hardware interfaces

#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

Enable audio (loads snd_bcm2835)

dtparam=audio=on

Additional overlays and parameters are documented

/boot/firmware/overlays/README

Automatically load overlays for detected cameras

camera_auto_detect=1

Automatically load overlays for detected DSI displays

display_auto_detect=1

Automatically load initramfs files, if found

auto_initramfs=1

Enable DRM VC4 V3D driver

dtoverlay=vc4-kms-v3d
max_framebuffers=2

Don’t have the firmware create an initial video= setting in cmdline.txt.

Use the kernel’s default instead.

disable_fw_kms_setup=1

Run in 64-bit mode

arm_64bit=1

Disable compensation for displays with overscan

disable_overscan=1

Run as fast as firmware / board allows

arm_boost=1

[cm4]

Enable host mode on the 2711 built-in XHCI USB controller.

This line should be removed if the legacy DWC2 controller is required

(e.g. for USB device mode) or if USB support is not required.

otg_mode=1

[cm5]
dtoverlay=dwc2,dr_mode=host

[all]
framebuffer_depth=32
framebuffer_ignore_alpha=1
gpu_mem_256=96
gpu_mem_512=128
gpu_mem_1024=196

[pi4]
hdmi_enable_4kp60=1
hdmi_force_hotplug=1

thesee are the values

@ECZ, I can see that disable_overscan is already set to 1. Are you still having the same issues?

yes otherwise i wouldn’t had respond to this topic..

You could update Anthias by running bash <(curl -sL ``https://install-anthias.srly.io``), but make sure to backup your data first by going to the web UI > Settings > Get Backup. It might have been a scaling issue in web pages.

i have the latest version already. this is a new pi install only with the same issue as before..

Even after doing that again, there is an update every week? No results… other than before, fun fact. First i had this issue, so then i disconnected the RPI Touchscreen DSI like physical unplug the cable, then the problem was resolved. After updating i’m back to square one.

@ECZ, have you tried connecting it to a monitor via HDMI?

I don’t have any RPi touch screen available at the moment.

Have you seeen the pics at the start of the topic… yes i use an hdmi screen. How else would i have any display issues if i disconnected the DSI in favour of the HDMI?

Here is the fix, thank you ChatGPT!

Raspberry Pi 4 (Bookworm, KMS): Force HDMI-0 and HDMI-1 to 1920×1080@60

On Bookworm the default display stack is KMS (vc4-kms-v3d). With KMS, forcing resolution is most reliable via the kernel command line (/boot/firmware/cmdline.txt) — not config.txt. Many hdmi_* settings in config.txt are ignored under KMS.

1) Confirm connector names (mine are on card1)

ls -1 /sys/class/drm | grep -E 'HDMI|DSI|eDP'

cat /sys/class/drm/card1-HDMI-A-1/status
cat /sys/class/drm/card1-HDMI-A-2/status
# (generic)
cat /sys/class/drm/card*-HDMI-A-*/status

2) Force 1920×1080@60 from boot (recommended)

Edit cmdline.txt — it’s one single line:

sudo nano /boot/firmware/cmdline.txt

Append at the end (precede with a space):

video=HDMI-A-1:1920x1080@60 video=HDMI-A-2:1920x1080@60

Reboot:

sudo reboot

Verify after boot:

cat /proc/cmdline | tr ' ' '\n' | grep ^video=
cat /sys/class/drm/card1-HDMI-A-1/modes
cat /sys/class/drm/card1-HDMI-A-2/modes

3) config.txt hygiene (optional but tidy)

I’m using:

dtoverlay=vc4-kms-v3d
disable_fw_kms_setup=1

Clean up duplicates like multiple hdmi_force_hotplug=1 lines, and remove hdmi_enable_4kp60=1 if you only want 1080p. Reminder: with KMS, these hdmi_* options don’t enforce modes — the video= args in cmdline.txt do.

4) (Optional) Re-apply in the desktop session

If you need to re-set modes after login (hotplug scenarios):

Xorg:

DISPLAY=:0 xrandr --output HDMI-1 --mode 1920x1080 --rate 60 \
                  --output HDMI-2 --mode 1920x1080 --rate 60

Wayland/wlroots (e.g., Sway/Wayfire/kiosk):

wlr-randr --output HDMI-A-1 --mode 1920x1080@60
wlr-randr --output HDMI-A-2 --mode 1920x1080@60

Common pitfalls

  • Using card0 paths: with vc4-kms-v3d the HDMI connectors are typically on card1.

  • Breaking cmdline.txt into multiple lines: keep it a single line.

  • Mixing legacy (f)kms with modern KMS: stick to vc4-kms-v3d if you’re on Bookworm.

@ECZ , happy to hear you managed to resolve it! Thanks for your patience, and sorry for the inconvenience earlier.

I’ll keep this in mind should similar issues happen. Thanks!