top | item 41799068

AAA Gaming on Asahi Linux

944 points| 6a74 | 1 year ago |rosenzweig.io

365 comments

order

Some comments were deferred for faster rendering.

dcchambers|1 year ago

From a performance and technical perspective this is incredible. Well done!

It will never happen, but my dream is for the Asahi devs, Valve, and Apple to all get together to build out a cross-platform Proton to emulate and play games built for Windows on both x86 and ARM hardware running Linux.

A Steam Deck with the performance and power efficiency of an M-series ARM chip and the entire library of games that run on Proton is just...dreamy.

rowanG077|1 year ago

I'm not sure if you know. But Alyssa, the person who basically wrote almost the entire userspace opengl and vulkan driver, works at valve.

WD-42|1 year ago

Apple is going to do the same thing they did with BSD, WebKit, etc. They will wait until proton is mature enough, fork it, then release it as their own. Why put in the effort this early on?

bmicraft|1 year ago

An ARM CPU only emulating x86 isn't going to be more efficient than straight x86. ARM is barely more efficient as it is at those performance levels.

The real reason Apple is ahead is because they're paying for more expensive more advanced nodes for their CPUs. I you compare CPUs on similar node sizes, you'll see that AMD and Intel are basically caught up architecturally in perf/W metrics.

johnnyanmac|1 year ago

that's ideally what Vulkan was for. Build for one common open source standard, and then Apple/Microsoft/Google/Linux can all build an API to support that.

But I guess there was never a time when an open graphics standard stood as the leader. Maybe during a brief stint in the Windows Vista era at best.

shmerl|1 year ago

You don't need Apple for that.

gchamonlive|1 year ago

It's more likely it'll be Qualcomm instead of apple and eventually an arm based steam deck. These chips just make a lot of sense for handheld devices.

alexr243|1 year ago

You can play windows game with this release in Asahi Linux! So it is possible now

tonyhart7|1 year ago

or you know, just release a game on native linux build

log_e|1 year ago

If you want it to happen, ask them for it every day. You are their constituent.

Wowfunhappy|1 year ago

> Tessellation enables games like The Witcher 3 to generate geometry. The M1 has hardware tessellation, but it is too limited for DirectX, Vulkan, or OpenGL. We must instead tessellate with arcane compute shaders

> Geometry shaders are an older, cruder method to generate geometry. Like tessellation, the M1 lacks geometry shader hardware so we emulate with compute.

Is this potentially a part of why Apple doesn't want to support Vulkan themselves? Because they don't want to implement common Vulkan features in hardware, which leads to less than ideal performance?

(I realize performance is still relatively fast in practice, which is awesome!)

VHRanger|1 year ago

> Is this potentially a part of why Apple doesn't want to support Vulkan? Because they don't want to implement common Vulkan features in hardware, which leads to less than ideal performance?

Yes, it's a big reason.

I tried to port the yuzu switch emulator to macos a few years ago, and you end up having to write compute shaders that emulate the geometry shaders to make that work.

Even fairly modern games like Mario Odyssey use geometry shaders.

Needless to say, I was not enough of a wizard to make this happen!

mrpippy|1 year ago

Metal 3 (in 2022) added mesh shaders, which can be used to emulate geometry shaders.

We (CodeWeavers) are doing this in (a fork of) MoltenVK, and Apple’s D3DMetal is as well.

ribit|1 year ago

Apple not supporting Vulkan is a business decision. They wanted a lean and easy to learn API that they can quickly iterate upon, and they want you to optimize for their hardware. Vulkan does not cater to either of these goals.

Interestingly, Apple was on the list of the initial Vulkan backers — but they pulled out at some point before the first version was released. I suppose they saw the API moving in the direction they were not interested in. So far, their strategy has been a mixed bag. They failed to attract substantial developer interest, at the same time they delivered what I consider to be the best general-purpose GPU API around.

Regarding programmable tessellation, Apple's approach is mesh shaders. As far as I am aware, they are the only platform that offers standard mesh shader functionality across all devices.

mandarax8|1 year ago

Geometry shaders are not part of base Vulkan. They're an extension.

shmerl|1 year ago

That might be an excuse, but that's hardly a reason. They are simply extreme lock-in proponents and don't want to support cross platform graphics API. That's the real reason.

gigatexal|1 year ago

I’m just blown away at all the work they’re able to do with a platform that they basically reverse engineered. I’m glad to be contributing to their efforts. I’m also waiting for when M3 support comes! Such a cool group of engineers and hackers. I love it.

spease|1 year ago

This is super cool.

So, wait, does this mean that gaming is better on Linux, on a Mac?

hu3|1 year ago

I've been gaming on Linux since Warcraft 3 days.

Wine is wonderful and with Valve's help it only got better.

But why would gaming on a mac be better? Maybe one day, but for now:

