We're hiring!
*

A practical debugging guide for media driver developers

Olivier Crête avatar

Olivier Crête
July 22, 2025

Share this post:

Reading time:

Getting into kernel development can be a truly daunting task. There are layers upon layers of knowledge required, but there is no clear outline for a newcomer to follow and to discover what is to be learned. One of these areas is how to properly debug issues that arise during the development of drivers or that are encountered when the interaction between userspace applications and the kernel goes wrong.

Now, to be clear, the issue is not that there is no documentation, on the contrary, you can find a lot of information in the Linux kernel documentation. The problem is that you have to know which tools exist in order to search for documentation about it and you have to know that a certain tool is good pick for your situation. This is where the Debugging and tracing in the media subsystem guide comes into play.

Last year, Collabora was asked by Google to write such a guide to assist newcomers to dive into Kernel development and get up to speed quickly. The resulting guide, published alongside the Linux 6.13 release, is structured into two layers: a general layer, which outlines available debugging tools for two scenarios — either debugging with the ability to recompile and install a custom kernel, or debugging using only userspace tools (often with root access) — and a specific layer tailored to particular cases.

At Collabora, we've been particularly busy working on multimedia drivers in the last few years, and there are a few useful tools from the guide we think are particularly useful in this area.

  • I always forget how to enable debugging output specific to v4l2 drivers. The answer is simply echo 0xff > /sys/class/video4linux/video3/dev_debug if one wants to enable the debug for the video3 device.
  • When one has problems receiving video from an external input such as HDMI or TV, there is a helpful vfunc called .vidioc_log_status in the v4l2_ioctl_ops, it can then be triggered by calling v4l2-ctl --log-status to trigger it. This one is less useful with camera sensor inputs since you have control over what the camera sensor does.

We hope this guide will make life a little easier for anyone writing and debugging media drivers for Linux. And if you need more help, reach out to us!

Search the newsroom

Latest Blog Posts

Optimizing memory access in NIR

07/05/2026

A complete breakdown of Mesa’s NIR compiler detailing how it optimizes shader memory access with SSA promotion, deref analysis, copy propagation,…

BlueZ-powered Auracast broadcasting on Genio 700

05/05/2026

Collabora brought Bluetooth Auracast broadcasting to MediaTek Genio 700 for Embedded World 2026. Here's the complete, fully Open Source…

Making the invisible audible: Building an OpenXR experience for ocean protection

22/04/2026

Using our XR expertise, Collabora created a standalone XR experience for our 1% for the Planet partner, SOMAR, to showcase the direct impact…

Bringing BitNet to ExecuTorch via Vulkan

17/04/2026

BitNet-style ternary brings LLM inference to ExecuTorch via its Vulkan backend, enabling much smaller, bandwidth-efficient models with portable…

Re-thinking framebuffers in PanVK

23/03/2026

PanVK’s new framebuffer abstraction for Mali GPUs removes OpenGL-specific constraints, unlocking more flexible tiled rendering features…

Running Mainline Linux, U-Boot, and Mesa on Rockchip: A year in review

02/03/2026

Get the recap of Nicolas Frattaroli's FOSDEM talk detailing Rockchip’s mainline progress, including Vulkan 1.4 and NPU support as a vital…

Open Since 2005 logo

Our website only uses a strictly necessary session cookie provided by our CMS system. To find out more please follow this link.

Collabora Limited © 2005-2026. All rights reserved. Privacy Notice. Sitemap.