Email or username:

Password:

Forgot your password?
Asahi Linya (朝日りにゃ〜)

✨ KDE runs on the Apple M2!!!! ✨

With full GPU acceleration! 🚀🚀
Running Xonotic, glmark2, and eglgears at the same time!!

My 🦀 Linux kernel driver now supports the M2!! And it works out of the box with @alyssa's Mesa driver, no userspace changes needed~!!

95 comments
rick
@lina wuhu, good job :blobcatpat:
And thanks for the stream~
gravityWall

@faye oh wait fuck yes you don't need it forget I pinged you aaaa

Michael Miller :blobrdm: 🦆

@lina @alyssa I watched your stream today, this was quite exciting!

Lorenzo🐧

@lina @alyssa Ohhh! Nice! Thank you!

So I guess I just need to pull the rust-wip branch of asahi kernel to get this?

Do you happen to know where Alyssa's mesa driver lives? :>) thanks!

github.com/AsahiLinux/linux/co

Eric Engestrom 💙

@ljs gitlab.freedesktop.org/asahi/m branch `main` (the default branch); also note that this branch isn't stable and will be rebased, so be prepared for that.

Lorenzo🐧

@1ace Cheers Eric :) Yeah I run my m2 in a _mega_ unstable tip state w/custom kernel and yada yada so I'm happy to rebase and build from source.

Main thing is seeing M2 support in the device tree :>)

Lorenzo🐧

@lina @1ace Ahhh thanks that's an important one to note!

Thank you very much for your efforts, very much appreciated!

Lorenzo🐧

@lina @1ace is there a config file somewhere to use for the kernel? :) I am messing something up and seeing a freeze on startup unless I enable drm_simpledrm :(

Asahi Linya (朝日りにゃ〜)

@ljs @1ace I have a gist with a config from a few days ago, though today I had to add a bunch of M2 stuff (mostly related to the trackpad/USB since I had some of that turned off for the Mac Mini) but nothing related to video.

Oh, you also need to disable BTI (arm64.nobti)! Rust is broken with that.

Asahi Linya (朝日りにゃ〜)

@ljs @1ace You do have DRM_APPLE, right? That's the display driver ^^

Lorenzo🐧

@lina @1ace I was trying with DRM_APPLE and freeze, then only DRM_ASAHI and also freeze :) it seems to freeze if DRM_SIMPLEDRM is not set.

Do you have a link to that gist (sorry if I'm being lazy here :)?

Asahi Linya (朝日りにゃ〜)

@ljs @1ace Normally you should have all three, but make sure you don't have EFIFB (that one's problematic). The DCP driver (DRM_APPLE) should take over simpledrm. Asahi is the render only GPU driver.

gist.github.com/asahilina/8090

Lorenzo🐧

@lina @1ace Strange it seems like DRM_APPLE doesn't override simpledrm for me. Maybe I'm missing a step? I have an m2 air unless that is one that's unsupported now? 😢

Asahi Linya (朝日りにゃ〜) replied to Lorenzo🐧

@ljs @1ace Check dmesg, it should log if something went wrong. You did update m1n1 together with the device trees from the kernel branch, right? ^^

Lorenzo🐧 replied to Asahi Linya (朝日りにゃ〜)

@lina @1ace dmesg was giving me nothing on drm.

Yeah have updated m1n1 and added dtb files to boot.bin

btw I very much appreciate wasting your time with my stupid laptop issues 🤣 I realise you are doing me a favour here :)

Lorenzo🐧 replied to Asahi Linya (朝日りにゃ〜)

@lina @1ace Oh hang on I may have made a VERY stupid mistake... 🤦 let me report back....

Lorenzo🐧 replied to Lorenzo🐧

@lina @1ace OK so I made a silly mistake of not updating a script to copy the right DRB files to the boot.bin (doh!)

That's fixed now, but getting:-

apple-drm soc:display-subsystem: Failed to add to iommu group 0: -17

Lorenzo🐧 replied to Lorenzo🐧

@lina @1ace OK enabling apple_dart and iommu_io_pgtable_dart seemed to fix that, but now the display doesn't want to be available however drm_apple is loading properly and I get backlight control (yay!) but no gfx as of yet...

still investigating

Lorenzo🐧 replied to Lorenzo🐧

@lina @1ace

Seems 'cannot find any crtc or sizes' is the isue. Also 'RTKit: failed buffer request for 0x10000 bytes' from apple-dcp.

Lorenzo🐧 replied to Lorenzo🐧

@lina @1ace fwiw iova for failed dma alloc is 0x800824000

Lorenzo🐧 replied to Lorenzo🐧

@lina @1ace actually that's the pointer of the field the dma handle is put in haha so not so useful.

Looks like it's

err = rtk->ops->shmem_setup(rtk->cookie, buffer);

That is reporting -ENOMEM.

Lorenzo🐧

