</>EmbeddedInterview

How do you debug a display underflow or a black screen on Linux DRM/KMS?

HardLinux Kernel & Device Drivers

A display underflow occurs when scanout hardware cannot obtain pixel data fast enough to maintain the configured output timing. A black screen is broader: it may result from missing power, modesetting, invalid buffers, link errors or underflow.

1. Check the DRM state first

modetest -M msm -c
modetest -M msm -p
dmesg | grep -iE 'drm|underflow|dsi|panel'

Use the actual driver name and supported debug interfaces. Inspect connector status, selected mode, CRTC active state, plane framebuffer, pixel format, stride, source/destination dimensions and atomic commit return values.

2. Debug by pipeline stage

Stage Checks
Buffer Valid DMA mapping, format/modifier, stride, fences
Plane/CRTC Active state, blending, coordinates, mode timings
Memory/interconnect Bandwidth vote, clock rates, FIFO watermark, contention
Encoder/bridge/link PHY clocks, lane configuration, link errors
Panel Regulators, reset, initialization sequence, backlight

3. Estimate bandwidth

For a simple 1920×1080, 60 Hz, four-byte-per-pixel scanout, visible-pixel data alone is about 498 MB/s. Real requirements can be higher due to multiple planes, scaling, fetch inefficiencies, timing and platform-specific margins.

A bandwidth estimate is a starting point; inspect actual FIFO/underflow counters and interconnect performance under load.

4. Isolate the failure

Test a known valid simple framebuffer/mode using the supported modesetting tools, temporarily reduce composition complexity, compare good and bad hardware states, and inspect panel control transactions. Do not change unrelated timing or bandwidth settings without evidence.

Interview takeaway: Debug black screens from buffer to panel. Underflow is primarily a data-delivery/timing issue, but identify the failing stage before changing clocks or bandwidth votes.