FTA: "While many games are playable, newer AAA titles don’t hit 60fps yet."

GeekyBear|1 year ago

Emulation has unavoidable overhead.

For instance, Alyssa mentions in this post that most emulated games will need at least 16 Gigs of RAM at minimum.

In addition, native ARM games on MacOS don't have the additional overhead of emulating a different CPU architecture and Graphics API.

However, that doesn't take away from this emulated support being an amazing achievement.

dagmx|1 year ago

No, you’ll still get better performance, more features supported and lower overhead running with Game Porting Toolkit currently.

That includes raytracing support and heterogeneous paging support which are two things Alyssa calls out explicitly herself. Not to mention the VM overhead.

That’s not to say Alyssa’s work is not very impressive. It is. But GPTk is still ahead.

That’s not even including the other aspects of Mac support that Asahi still needs to get to. Again, very impressive work, but the answer to your question is No.

m463|1 year ago

If you mean "I have a mac, is it better to run linux to game?"

Then there's a case for it, since you can run AAA games that apple + macos doesn't support / allow.

whimsicalism|1 year ago

I will have to check this newest development out, but as someone who dual boots Asahi and MacOS - up until now MacOS with Crossover has definitely been the best experience, if you are willing to pay

ojdon|1 year ago

Yeah it has been for a while. The steam deck runs Linux out of the box.

Valve and open source devs have put a lot of effort over the years on projects like Photon which is a translation layer for Windows games.

bee_rider|1 year ago

The M-series chips from Apple have some special hardware to help emulate x86 with near-native performance, right? I wonder if they take advantage of those features (actually I forget exactly what the features were).

I mean this is an incredible achievement either way. Everything is emulated, but they are still running AAA games. Wow.

sumuyuda|1 year ago

They are using it:

Other than the page size issue, FEX and Rosetta are comparable technologies (both are emulators, despite what Apple marketing might have you believe). Both FEX and Rosetta use the unique Apple Silicon CPU feature that is most important for x86/x86_64 emulation performance: TSO mode. Thanks to this feature, FEX can offer fast and accurate x86/x86_64 emulation on Apple Silicon systems.

From: https://docs.fedoraproject.org/en-US/fedora-asahi-remix/x86-...

saagarjha|1 year ago

No reason they can’t.

mikhael28|1 year ago

Fantastic! A great proof of concept on Linux - lots of AAA gaming is already possible on Mac with Crossover and/or Parallels or VMWare Personal, which is free! While I have a Steam Deck, gaming on Mac works for me - I refuse to play Baldurs Gate 3 on a controller.

dcchambers|1 year ago

I know it's an extremely un-Apple-like thing to do, but I really wish Apple would team up with Valve to work on Proton, and bring full Proton support to MacOS.

zaptrem|1 year ago

Don’t forget Apple’s GamePortingToolkit based on Crossover/Wine and the open source client for it Whisky. I think it supports most games Linux Proton does now.

cherryteastain|1 year ago

You can hook up a monitor, mouse and keyboard to your Steam Deck to be fair.

WithinReason|1 year ago

BG3 is the only RPG I would play on a controller, it's very well done. You can also connect a keyboard and monitor to the Steam Deck, BG3 runs at 1080p high locked to 30FPS

opan|1 year ago

>While I have a Steam Deck, gaming on Mac works for me - I refuse to play Baldurs Gate 3 on a controller.

Personally 99% of my Steam Deck usage is with it docked. I do mostly use a controller, but also have it hooked to the same USB switch as my PC so I can hit a button to move my keyboard and mouse over.

Baldur's Gate 3 is the first game I ever ran on my Deck that did not run very well, though. Most stuff I've played runs at 60fps at my external monitor's 1920x1200 resolution. That in addition to not liking the gameplay on BG3 much made me not continue with the game, though I may revisit it someday.

nottorp|1 year ago

> I refuse to play Baldurs Gate 3 on a controller

I think you picked as an example one of the games that actually has a native Mac version?

Or is it a well hidden wine package? I've played it start to finish on Macs only and it looked too smooth to be emulation to me.

jack_pp|1 year ago

truth is macs have such a small market share for gaming that it ain't worth the effort

amoss|1 year ago

I'm slightly confused after reading about page alignment. Why would a 16k page be less aligned than a 4k page causing assumptions about pointers within those pages to break? The 4k pages on x86 are aligned on 4k boundaries, are the 16k pages on M1 aligned on <4k boundaries?

y1n0|1 year ago

There are more 4k boundaries than 16k boundaries. The issue is code compiled for 4k boundaries running on a 16k system.

joelthelion|1 year ago

Realisticly speaking, is Asahi Linux usable right now for a random schmuck who just wants to use his computer?

umanwizard|1 year ago

Depends what kind of computer you have and what you want to do with it. M3 does not work at all. M1 is the best supported but even there some important things like microphones and thunderbolt still don’t work.

