Apple Video Encoding (AVE) Hardware drivers for Linux on Apple M1 Machines


This one’s a short one, and quite technical, although I’ve tried to keep it to a summary 🤪.

In a similar vein to optimising GPU drivers on a refurbished M1 Max Macbook Pro under Fedora Linux Asahi Remix I also pointed some spare Claude tokens at bringing up the Apple Video Encoder hardware under Linux.

Of course I do not proclaim to be an expert on low level Apple ARM hardware… but I know enough to be dangerous 😆

You can TLDR by jumping to the repository here. This repository contains a working M1 Max AVE driver. I have not yet extended this to non M1 Max machines… but it shouldn’t take much to extend it to M1 machines generally.


We love a chart - AI accelerates, but this was by no means instant.

I initially began with the Claude Code harness running on the target machine itself. I had to do this as I was only holiday and didn’t have a second machine handy 😅. The agent started with an exhaustive static analysis of Mac OS and the AVE firmware, which is a lot more complex than the AVD firmware. This eventually turned out to be the wrong firmware to analyse because Asahi relies on an older stub Mac OS partition for booting Linux, and that partition uses older AVE firmware - the agent began its reconnaissance of the firmware with the latest Mac OS’s installed firmware. No matter, the analyis was repeated and the later firmware analysis was retained for later use. Later M-series machine support a wider range of codecs and options and the AVE firmware has changed to accommodate those improvements.


💸


This isn’t my first attempt at this with AI, that was a few months ago in March 2026… and the results weren’t great. I tried both the Claude agents and Deepseek V4 Pro - both struggled, Deepseek especially. I landed up having to recover the machine many times by going into the Apple “One True Recovery”/1TR firmware and copy in a backup m1n1 loader. This time round, though, things went a lot more smoothly.



I largely used Claude Opus 5 and I used Fable 5/5.1 to help out with tougher chunks of work and work reviews. Fable scores well in science and engineering tasks and it helped unblock the process a few times. I’m not entirely sure why it makes such a small apearance in the chart above - I remember it being used more, but there we go.


Older Opus models, in some cases 4.6, were used where prompts were blocked by Anthropic’s classifier system as “cyber” 😅

Sometimes a kernel panic produces these huge 3D “QR” codes containing a stack trace - pretty cool, but slow to debug with.


The bulk of the work involved static analysis of Mac OS binaries, followed by a lot of memory/register poking and fuzzing. The Claude agent managed to not brick the machine once, although there were hundreds of reboots.



The critical aspect of any work like this with AI is to try and remove the human from the feedback loop. In this case that was configuring the target machine to reboot on its own, moving the Claude Code harness to another machine and connecting an ethernet dongle to the Apple laptop/target machine for kernel panic logs. In practice these logs did seem to also stream out over wifi, but this wasn’t as reliable as a USB Ethernet dongle.



Debug access to m1n1 via USB serial was not used (and therefore not necessary for this), I suspect in large part to stub components of the device tree for AVE hardware already being present (someone else did this work). In know from previous experience that figuring out how to power up the hardware in the first place is a huge battle that has a lot of loop delays associated with it due to system watchdog resets and kernel panics.


Naturally using AI for something like this is a controversial topic, and performing static analysis on Apple binaries is hardly clean room reverse engineering - but I got what I wanted: working AVE hardware under Linux - and hopefully this work is re-usable elsewhere.