@alyssa @lina Thanks and thank you very much for your hard work!

Botch Frivarg

@lina @alyssa this is so awesome! This work (and the work of all others on Asahi Linux) makes me consider picking up a mac in the future!

iRobi

@lina @alyssa Fantastic!!! Any way to use? Asahi repo, GitHub, any? 🥹

walter4096

@lina @alyssa

incredible work. linux everywhere.. GL everywhere

Asahi Linya (朝日りにゃ〜)

@blackFalconKing @alyssa Bare metal!

Technically it was a custom thin VM for debugging, but it makes no difference, it works bare metal too!

Zeno Libre

@lina @alyssa
Thank you for the response. I use exclusively GNU/Linux the last 20 years but want to try it on Arm with long battery life and also for trying something new. I think the Asahi tems have been doing exceptional work and perhaps it's about time for me to give it a go and get my first apple product! I just don't think that I can adjust to a closed, remotely managed ecosystem and your OS is the way out of it.

Miga

@lina @alyssa My urge to get an M2 machine isn't being helped by this news. This is neat!

loveisgrief

@MigaIsNotACat
Why give money to a megacorp to install #linux, when you could buy hardware that supports linux out of the box? See @tuxedocomputers 😉
@lina @alyssa

Davide Bettio

@lina @alyssa are you using X11 or Wayland? Do they both work?

Asahi Linya (朝日りにゃ〜)

@bettio @alyssa Wayland, but they both work! Though X11 isn't really the best idea because it doesn't play well with the design of the display controller (unrelated to the GPU!) so some apps/compositors have trouble, and you get tearing.

Xwayland is fine though, of course!

Davide Bettio

@lina @alyssa すごい! what about plasma / qmlscene? Does it run using acceleration?

as400 🇪🇺 🇺🇦 🐧

@lina @alyssa I am starting to wonder whether I am from the same planet as you both are... hmmm... F@#$ing congrats to you both. Respect ! 🦇

UkeBLCatboy

@lina That's so cool!

Now you can run a functional OS on your overpriced non upgradable propietary computer! JAY! :D

(Sorry, it IS cool but I just don´t like macs LOLZ)

loveisgrief

@UkeBLCatboy
It's pretty cool and when the #Malus hardware becomes inevitably unsupported, #linux can be installed on it to five a new life

@lina

UkeBLCatboy

@loveisgrief @lina agreed! But it's still twice the price of an other pc because of the apple logo 😂

Sobex

@lina @alyssa when should we be expecting it to be released in Asahi Linux ?

iKarim

@lina @alyssa You are all VERY talented individuals!

geography

@lina @alyssa time to edit the wikipedia page?

> Although it can display a graphical user interface, it does not currently support any graphics acceleration, as this involves creating device drivers for Apple silicon's proprietary GPU from scratch.

aritrasaha

@lina @alyssa when it will be upstream to the mainline kernel can we expect it to be in kernel 6.3 merge window or later i really want to use it with a non arch base system but arch is good.

Asahi Linya (朝日りにゃ〜)

@quantum Upstreaming will take many months! That requires stabilizing the UAPI, which still needs many changes to properly support Vulkan! Plus upstream doesn't have a lot of the Rust for Linux work merged yet, and there are a lot of things to review including the DRM bindings!

HagbardCeline

@lina what is your fps? ITS OVER 9000! 😜

Benoit

@lina @alyssa

Have you tried Wayland? Does it work?

R. L. Dane :debian: :openbsd:

@lina @alyssa

Whoa, how do you get eglgears to run with a transparent background?

Peter H. Fröhlich

@lina @alyssa I don't even do Macs but I still think it's awesome that you're getting that hardware handled (and one would imagine also implicitly documented, or did Apple provide documentation?).

Nicolai Ireneo-Larsen

@lina @alyssa That’s very cool! I hear gaming on MacOS is atrocious.

🔒>_

@lina @alyssa is it ready to use or still alpha/beta? Great job!

Thibault Cordier

@lina @alyssa that's great, awesome work
What is missing now ?

Paul Spencer

@lina What's the performance comparison like with M1 vs M2 currently? Does it use any of the bits that make the M2 faster or is it just compatibility?

Gabriel Pettier

@lina @alyssa incredible work! Really nice to see progress on support for these machines.

Rockj

@lina @alyssa I'm not a particular mac fan, but this is pretty bad ass getting it to work with M2.

Since this work is way out of my league of understanding, will this benefit "normal" linux users 'stuck' with normal PC's with a GPU from AMD or Nvidia? :')

Herr Irrtum!

@lina

You are UNBELIEVABLE, you know that?
If there was a poll about the smartest people on the planet, I'd vote for you, honestly!!

@alyssa

Anthk

@lina @alyssa There's a compatibility layer for Switch binaries a la Wine for Linux-ARM.
How well does it work in the M2?

Go Up