Debugging an ioctl Problem on OpenBSD

posted on feb 16th, 2022 with tags debugging and openbsd

I was trying to use a V4L2 Ruby module on my OpenBSD laptop but ran into a problem where sending the V4L2 ioctls from this module would fail, while other V4L2 programs on OpenBSD worked fine.

Since I got a few questions recently about kernel development and debugging, I thought I’d write up how I finally tracked it down and fixed it. (Spoiler: it was not an OpenBSD problem.)

Continue reading 1,155 words...

Touchpad, Interrupted

posted on jul 28th, 2019 with tags debugging, laptops, and openbsd

For two years I’ve been driving myself crazy trying to figure out the source of a driver problem on OpenBSD: interrupts never arrived for certain touchpad devices. A couple weeks ago, I put out a public plea asking for help in case any non-OpenBSD developers recognized the problem, but while debugging an unrelated issue over the weekend, I finally solved it.

It’s been a long journey and it’s a technical tale, but here it is.

Continue reading 2,927 words...

OpenBSD in Stereo with Linux VFIO

posted on nov 12th, 2018 with tags debugging, laptops, linux, and openbsd, and last updated on mar 24th, 2019

I use a Huawei Matebook X as my primary OpenBSD laptop and one aspect of its hardware support has always been lacking: audio never played out of the right-side speaker. The speaker did actually work, but only in Windows and only after the Realtek Dolby Atmos audio driver from Huawei was installed. Under OpenBSD and Linux, and even Windows with the default Intel sound driver, audio only ever played out of the left speaker.

Now, after some extensive reverse engineering and debugging with the help of VFIO on Linux, I finally have audio playing out of both speakers on OpenBSD.

Continue reading 2,202 words...