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!

Comments (0)


Add a Comment






Allowed tags: <b><i><br>Add a new comment:


Search the newsroom

Latest Blog Posts

Now streaming: Collabora’s XDC 2025 presentations

02/12/2025

As an active member of the freedesktop community, Collabora was busy at XDC 2025. Our graphics team delivered five talks, helped out in…

Implementing Bluetooth LE Audio & Auracast on Linux systems

24/11/2025

LE Audio introduces a modern, low-power, low-latency Bluetooth® audio architecture that overcomes the limitations of classic Bluetooth®…

Strengthening KernelCI: New architecture, storage, and integrations

17/11/2025

Collabora’s long-term leadership in KernelCI has delivered a completely revamped architecture, new tooling, stronger infrastructure, and…

Font recognition reimagined with FasterViT-2

11/11/2025

Collabora extended the AdobeVFR dataset and trained a FasterViT-2 font recognition model on millions of samples. The result is a state-of-the-art…

Expanding access to XR: Google Cardboard comes to Monado

31/10/2025

Collabora has advanced Monado's accessibility by making the OpenXR runtime supported by Google Cardboard and similar mobile VR viewers so…

From browsers to better drivers: Fixing Zink synchronization the hard way

27/10/2025

By resolving critical synchronization bugs in Zink’s Vulkan–OpenGL interop, Faith Ekstrand paved the way for Zink+NVK to become the default…

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-2025. All rights reserved. Privacy Notice. Sitemap.