Distro Planets

GNOME's Christian Schaller releases hw-harness for AI-assisted Linux driver development

Key Takeaway

Christian Schaller created hw-harness, a tool that uses AI agents and Windows VM USB traffic capture to reverse-engineer hardware and write Linux drivers in hours rather than weeks.

Summary

GNOME developer Christian Schaller published hw-harness, a framework that helps AI coding assistants reverse-engineer undocumented hardware for Linux driver development. The method runs the vendor's Windows driver in a KVM VM, captures USB traffic with usbmon from the Linux host, then has the AI compare traces against a developing Linux driver to identify bugs. Schaller used this approach to build a SANE scanner driver and fix MIPI camera support on his laptop, producing kernel and libcamera patches in a single day. The harness is designed to work with Claude or Codex and includes documentation for others to adapt it to their hardware.

How hw-harness works

  • Reference recording: Vendor Windows driver runs in KVM with the physical device passed through to the guest
  • Traffic capture: Linux host records USB traffic via usbmon, invisible to the guest below the passthrough layer
  • Comparison loop: Same operation repeated with the in-development Linux driver, traces diffed directly
  • Bus-less devices: For internal MIPI cameras, harness falls back to Windows-side inspection of INF files, registry, ACPI tables, and device properties
  • Legal approach: Extracts only configuration data and observed hardware behavior, not driver code
  • Supported AI tools: Designed for Claude Code or Codex agent sessions

Why it matters

The tool could significantly lower the barrier for writing Linux drivers for unsupported consumer hardware, particularly scanners, cameras, and peripherals where vendors provide only Windows drivers. If widely adopted, it may reduce the backlog of unsupported devices in SANE and the Linux kernel.

Original reference: blogs.gnome.org →