brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: kmsprint -m lists the display modes your monitor offers to a Raspberry Pi

Troubleshooting
~/tips/tip-kmsprint-list-display-modes

kmsprint -m

Lists the resolutions and refresh rates the attached monitor supports.

A Pi that shows a blurry picture or no picture on a particular monitor is often asking for a mode the screen does not support. Instead of guessing resolutions, ask the Pi what the screen offers.

The Raspberry Pi documentation lists kmsprint under its utilities: it can be used to list the display modes supported by the monitors attached to your device.

kmsprint -m

On a Pi with more than one display device, a particular one can be chosen with the device option, as shown on the same page:

kmsprint --device=/dev/dri/card1

The output names each connected monitor and its modes. I would read it for the combination of resolution and refresh rate that you want, and compare with what the desktop settings let you pick.

When you need a specific mode in console mode, the configuration docs show a video= parameter in cmdline.txt, for example video=HDMI-A-1:1920x1080M@60. The mode list from kmsprint tells you which values are realistic before you edit that file. Edit it with care, because cmdline.txt is a single line and the Pi may not boot if it is damaged:

sudo cp /boot/firmware/cmdline.txt /boot/firmware/cmdline.txt.bak
sudo nano /boot/firmware/cmdline.txt

Keep everything on one line, and reboot to test.

The caveat: kmsprint reports what the monitor says it supports, read from the display itself. A cheap cable, an adapter or a switch in between can hide modes, so a missing resolution does not always mean the monitor cannot do it. Try the monitor straight on the Pi before you give up on a mode.

The tool also depends on the graphics stack of the OS image in use, and I only verified the two commands above against the docs.

Further reading: Raspberry Pi documentation: kmsprint, Raspberry Pi documentation: HDMI and video= in cmdline.txt

More Troubleshooting tips Get-NetTCPConnection -State Listen modinfo -p usb_storage ps -o pid,lstart,etime,cmd -p 1234 sudo lsof -nP -p 1234 fc-match Helvetica All Troubleshooting tips (21) All topics

Link