lynguist|1 year ago

May I use this space to ask the question: is the M3 substantially different from the M1 and M2 that it is not supported?

pbasista|1 year ago

From what I understand, one of the factors to not focus on Asahi Linux on M3 for now is the lack of an M3 Mac Mini which supposedly makes the development easier.

ribit|1 year ago

M3 GPU uses a new instruction encoding, among other things. Also, it has a new memory partitioning scheme (aka. Dynamic Caching), which probably requires a bunch of changes to both the driver interface and the shader compiler. I hope the Asahi team will get to publishing the details of M3 soon, I have been curious about this for a while.

gilgoomesh|1 year ago

I don't know how different but it apparently has dramatically improved hardware shaders compared to earlier M chips so I'm guessing that a lot of this might be different, there.

aykevl|1 year ago

M3 and M4 haven't been supported yet because they weren't a priority (looks like they've been focusing on gaming support for the last year or so).

Alyssa said in her talk that they'll probably get it working in 6 months or so: https://www.youtube.com/watch?v=pDsksRBLXPk&t=2932s

fl0id|1 year ago

Yes. And also some other peripherals are different.

geokon|1 year ago

last I check you can't even buy M1 macs on apple's website anymore (maybe it's region dependent)

ZiiS|1 year ago

For people like me who have been using Ashai for a while but are not Fedora natives; TIL `sudo dnf system-upgrade download --releasever=40; sudo dnf system-upgrade reboot` is necessary first as the normal upgrades left me on 39.

andrewmcwatters|1 year ago

I think at the moment, this is probably the only way to feasibly game on a Mac. Crossover and other Wine-based apps as well as Parallels are... not really truly possible. If you bought the top-of-the-line MacBook Pro 16-inch, 2021 with M1 Max and tried to play anything reasonably modern on it, you'd find the performance is basically not playable .

whimsicalism|1 year ago

I’ve been able to play a few games with crossover (like overwatch 2) fine. Whisky also works for some stuff.

I also run Asahi so will have to check this out to compare

tbillington|1 year ago

I beat elden ring on m1 pro using Whisky :)

Thaxll|1 year ago

I see that they're using FEX, what about box86? Is it comparable in term of performance?

58028641|1 year ago

box86 does ARM32 which isn’t supported by Apple Silicon

MBCook|1 year ago

I think my favorite little bit from the article is that they’re using a VM to “fix“ the page size differences between macOS and Windows.

What an ingenious idea.

freddydumont|1 year ago

I’d be curious to know how it compares to gaming on macOS with Game porting toolkit.

WD-42|1 year ago

Probably not all that different. Game porting toolkit is just WINE.

psanford|1 year ago

I'm a little sad that this has seemingly taken precedence over all other hardware support. M3 support, dp-alt mode, making the microphone work are all things that I was hoping were going to land in the past year.

pbasista|1 year ago

I understand the sentiment. But the people who could work on the Asahi Linux graphics stack are generally not the same as the people who could e.g. bring up Asahi Linux on M3 chips.

I would not consider the lack of activity in some Asahi Linux areas to be a conflict of priorities. It is in my opinion mostly a result of these lacking areas naturally attracting less developers capable of moving them forward.

talldayo|1 year ago

It's an Apple chip with no documentation and zero existent driver code to reference. You have to set realistic expectations here, and acknowledge that not every contributor is going to have the domain-specific knowledge required to make everything work. It's nothing short of a divine miracle that it has working Vulkan drivers you can download within a half-decade of it's release.

If you want more, you'll have to take it up with Tim Cook or God (both have a nasty habit of ignoring us little guys). Also an option: not using a laptop that treats Linux as a threat to it's business model.

dadoum|1 year ago

Alyssa Rosenzweig already talked a bit about that on her Mastodon. She said that after having worked to implement a GPU drivers, it was annoying that she never had the time to quite finish them. On each device release, she had to support the new device instead of polishing what she got.

floydnoel|1 year ago

I'm aware of no better way to see your desired features land in open source than to build them yourself. That is the power of open source, nobody can stop you!

vincentpants|1 year ago

AFAIK the M3 is going to take a lot longer as the asahi team leverages apple silicon in their CI which means mac mini servers and the M3 generation never got their mac mini. Of all the generations to finally take the plunge into apple silicon, I had to choose the weird one... (typing this on an M3 mbair and not on linux sigh)

Ah yeah, here's the post: https://social.treehouse.systems/@marcan/112277289414246878

WD-42|1 year ago

I mean this is the nature of the beast with arm and apple. It’s a closed system. There are some devs that are going to be willing to go through the effort just for the challenge of it, but most are just going to use x86/linux because you don’t have to actively fight against the vendor.

WorldPeas|1 year ago

all I need is DP alt mode and I'm switching!

qkhhly|1 year ago

can i play black myth wukong with it?

jayd16|1 year ago

This makes me think of the classic clip of George Carlin telling a joke about the difference between heaven and hell [1].

Is there a modern equivalent with FAANG, Microsoft, Sony, Valve, etc.?

[1]https://www.youtube.com/watch?v=oR8xPC4NEro

0xDEAFBEAD|1 year ago

In heaven, Microsoft is in charge of gaming, Amazon does the customer service, Apple is responsible for privacy, Facebook does the UI, and everyone works at Google.

In hell, Apple is in charge of gaming, Google does the customer service, Facebook is responsible for privacy, Microsoft does the UI, and everyone works at Amazon.

hentrep|1 year ago

I noticed the URL was updated for this post. Previously it linked to asahilinux.org which showed an anti-HN manifesto from the HN referral. Curious as I haven’t seen this before. Seems it has been covered by previous commenters: https://news.ycombinator.com/item?id=36227103

stepupmakeup|1 year ago

The manifesto is longer than the content...

ginko|1 year ago

How can the site even detect where a user is coming from? Browsers leaking this information seems like a huge privacy issue to me.

xbar|1 year ago

Thank you

    Alyssa Rosenzweig
    Asahi Lina
    chaos_princess
    Davide Cavalca
    Dougall Johnson
    Ella Stanforth
    Faith Ekstrand
    Janne Grunau
    Karol Herbst
    marcan
    Mary Guillemard
    Neal Gompa
    Sergio López
    TellowKrinkle
    Teoh Han Hui
    Rob Clark
    Ryan Houdek

dyingkneepad|1 year ago

Thank not only these people but also their employers for funding the work.

gertop|1 year ago

Marcan and asahi Lina are the same person.

preisschild|1 year ago

Is there actually any proof of that?

neoromantique|1 year ago

And we would care because...?

fl0id|1 year ago

Yeah yeah great, now please m3 support, or maybe before that support for internal mic and external displays/dp-alt. Pretty please? (Not complaining happy about any progress)

Philpax|1 year ago

kinda sounds like you're complaining, though

nxobject|1 year ago

If only I had "canapplesiliconemulatewindowsgames.com"!

dancemethis|1 year ago

Where's the real inspiration for Asahi, Fandaniel in FFXIV?

rowanG077|1 year ago

> Asahi means “rising sun” in Japanese, and it is also the name of an apple cultivar. 旭りんご (asahi ringo) is what we know as the McIntosh Apple, the apple variety that gave the Mac its name.

sylware|1 year ago

I still wonder why valve is that much reluctant at porting its proton stuff into the simple and plain C99 of wine/vkd3d.

seabrookmx|1 year ago

Likely because their engineers are more productive in C++?

Modern C++ with move semantics is a lot more easy to reason about and memory safe than C99, IMO.

Since it's a greenfield project, they didn't have to worry about the nasty baggage of legacy C++ spaghetti that kills most projects.

Just because you prefer "simple" C99 doesn't mean they do :)

aleden|1 year ago

Then what is proton written in? C++?

paulryanrogers|1 year ago

It is shocking the effort required to have a good gaming experience on Apple computers (excluding iOS). They always struck me as agnostic to games, yet in recent years it appears to border on open hostility.

kalleboo|1 year ago

Apple has always been anti-gaming. It's been in the companies DNA since the first Mac was derided as a "toy" for having a graphical user interface, and they overcompensated trying to make it a business machine with no games.

About once a decade someone inside of Apple who is really passionate about games pushes some project through - you had GameSprockets in the 90's, you had someone convincing Valve to port Half-Life, you have GamePortingKit now, but it's just not in the companies culture to give game developers the long-term support they need.

fl0id|1 year ago

They made gameportingkit, which got made into whisky app. So not totally hostile

snarfy|1 year ago

It was Jobs specifically that was anti-gaming. I'm not sure where Cook stands.

wly_cdgr|1 year ago

Ok, but why would a hardcore Linux person want to play games that embody everything they hate about Windows in their mode of production, data gathering practices, politics, etc?

_fizz_buzz_|1 year ago

People use Linux for a wide variety of reasons and those reasons are very often not ideological. If the only reason to use Linux was ideological, Linux wouldn't be as popular as it is.

Philpax|1 year ago

linux users like to have fun too

Also, there are plenty of Windows-only games that aren't subject to those practices. Free games, itch.io games, GOG games, etc. There's a big world out there!

viraptor|1 year ago

It's just a platform which is an available option. Nobody forces you to play games that you don't agree with for any reason.

umanwizard|1 year ago

There are lots of reasons to run Linux. Not everyone who runs it is a free software ideologue.

nottorp|1 year ago

Stay away from the companies requiring their own game store / "club" (i'm looking at you Rockstar) account and you're likely to be fine.