Olivier Crête
July 22, 2025
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.
echo 0xff > /sys/class/video4linux/video3/dev_debug
if one wants to enable the debug for the video3
device..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!
22/07/2025
Getting into kernel development can be daunting. There are layers upon layers of knowledge to master, but no clear roadmap, especially when…
15/07/2025
This past May, we met with the community at the GStreamer Spring Hackfest in Nice, France, and were able to make great strides, including…
03/07/2025
As part of the activities Embedded Recipes in Nice, France, Collabora hosted a PipeWire workshop/hackfest, an opportunity for attendees…
25/06/2025
In collaboration with Inria, the French Institute for Research in Computer Science and Automation, Tathagata Roy shares the progress made…
23/06/2025
Last month in Nice, active media developers came together for the annual Linux Media Summit to exchange insights and tackle ongoing challenges…
09/06/2025
In this final article based on Matt Godbolt's talk on making APIs easy to use and hard to misuse, I will discuss locking, an area where…
Comments (0)
Add a Comment