|
| 1 | ++++ |
| 2 | +date = "2025-03-21T09:00:00+10:00" |
| 3 | +draft = false |
| 4 | +title = "Progress Report: Linux 6.14" |
| 5 | +slug = "progress-report-6-14" |
| 6 | +author = "James Calligeros" |
| 7 | ++++ |
| 8 | + |
| 9 | +As March draws to a close and Linux 6.14 nears release, now is a good time to |
| 10 | +provide you all with our first major progress update since [taking the lead on |
| 11 | +the project](https://asahilinux.org/2025/02/passing-the-torch/). Going forward, |
| 12 | +we hope to keep these updates in sync with upstream kernel releases. We feel |
| 13 | +that this is a natural cadence given the focus on upstreaming, with enough time |
| 14 | +between posts for noteworthy downstream changes to accumulate. |
| 15 | + |
| 16 | +After getting through all the administrative work required to keep the lights |
| 17 | +on after marcan's departure, we've hit the ground running with upstream patch |
| 18 | +submission. We held our first board meeting under interesting circumstances, |
| 19 | +and we've even managed to sneak a couple of new features in downstream |
| 20 | +while you weren't looking. So, without further ado, let's get into it. |
| 21 | + |
| 22 | +## Our first board meeting |
| 23 | +We held our inaugural board meeting on 7 March, under challenging conditions |
| 24 | +for some. Neal and Davide battled crappy conference hall WiFi while at Southern |
| 25 | +California Linux Expo, while I sat in the dark with no power as Tropical Cyclone |
| 26 | +Alfred ravaged Southeast Queensland and northern New South Wales. Despite this, |
| 27 | +we managed to get through quite a bit. You can find the meeting minutes |
| 28 | +[here](https://asahilinux.org/docs/project/board/minutes/20250307). |
| 29 | + |
| 30 | +## Lightening the load |
| 31 | +After four years of development, we have racked up a considerable patch |
| 32 | +set. Here are some quick-fire stats: |
| 33 | + |
| 34 | +- 90,000+ lines of code added to the Linux kernel as of 6.13, across 1250 patches |
| 35 | +- A downstream U-Boot with a number of Apple Silicon and USB stack fixes |
| 36 | +- A downstream Mesa - required since our GPU uAPI is not upstream yet |
| 37 | +- A downstream virglrenderer - required since our GPU uAPI is not upstream yet |
| 38 | +- A downstream Flatpak runtime extension - required since we have a downstream Mesa |
| 39 | + |
| 40 | +This is... less than ideal. Rebasing, testing, and releasing |
| 41 | +our forks is a massive drain on our time. This is especially true |
| 42 | +of Janne, who has the Sisyphean task of keeping our kernel patch set applying |
| 43 | +upstream and porting it to every stable point release. That is hours of work |
| 44 | +on an almost weekly basis, especially as the pace of Rust abstraction upstreaming |
| 45 | +increases. We can't keep doing this. |
| 46 | + |
| 47 | +We want to bring you M3 and M4 support. We want to bring you Thunderbolt. We want |
| 48 | +to bring you DisplayPort Alt Mode. We want to bring you Variable Refresh Rate, and |
| 49 | +HDR, and hardware accelerated video playback, and better power management for the |
| 50 | +Pro/Max/Ultra Macs. To do that, however, we must start reducing the amount of patches |
| 51 | +we're carrying downstream. Most of what we're carrying is stable and has been |
| 52 | +for years. So after a month of tireless effort, how are we doing? |
| 53 | + |
| 54 | +We have submitted three new drivers upstream - the Image Signal Processor (ISP) |
| 55 | +driver, which is necessary for webcam support, and drivers for the Touchbar's |
| 56 | +display controller and input digitiser. These three drivers total to almost |
| 57 | +8,000 lines of code, with the ISP driver being 6,000 of those. The good news is |
| 58 | +that both Touchbar drivers have already been accepted! Thanks to chaos_princess |
| 59 | +for taking on the responsibility of preparing and submitting all three. |
| 60 | + |
| 61 | +Alyssa and Janne have been hard at work tidying up the GPU driver to prepare it for |
| 62 | +submission. This has involved some changes to the uAPI, which should slightly |
| 63 | +improve performance for some workloads. |
| 64 | + |
| 65 | +Now that Rust for Linux abstractions are starting to be merged at a healthy |
| 66 | +pace, we are faced with an emerging challenge. It is rare for |
| 67 | +any kernel patch to survive the mailing list without at least a couple of |
| 68 | +non-trivial changes, and Rust abstractions are no exception. Every time an |
| 69 | +abstraction used by our driver is merged, we must drop our downstream version |
| 70 | +and rebase the driver atop the version accepted upstream. This is gruelling, menial, |
| 71 | +and unpleasant work, and Janne has our deepest gratitude for volunteering his |
| 72 | +time to get through it. |
| 73 | + |
| 74 | +We have also been working to clean up and upstream other parts of the kernel. |
| 75 | +In addition to a number of miscellaneous fixes and changes for drivers already |
| 76 | +upstreamed such as the NVMe and I<sup>2</sup>C controllers, we have also submitted |
| 77 | +changes to the upstream Texas Instrumentes TAS2764 and TAS2770 speaker amplifier |
| 78 | +drivers which extend them to support the Apple-specific variants found in |
| 79 | +Apple Silicon Macs. Through this process, we found that the ASoC maintainers |
| 80 | +had already been cherry-picking some commits from our development branches! |
| 81 | + |
| 82 | +We're far from done, but we are committed to getting through this vital work. |
| 83 | +More patches are being submitted all the time, so watch this space! |
| 84 | + |
| 85 | +## Is this thing on? |
| 86 | +By the time you're reading this, we will have enabled microphone support on |
| 87 | +most laptops! This has been a long time coming, with Martin Povišer, Eileen |
| 88 | +Yoon, and chaos_princess having reverse engineered and developed a driver |
| 89 | +for the Always-On Processor (AOP) in Rust quite some time ago. This is Apple |
| 90 | +though. Nothing is ever simple. |
| 91 | + |
| 92 | +Before even getting to play with the mics in Linux, we hit a hurdle. |
| 93 | +On certain machines, the Secure Enclave is in the path of the physical mic |
| 94 | +data lines. If SEP is unhappy, you don't get mic access. chaos_princess |
| 95 | +quickly reverse engineered the SEP endpoint responsible, and wrote a |
| 96 | +stub driver to simply toggle the hardware mic switch on. With data now |
| 97 | +coming in to ALSA on all machines, we can continue. |
| 98 | + |
| 99 | +In all laptops released so far, Apple use three Pulse Density Modulation |
| 100 | +(PDM) mics wired up to an ADC and decimator in the AOP. All three mics are |
| 101 | +plumbed directly to userspace on separate channels, with no preamplification. |
| 102 | +Having three mics enables Apple to use beamforming, which is a signal processing |
| 103 | +technique to greatly enhance the directivity and sensitivity of an array of sensors. |
| 104 | +Originally developed for RADAR and military communications, it's now mostly known |
| 105 | +for being a marketing dot point for WiFi access points. It's also really, really, |
| 106 | +really hard. |
| 107 | + |
| 108 | +Unfortunately, PDM mics are very omnidirectional and very sensitive. We cannot |
| 109 | +get by without some kind of beamforming. I initially tried |
| 110 | +a very basic delay-and-sum beamformer, which involves no advanced signal |
| 111 | +processing. However since the mics are only about 2cm apart and only sample at |
| 112 | +48 kHz, we cannot achieve the temporal resolution required to make this |
| 113 | +approach work. Signal processing it is, then. |
| 114 | + |
| 115 | +The mysteries of signal processing in the acoustic domain are truly understood by |
| 116 | +very few. After consulting the scant available literature on the matter and my high |
| 117 | +school maths textbooks, I thought I had absolutely no hope of doing a good job of this. |
| 118 | +I put out a call for help on Mastodon, however no one offered to step up. Fine, I'll |
| 119 | +do it myself. |
| 120 | + |
| 121 | +After reading a few more papers, I found an approach that looked familiar to me. |
| 122 | +A Minimum Variance Distortionless Response beamformer works by taking your complex |
| 123 | +sample data in the time domain and using optimisation techniques weighted in a |
| 124 | +particular direction relative to a fixed point (usually some mic in the array). |
| 125 | +At some point, it clicked that this is really just statistics! |
| 126 | + |
| 127 | +After wrestling with Rust's immature scientific computing libraries for a few weeks, |
| 128 | +and even more reading of my high school maths and university statistics textbooks, |
| 129 | +the result was [Triforce](https://crates.io/crates/triforce-lv2) - an MVDR beamformer |
| 130 | +for the mics found in Apple laptops. |
| 131 | + |
| 132 | +Thanks to the groundwork laid in PipeWire and WirePlumber for speaker support, |
| 133 | +wiring up a DSP chain including Triforce for the microphones was really simple. |
| 134 | +We just had to update the config files, and let WirePlumber figure out the rest! |
| 135 | + |
| 136 | +Did it work? It's Rust, so it worked on the first try! When properly dialled in, |
| 137 | +the mic array is sensitive to signals coming from a "typical" seating position in |
| 138 | +front of the laptop, and mostly rejects noise from any other direction. Try it |
| 139 | +yourself - play some music out of your phone and move it around your laptop. It |
| 140 | +should become suppressed when moved out to the sides or behind the machine. |
| 141 | + |
| 142 | +Once again, a huge thanks to Martin, Eileen, and chaos_princess for their incredible |
| 143 | +work reversing AOP and SEP. |
| 144 | + |
| 145 | +## Fedora Asahi Remix 42 Beta |
| 146 | +Thanks to Davide's work validating builds, we are pleased to announce that Fedora |
| 147 | +Asahi Remix 42 is [now available](https://fedoramagazine.org/announcing-fedora-asahi-remix-42-beta/) |
| 148 | +as a beta! The final release is expected in about a month, bringing us closer than |
| 149 | +ever to releasing at the same time as Fedora. We hope that in the next cycle |
| 150 | +Fedora Asahi Remix 43 will release on the same day as Fedora Linux 43. |
| 151 | + |
| 152 | +## Asahi Linux @ SCaLE |
| 153 | +While at [SCaLE](https://www.socallinuxexpo.org/scale/22x), Neal and Davide managed |
| 154 | +to set up a demonstration of Asahi Linux running on an M2 Mac mini and an M1 Mac Studio |
| 155 | +in the expo hall. Reception was extremely positive, and folks had a blast playing a whole |
| 156 | +bunch of Steam games through muvm and FEX! We even managed to get kids involved by firing |
| 157 | +up Nidhogg, which proved to be the most popular game by far. |
| 158 | + |
| 159 | +## WoAoA |
| 160 | +Some astute users have noticed that ARM64 Windows VMs now work with KVM on |
| 161 | +Asahi! This is thanks to Oliver Upton, who submitted a rather large series of |
| 162 | +patches upstream to enable Arm PMUv3 emulation on Apple SoCs. WoA requires |
| 163 | +PMUv3, and until now we could not emulate it. We quietly cherry-picked those |
| 164 | +patches, and they are now incorporated into our latest kernels. Interested |
| 165 | +parties can try Windows on ARM on Asahi today! |
| 166 | + |
| 167 | +## What does the dxdiag say about its Feature Level? |
| 168 | +It's 12_0! Alyssa recently added sparse binding support to our Vulkan driver, |
| 169 | +which was the last piece of the puzzle for Direct3D Feature Level 12_0 via vkd3d-proton. |
| 170 | +Many more D3D12 games now run with the latest Mesa and FEX rootfs. |
| 171 | +Our Vulkan driver is not yet as mature as our OpenGL driver though, so performance |
| 172 | +and playability vary... but optimisations are coming soon. |
| 173 | + |
| 174 | +## Magic pairing |
| 175 | +Apple Silicon Macs have a neat feature whereby Bluetooth devices remain |
| 176 | +synchronised across all macOS installs, even recoveryOS. Information required |
| 177 | +to pair devices is stored in the machine's NVRAM. macOS checks the NVRAM |
| 178 | +for devices that it doesn't know about, and copies that data. Since |
| 179 | +they see the same Bluetooth controller in the Mac regardless of |
| 180 | +which macOS install is booted, devices will happily connect automatically without |
| 181 | +having to go through the pairing process again. This is really useful for |
| 182 | +ensuring that Bluetooth keyboards and mice work seamlessly across all environments, |
| 183 | +especially in recoveryOS. |
| 184 | + |
| 185 | +To replicate this in Linux, Janne developed [asahi-btsync](https://crates.io/crates/asahi-btsync). |
| 186 | +The tool reads the Bluetooth device information out of NVRAM and injects it into |
| 187 | +BlueZ's configuration. Up until a few weeks ago this was a manual process which |
| 188 | +required running asahi-btsync and connecting to the discovered devices manually. |
| 189 | +This is impractical for input devices which are required to be working for these |
| 190 | +actions. |
| 191 | + |
| 192 | +As of version 2.4, asahi-btsync integrates with systemd and D-Bus to |
| 193 | +fully automate the Bluetooth device synchronisation process. Starting with Fedora |
| 194 | +Asahi Remix 42, all Bluetooth LE devices paired with macOS will be available from |
| 195 | +your first boot - including the initial Fedora Asahi Remix setup! |
| 196 | + |
| 197 | +Do note however that this does not apply to Bluetooth 5.0 devices, which use a |
| 198 | +new authentication and encryption scheme. |
| 199 | + |
| 200 | +## OpenCollective and GitHub Sponsors |
| 201 | +When we stood up our [OpenCollective](https://opencollective.com/asahilinux), |
| 202 | +none of us really knew what to expect. We had hoped to maybe scrape together |
| 203 | +enough support to keep the domains and CDN going, but we dared not hope any harder. |
| 204 | + |
| 205 | +The sheer volume of support and the speed at which it flowed |
| 206 | +in left us floored and humbled beyond measure. Your faith in our work means more |
| 207 | +than can be expressed in words, and we seriously cannot thank you all enough. |
| 208 | + |
| 209 | +The financial support provided via OpenCollective allows us to continue our work |
| 210 | +with confidence. Not only do we have the cash we need to keep the project's |
| 211 | +existing infrastructure online, but we have the resources we have always wanted |
| 212 | +to ensure the project's viability long into the future. |
| 213 | + |
| 214 | +Until now, we have been mostly purchasing machines out of our own pockets. Given |
| 215 | +the nature of what we do, this can mean spending upwards of $10,000 a year on |
| 216 | +Macs. Not only is this unsustainable for us on an individual level, it |
| 217 | +also presents an enormous barrier to entry for talented folks who may not have |
| 218 | +the means to buy such expensive computers. The financial support provided by |
| 219 | +OpenCollective backers enables us to signficantly reduce that financial |
| 220 | +burden. This has already been invaluable for development work. |
| 221 | + |
| 222 | +The M1 MacBook Air is our most popular Mac by far, with almost 14,000 installations |
| 223 | +and counting. This represents almost 30% of the total install base. We couldn't |
| 224 | +possibly release microphone support without supporting it. Being able to simply |
| 225 | +buy the machine and get the work done without worrying about food for the next |
| 226 | +two weeks is the only reason we were able to ship mics in a timely manner. |
| 227 | + |
| 228 | +Buying hardware is not the only game-changing benefit afforded to us by your |
| 229 | +financial support. We can now actually build and maintain the CI farm we have |
| 230 | +sorely needed for years, which will accelerate development. We can afford email |
| 231 | +hosting and other collaborative infrastructure that greatly reduces friction. |
| 232 | +We can go to conferences and events without fear of going into financial stress. |
| 233 | +All of this is necessary to ensure the long-term sustainability of Asahi as a |
| 234 | +project, and none of it would be possible without you. |
| 235 | + |
| 236 | +For those who would prefer to support us via GitHub Sponsors, it's in the works. |
| 237 | +We have put in the request with GitHub to link our Sponsors account to our OpenCollective, |
| 238 | +however this has not yet been approved. Stay tuned for more. |
| 239 | + |
| 240 | +## What's next? |
| 241 | +While this month has been a whirlwind, literally in my case, we've started |
| 242 | +settling down into a rhythm that will work nicely in the near-term. Our primary |
| 243 | +focus is to continue submitting kernel patches upstream. Reducing our maintenance |
| 244 | +burden is the only way we will be able to get back to the fun stuff sustainably. |
| 245 | + |
| 246 | +Neal and Davide will be [presenting](https://events.experiences.redhat.com/widget/redhat/sum25/SessionCatalog2025/session/1731519631980001Xort) at [Red Hat Summit](https://www.redhat.com/en/summit) on 19 May, |
| 247 | +demonstrating Fedora Asahi Remix and the upcoming CentOS Hyperscale Asahi Remix |
| 248 | +to showcase how Asahi has made it easier than ever for developers to start bringing |
| 249 | +their workloads to ARM64 Linux. |
| 250 | + |
| 251 | +We hope to have even more good news for you when Linux 6.15 releases, so stay tuned |
| 252 | +for more updates! Once again, we sincerely thank everyone who has supported us so far. |
0 commit comments