Skip to content

Commit e508dcf

Browse files
chadmedalyssarosenzweig
authored andcommitted
blog: add 6.16 progress report
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
1 parent 043b92c commit e508dcf

File tree

3 files changed

+231
-0
lines changed

3 files changed

+231
-0
lines changed
Lines changed: 231 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,231 @@
1+
+++
2+
date = "2025-08-07T22:00:00+10:00"
3+
draft = false
4+
title = "Progress Report: Linux 6.16"
5+
slug = "progress-report-6-16"
6+
author = "James Calligeros"
7+
+++
8+
9+
With Linux 6.16 now out in the wild, it's time for yet another progress report!
10+
As we mentioned last time, the Asahi and Honeykrisp Mesa drivers have finally
11+
found their way upstream. This has resulted in a flurry of GPU-related work, so
12+
let's start there.
13+
14+
### No missing nuts in this Flatpak
15+
For quite some time, we have maintained a version of our Mesa driver built against
16+
the Flatpak runtime and shipped it as a Flatpak runtime extension. This was required
17+
to enable GPU acceleration on Flatpak while our Mesa driver was not enabled upstream.
18+
As Flatpak runtime version 23.08 reaches end of life this month, this will no longer
19+
be necessary. 24.08 now ships with Mesa 25.1, and so will the forthcoming 25.08
20+
runtime. Once 25.08 is released, we will be discontinuing the Flatpak runtime
21+
extension as it will serve no purpose.
22+
23+
### A _fully_ upstream graphics stack
24+
Asahi uses DRM Native Context to paravirtualise the GPU. Rather than having to
25+
virtualise high-level APIs like DirectX and Vulkan, the VM runs the userspace component
26+
of the host's native GPU driver. The host is then passed native GPU commands that it
27+
only needs to forward on to the kernel without modifying. This improves GPU
28+
performance inside muvm, our virtual machine for [gaming on Asahi Linux](https://asahilinux.org/2024/10/aaa-gaming-on-asahi-linux/).
29+
Until now however, this has relied on downstream patches to virglrenderer and Mesa.
30+
31+
We are pleased to announce that our DRM Native Context implementation has now
32+
been merged into the upstream virglrenderer project, and will therefore be enabled
33+
in upstream Mesa 25.2! This completes our transition to a fully upstream graphics
34+
stack, and as such we are retiring our Mesa fork completely.
35+
36+
### GPU go brrrrr
37+
Now that our Mesa driver is totally upstream, work on improving it has been able to
38+
occur rapidly. Alyssa has been hard at work over the past couple of months optimising
39+
performance. [A whole mess of merge requests](https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/?sort=created_date&state=merged&label_name%5B%5D=asahi&author_username=alyssa)
40+
have found their way upstream, with the bulk of them being merged in time for the
41+
release of Mesa 25.2. Performance improvements are variable but decent, especially
42+
when paired with [this month's improvements](https://fex-emu.com/FEX-2508/) to FEX's JIT.
43+
44+
### A fine vintage
45+
Also new in Mesa 25.2 is support for `VK_EXT_map_memory_placed`, courtesy of
46+
chaos_princess. This Vulkan extension allows applications to request GPU memory
47+
be mapped at a specific address. WINE uses this when thunking 32-bit DXVK to
48+
ensure any memory allocated by the GPU driver is within a 32-bit address space.
49+
This is required to enable GPU acceleration for 32-bit Windows applications.
50+
What's that? Your 32-bit games already work in FEX? Well...
51+
52+
The stack we currently ship to enable gaming is quite a beast. At the bottom
53+
we have muvm, which spins up a micro VM (who would've guessed) using a kernel
54+
configured with 4K memory pages. FEX as it ships today requires this; the x86
55+
architecture only supports 4K pages and we cannot "split" a memory page into
56+
smaller pages, only combine them to create pages of a larger size. Atop that
57+
is FEX, which translates x86 binaries so they can run on 64-bit ARM devices.
58+
But binary applications are very rarely self-contained monoliths. They require
59+
access to kernel functions via syscalls, system libraries like glibc, and
60+
access to the GPU via APIs like Vulkan.
61+
62+
The obvious solution---and the one used by FEX---is to translate the entire
63+
world. When FEX loads an x86 or amd64 application, its loader pulls whichever
64+
libraries the application binary is linked to from a disk image or mount point
65+
containing a multilib amd64 root filesystem, and translates them. The benefit
66+
here is that the application we want to run gets ABI-correct, native versions of
67+
any libraries it's linked against. The disadvantages, however, are significant.
68+
69+
The image needs to have whichever libraries any arbitrary application could
70+
realistically be linked to. We either accept that some applications simply will
71+
not run, or we ship everyone an enormous filesystem image full of libraries for
72+
a foreign machine that they will likely never use. There are also the runtime
73+
costs associated with translating a bunch of libraries and faking syscall
74+
interfaces for their benefit. We can do better than this.
75+
76+
The emulation stack is being used overwhelmingly for gaming via WINE/Proton.
77+
For the sake of simplicity, let us simplify the problem space and say that our
78+
goal is not to run x86 Linux applications, but x86 Windows applications, and
79+
games especially.
80+
81+
Users of Windows on Arm will have noticed that it can run x86 applications.
82+
I'll spare you the Windows NT history lesson for today, but the NT team's almost
83+
religious focus on abstraction, portability and backward compatibility for nearly
84+
40 years has given us three _very_ important and beneficial features:
85+
86+
- WoW64, which thunks out 32-bit system calls to their 64-bit counterparts
87+
- An API to plug binary translators into WoW64
88+
- 64K virtual memory pages, regardless of the underlying physical page size
89+
90+
Since WINE implements WoW64 and FEX implements the WoW64 binary translator API,
91+
AArch64 WINE is capable of running 32-bit x86 applications. Since all Windows
92+
applications are allocated 64K pages, we _theoretically_ (more on this in a bit)
93+
don't need to worry about page size. With `VK_EXT_map_memory_placed`, all of the
94+
pieces of the puzzle are now in place; AArch64 WINE can now run 32-bit Windows
95+
applications and games _without_ muvm!
96+
97+
- We no longer have to paravirtualise the GPU, network access, or filesystem
98+
- We no longer have to mangle and proxy the X11 or PipeWire protocols
99+
- WINE can now use Wayland directly rather than be forced through XWayland
100+
- FEX only has to translate x86 Windows code; WINE calls out to native AArch64 64-bit Windows
101+
and \*nix
102+
103+
That said, your mileage may vary...
104+
105+
While it's true that Windows allocates 64K virtual memory pages, not all applications
106+
respect this. Windows application developers have a long tradition of simply
107+
ignoring the Windows API, with game developers committing particularly heinous crimes
108+
in pursuit of performance. This often means baking x86-isms like 4K physical memory
109+
pages into code. Any applications which do this simply will not work, and will continue
110+
to require the use of muvm. You will however be able to use WoW64 inside muvm, and these
111+
applications will still reap most of the benefits from doing so.
112+
113+
You should also expect bugs in FEX and WINE, though unlike broken Windows
114+
applications from 2003, these have a pretty good chance of being fixed.
115+
116+
Want to try this out for yourself? Some distros already make this seamless; thanks
117+
to chaos_princess once again, Gentoo automatically installs FEX's WoW64
118+
implementation on AArch64 systems when the `wow64` USE flag is enabled. Simply
119+
install your preferred WINE flavour with the `wow64` USE flag and create a new
120+
WINE prefix to get started!
121+
122+
On other distros, you will need to do some extra work:
123+
1. Ensure your distro builds AArch64 WINE with WoW64 enabled. This is not currently
124+
the case for Fedora, but is coming soon!
125+
2. Install WINE using your native distro packages
126+
3. Download the latest `fex-emu-wine` build from the [FEX Ubuntu PPA](https://launchpad.net/~fex-emu/+archive/ubuntu/fex/+packages)
127+
4. Extract `libwow64fex.dll` _only_ to`/usr/lib/wine/aarch64-windows/xtajit.dll`
128+
5. Create a new WINE prefix
129+
130+
Once you have a WINE prefix all set up, you can start enjoying your x86 Windows
131+
applications in a much improved fashion!
132+
133+
<figure>
134+
<a href="/img/blog/2025/08/lsw.png">
135+
<img src="/img/blog/2025/08/lsw.png" alt="LEGO Star Wars (2005) running in native AArch64 WINE using DXVK" />
136+
</a>
137+
<figcaption>
138+
LEGO Star Wars (2005) running in native AArch64 WINE using DXVK
139+
</figcaption>
140+
</figure>
141+
<br>
142+
143+
What about amd64/x86_64/x64 applications, you ask? Well unfortunately there are some challenges
144+
unique to making amd64 Windows code run on an AArch64 Windows environment which mean we don't support this style of emulation for amd64 Windows applications.
145+
146+
<figure>
147+
<a href="/img/blog/2025/08/npp.png">
148+
<img src="/img/blog/2025/08/npp.png" alt="AMD64 Notepad++ running in WINE's ARM64EC mode" />
149+
</a>
150+
<figcaption>
151+
AMD64 Notepad++ running in WINE's ARM64EC mode
152+
</figcaption>
153+
</figure>
154+
155+
_...Yet._
156+
157+
### We're getting there...
158+
As always, we have been hard at work upstreaming various bits and pieces.
159+
160+
Devicetree bindings for the GPU have been accepted and merged for 6.17, which allows
161+
us to stabilise how m1n1 initialises the GPU and forwards information onward to
162+
the kernel.
163+
164+
The SPMI controller driver, required for power management, landed in 6.16. The
165+
USB-C mux chips used in M3 Macs and above are also connected via SPMI bus, making
166+
this driver necessary for USB on those machines.
167+
168+
A bunch of audio-related patches have landed in 6.16 and are queued for 6.17. Some
169+
of these patches rework the upstream I<sup>2</sup>S controller driver, allowing
170+
the speaker amps to feed speakersafetyd the data it needs. This brings us very
171+
close to being able to upstream everything required to support speakers upstream.
172+
173+
The core SMC driver has been accepted for 6.17, along with subdevice drivers for
174+
its GPIO controller and reset controller functions. Combined, these allow the
175+
upstream kernel to not only shut down and reboot Apple Silicon Macs, but also
176+
enable the WiFi/Bluetooth module and USB Type A ports on machines with them. Also
177+
in the pipeline for upstreaming is the hwmon driver to enable fan control and access
178+
to the myriad hardware sensors present on these machines, the SMC HID driver to support
179+
power button presses for suspend/resume, and the SMC RTC driver to read and update
180+
the current system time.
181+
182+
With Linux 6.16, we also hit a pretty cool milestone. In our first progress report,
183+
we mentioned that we were carrying over 1200 patches downstream. After doing a little
184+
housekeeping on our branch and upstreaming what we have so far, that number is
185+
now below 1000 for the first time in many years, meaning we have managed to upstream
186+
a little over 20% of our entire patch set in just under five months. If we discount
187+
the DCP and GPU/Rust patches from both figures, that proportion jumps to just under half!
188+
189+
While we still have quite a way to go, this progress has already made rebases
190+
significantly less hassle and given us some room to breathe.
191+
192+
### Miscellaneous fixes
193+
Now that we have some time to do so, we have managed to progress a number of
194+
things that had been sitting on the backburner.
195+
196+
Plymouth, the system used to display a boot splash screen instead of TTY messages,
197+
broke its automatic DPI scaling on 13-inch laptops at some point recently. We have
198+
now been able to fix this.
199+
200+
A recent update to OBS broke screencasting on KMSRO systems implementing DRM
201+
explicit sync. This was found to be caused by compositor bugs, and has been fixed
202+
in [kwin](https://invent.kde.org/plasma/kwin/-/merge_requests/7941), and a merge
203+
request has been raised for [Mutter](https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4547).
204+
As those fixes are not yet released and other compositors might have the same issue,
205+
Janne added DRM syncobj support to the DCP driver in [asahi-6.15.8-1](https://github.com/AsahiLinux/linux/releases/tag/asahi-6.15.8-1)
206+
as a workaround.
207+
208+
Development on m1n1 has also started picking up again. The release of
209+
[1.5.0](https://github.com/AsahiLinux/m1n1/releases/tag/v1.5.0) marks the first new
210+
release since February. A number of small fixes were able to be merged, including
211+
a fix for boot time crashes caused by missing calibration data on Macs that have had
212+
their WiFi/Bluetooth module replaced. We also made it easier for distros to
213+
add a custom logo to m1n1.
214+
215+
### Conference talks
216+
Davide and Neal presented at [Red Hat Summit](https://events.experiences.redhat.com/widget/redhat/sum25/SessionCatalog2025/session/1731519631980001Xort)
217+
and [DevConf.CZ](https://pretalx.devconf.info/devconf-cz-2025/talk/P3TEBA/),
218+
covering the ongoing work on Fedora Asahi Remix and introducing a CentOS Stream port
219+
as part of their work in the CentOS Hyperscale SIG. This was also covered
220+
at [CentOS Showcase](https://cfp.fedoraproject.org/centos-showcase-2025-07/talk/RRT8NW/) in July.
221+
222+
### Project merch
223+
Want to show your love for Asahi Linux to the world? Now you can! Head over to
224+
[HELLOTUX](https://www.hellotux.com/asahi) to buy official Asahi Linux merch. A portion
225+
of each sale is donated to the project. Many thanks to HELLOTUX for facilitating this!
226+
227+
### Until next time!
228+
Our next report should hopefully bring even more improvements and developments,
229+
so make sure to stick around. As always, a warm thanks goes out to our supporters
230+
on [OpenCollective](https://opencollective.com/AsahiLinux) and [GitHub Sponsors](https://github.com/sponsors/AsahiLinux),
231+
without whom this would not be possible.

static/img/blog/2025/08/lsw.png

1.44 MB
Loading

static/img/blog/2025/08/npp.png

155 KB
Loading

0 commit comments

Comments
 (0)