A Red Hat engineering director used an AI coding agent to build a working Linux scanner driver in a matter of hours after months of failed attempts, then completed the project by adding infrared scanning support within days. Christian Schaller, who also contributes to GNOME and Fedora, documented the process in an account published Wednesday and released the underlying methodology as an open-source project called hw-harness under an MIT license. The toolkit packages everything needed to record device behavior, match a functioning implementation against a faulty one, and supply a coding agent with the data required to work on hardware Linux doesn't yet recognize.

Schaller had purchased a Plustek OpticFilm 8200i scanner advertised as supported, only to find the maker had switched to a chipset unrecognized by any Linux driver. His initial efforts to get Claude Code to generate a functional driver went nowhere, so he abandoned the work for several months. When he resumed, Schaller took a different approach inspired by a post from Tom Crider, who had employed an AI agent to repair a mouse driver by connecting it to a Windows machine. Schaller fed Claude the post and asked it to construct a comparable setup for his scanner, allowing the agent to operate the manufacturer's Windows software, record USB traffic, and contrast it with what his Linux driver transmitted. His completed driver finished a full-resolution scan in 34.6 seconds, while the upstream SANE version required 54.4 seconds. Both resolved identical detail at 3,600 dpi, though SANE offers more resolution choices. Schaller's implementation supports infrared dust removal and exposure adjustments for dense negatives, plus color and grayscale scanning from 300 to 7,200 dpi. The hardware difference triggering the entire project was a chipset replacement: newer 8200i scanners employ a Genesys GL128, substituting for the GL845 already recognized by SANE.

According to Schaller, the reverse-engineering work piecing together undocumented device protocols from USB captures, register values, and control transfers "takes a lot of patience and skills," though the work itself isn't particularly complicated. His earlier attempts to construct a SANE backend with Claude had stalled because the agent lacked a working driver for comparison. Better yet, as Schaller put it, Claude "doesn't get bored." He still needed to test the modifications on the scanner, since a working driver presents a different challenge from producing code that appears correct. By the time Schaller wrapped up, his driver was no longer the sole option—support for the newer OpticFilm 8200i had arrived in SANE back in September, courtesy of another developer. The scanner project also prompted Schaller to build Negative Vibes, an app written in Rust with Claude's help that preserves the original 16-bit scan data intact, including the infrared channel, and lets users remove dust, adjust images without altering the originals, calibrate colors with ArgyllCMS, and export results as TIFF, JPEG, PNG, or DNG files.

Schaller applied the same method to fix the camera on his Lenovo ThinkPad X1 Carbon Gen 14 Aura Edition, which under Linux produced images that were too dark, with noticeably darker corners and a yellow-green tint. The laptop uses a Sony IMX471 sensor and Intel's IPU7 imaging system, but unlike the scanner, its internal MIPI camera didn't generate USB traffic for Claude to examine. He worked around that by feeding Claude the Windows driver's configuration files, registry entries, ACPI tables, and device properties, and hooking up a USB webcam to provide a working camera for comparison. By day's end, he had patches for the Linux kernel and libcamera that addressed a crop-selection bug, an incorrectly defined test-pattern register, an analog gain limit costing roughly 1.8 stops of sensitivity, missing lens-shading correction that left corners about 2.7 stops darker than the center, and a mismatch in how sensor data and black levels were calculated that threw off white balance. In Schaller's low-light test, frame brightness climbed from 31.1 to 90.9, and color ratios shifted much closer to the reference webcam. Work remains—in low light, the blue channel sits about 17% below the reference, and neither set of patches has been merged yet, with Kate Hsuan at Nvidia reviewing the kernel changes and Wim Taymans at Red Hat handling the libcamera work.

The released hw-harness runs the manufacturer's Windows driver in a KVM virtual machine with the physical device passed through to the guest, while Claude operates the Windows session remotely and usbmon captures traffic on the Linux host. The developer then switches the device back to Linux, repeats the operation with the experimental driver, and has Claude compare the traces. Schaller says the approach can produce a driver that "a maintainer can actually merge," though licensing questions remain and the generalized harness hasn't yet been tested across a broad range of hardware. The repository includes winctl for controlling the Windows VM, usbcap for capturing traffic, hostdev for switching devices between host and guest, and hwdbg for Linux-side debugging, with PowerShell scripts collecting device descriptors, registry entries, ACPI tables, and INF files. Organizations betting on AI-assisted development will need to weigh the tooling investment against maintainer acceptance, especially when intellectual property chains cross proprietary Windows drivers. The real test isn't whether agents can generate mergeable code, but whether kernel maintainers will accept the risk and overhead that comes with it.