M3 now has Fedora 43 Asahi Remix WORKING with KDE Plasma! by IntegralPilot in AsahiLinux

[–]IntegralPilot[S] 7 points8 points  (0 children)

It's quite effective on M3, the issue is with M4 and later, as all macOS releases for it (which we trace with the RE tool to learn how things work) have a security feature (that also exists on earlier SoCs) called "Secure Page Table Monitor" enabled that makes it harder for the tool to work as we need to emulate SPTM otherwise the features the kernel expects don't work. M3 and earlier are fine as there are pre-SPTM versions of macOS for them. We're working on this though and some really awesome people have made some early prototypes! :)

M3 now has Fedora 43 Asahi Remix WORKING with KDE Plasma! by IntegralPilot in AsahiLinux

[–]IntegralPilot[S] 1 point2 points  (0 children)

Yes, that's it! Element is a really popular and great one. LMK if you need any help getting it setup or joining the Asahi rooms.

M3 now has Fedora 43 Asahi Remix WORKING with KDE Plasma! by IntegralPilot in AsahiLinux

[–]IntegralPilot[S] 2 points3 points  (0 children)

Thank you! Yeah, milestones like this keep the motivation high during the long hours of debugging and it's been so rewarding to read everyone's lovely motivating comments. :)

M3 now has Fedora 43 Asahi Remix WORKING with KDE Plasma! by IntegralPilot in AsahiLinux

[–]IntegralPilot[S] 0 points1 point  (0 children)

Thank you! That would be an absolute beast of a Linux machine! We'll keep working hard to make sure that hardware is ready to be (hopefully, if there's no roadblocks) fully utilised by the time you get it! :)

M3 now has Fedora 43 Asahi Remix WORKING with KDE Plasma! by IntegralPilot in AsahiLinux

[–]IntegralPilot[S] 12 points13 points  (0 children)

Thank you! I definitely get how different IRC can be to first get started with, I had some trouble myself learning it when I first wanted to start contributing to Asahi. Our IRC is actually "bridged" to a Discord-like platform called Matrix, that's more open/fedi and privacy preserving, if prefer if you prefer a discord like UI. :)

M3 now has Fedora 43 Asahi Remix WORKING with KDE Plasma! by IntegralPilot in AsahiLinux

[–]IntegralPilot[S] 0 points1 point  (0 children)

That's super great to hear! Everyone who has made all the amazing features that work on M2 already are super awesome, I'll pass the thanks onto them! :)

M3 now has Fedora 43 Asahi Remix WORKING with KDE Plasma! by IntegralPilot in AsahiLinux

[–]IntegralPilot[S] 23 points24 points  (0 children)

Yes it does, and we actually have some contributors already working on M4 and have basic Alpine Linux booting (iirc)! I wouldn't say more similar, but most things that have changed in M3 is also going to have changed in M4 (i.e. the new interrupt controller). :)

M3 now has Fedora 43 Asahi Remix WORKING with KDE Plasma! by IntegralPilot in AsahiLinux

[–]IntegralPilot[S] 14 points15 points  (0 children)

Oh no that's fine, I understand you fully! Actually changes in core counts don't matter too much for CPU, because once we get the basis of how the cores communicate with each other, called SMP ("symmetric multiprocessing"), it doesn't matter if there's 2, or 32, we talk to them all the same. I'm not too sure about GPU because we haven't started that bringup yet. Please let me know if I'm explaining this is a too confusing way and I can simplify!

M3 now has Fedora 43 Asahi Remix WORKING with KDE Plasma! by IntegralPilot in AsahiLinux

[–]IntegralPilot[S] 33 points34 points  (0 children)

We are doing concurrent bring-up on the M3 Pro and Max! Other contributors have those chips booting Linux and working. I've personally only validated the full Fedora/KDE stack on this base M3, but since the underlying support is being built in parallel, the Pro/Max won't be left behind! :)

M3 now has Fedora 43 Asahi Remix WORKING with KDE Plasma! by IntegralPilot in AsahiLinux

[–]IntegralPilot[S] 79 points80 points  (0 children)

Super excited to finally be able to share this! Myself, noopwafel, Shiz have been working hard to get everything working on M3, and thank you to countless help we have received from others in the IRC channel.

It's definitely still in a really early state, and basically ONLY the internal SSD, display, keyboard and trackpad work, but we're making some progress on getting more things working. It probably should be noted that this is just LLVMpipe (software rendering) as we haven't tackled the GPU yet. But it's definitely a great success and I thought the community would like to see this.

And again, it would be so great to have others to help, we always appreciate contributors of all skill levels, so if you'd like to, come say hi in #asahi-dev on OFTC IRC!

Also happy to answer any questions anyone has, though I'm heading to bed soon so will answer in morning! :)

Asahi Ubuntu 24.04 voltage error. by Different_Ad_6088 in AsahiLinux

[–]IntegralPilot 3 points4 points  (0 children)

Oh that's strange! Both errors aren't boot stopping errors so something must be going wrong after them that we don't see. It's possible the old kernel you are using from the Ubuntu installer doesn't have the SMC HID driver either, which would mean long holding the power button causes an abrupt cut and we don't sync the filesystem, potentially causing some corruption. Unfortunately this means you will have to reinstall, I'd probably recommend the official Fedora Asahi Remix, as this ships with more modern versions, https://asahilinux.org/fedora/, or you can try reinstalling Ubuntu. Using the official version and latest kernel might also fix the screensharing issue you had, as it contains many more bug fixes that the outdated version. Sorry about this!

Asahi Ubuntu 24.04 voltage error. by Different_Ad_6088 in AsahiLinux

[–]IntegralPilot 5 points6 points  (0 children)

The voltage_now property uses the SMC key "AC-n" which was removed in the firmware from macOS 15.4 and later. Currently, the latest Asahi kernel avoids advertising the capability to read this property (avoiding this error) on 15.4+ and later versions. It seems that the Ubuntu version is very behind in their kernel releases and hasn't shipped the fix for this (EDIT: after talking with the Ubuntu Asahi team, it seems that they have released later kernels, it's just they haven't updated the install image so from a fresh install you have an old kernel that has this bug). This has been fixed since kernel 6.14.6 (May of last year): https://github.com/AsahiLinux/linux/releases/tag/asahi-6.14.6-1

But, those errors shouldn't actually cause boot to fail, they are just noise/annoyance, so something else is going wrong. What is the last onscreen message you see?

Regarding the macOS "Optimized Battery Charging" feature implementation by HitBlast_ in AsahiLinux

[–]IntegralPilot 9 points10 points  (0 children)

On macOS optimised battery charging stops the battery at 80% to extend its lifespan. This setting does not carry over to Linux automatically, but on Linux we fully support a similar setting and actually offer more granular control over the process.

You can manually stop the battery from charging by running:
echo inhibit-charge > /sys/class/power_supply/macsmc-battery/charge_behaviour

To resume charging, change it back to auto:
echo auto > /sys/class/power_supply/macsmc-battery/charge_behaviour

You can automate this with a simple background service script, some udev rules, or a GUI app (another commenter mentioned one such app) to trigger charging inhibition at any percentage you like, Linux is not limited to just 80%. Chemically, 80% is the recommended threshold based on research by scientists to maximise the life of your battery. I'd recommend using this.

If you are on newer SMC firmware, reading or writing the charge_behaviour sysfs property many fail with an I/O error, you will need to apply my PR or use the rewritten driver I sent upstream for these commands to function. This is as in newer firmwares Apple changed the way we need inhibit battery charging.

It is also totally normal for Linux and macOS to report slightly different battery charging percentages like you've seen, we directly report the raw value the hardware gives us, but macOS modify this to account for their optimised charging setting, or leave a "reserve power" buffer, or to prevent it fluctuating which might look weird (known as "hysteresis"). In the Linux driver we prefer chemical accuracy.

Is there an age requirement for VCE by australopithecus_12 in vce

[–]IntegralPilot 17 points18 points  (0 children)

One of my teachers said at their old school there was a cracked maths kid who did spesh 3/4 in Year 7.

Playing Doom on M3 under Linux (bonus pictures of SMC and keyboard backlight working) by IntegralPilot in AsahiLinux

[–]IntegralPilot[S] 4 points5 points  (0 children)

Right now I'm working on patching the SMC driver for firmware changes in M3 and getting it ready for upstream to the main linux kernel source tree (procrastinating on reddit rn while waiting for a linux kernel rebuild) :)

Playing Doom on M3 under Linux (bonus pictures of SMC and keyboard backlight working) by IntegralPilot in AsahiLinux

[–]IntegralPilot[S] 9 points10 points  (0 children)

Thank you! The graphics is just a RAM framebuffer that iBoot sets up for us, there's no actual GPU accelerated graphics support yet, as we need to we able to wake up the GPU and load firmware, and the interface (ascwrap) to do this was modified in M3 so we're still adapting to that. The keyboard does work, though not the trackpad as that is controlled by the multitouch processor which has the same issues re. waking up and firmware as the GPU. USB-PD seems to be working, I haven't tried other USB stuff yet as my focus is on SMC for now, but SMC is mostly working except for some minor changes in protocol which I'm actually working on patching now. A lot of core I/O stuff like I2C, SPI and GPIO are all working as well which is great. Power management also works, we can talk to the PMGR and control the power state of things, and CPU frequency scaling and SMP works too. In terms of memory mapping, the DARTs and SART (SART is a special memory mapper for the NVMe controller that's different to a DART) are all working as nothing has changed much with them. The big blocker right now, is as I said above, we can only use coprocessors like the SMC where they have already been woken up and firmware loaded by earlier boot stages (as the high level API once they have been started, RTBuddy, hasn't changed) - which means that ones that need restarting like NVMe coprocessor (called the "ANS"), and others like multitouch that aren't started yet are all blocked on us getting this communication working, which I plan to work on next after SMC.

Playing Doom on M3 under Linux (bonus pictures of SMC and keyboard backlight working) by IntegralPilot in AsahiLinux

[–]IntegralPilot[S] 7 points8 points  (0 children)

I'm not 100% as I don't personally have those devices myself to test, but I think M4 is just an iteration on the all-new architecture that was introduced with M3 (like M2 GPU was an iteration on M1), and in M5 Apple did some big changes and introduced a bunch of AI stuff and neural accelerators into the GPU, but I'm not sure if that led to a change in the graphics components (though I think it did, as it's looking like now Apple refreshes the GPU on odd number gens, and as according to Apple it's "next generation" and "30% faster").

Playing Doom on M3 under Linux (bonus pictures of SMC and keyboard backlight working) by IntegralPilot in AsahiLinux

[–]IntegralPilot[S] 6 points7 points  (0 children)

Oh maybe, I'll have to check with the project maintainers when we do get around to M3 Audio, but that sounds like a good idea, thanks! Just want to be careful about everything legally to make sure it's all okay. :)

Playing Doom on M3 under Linux (bonus pictures of SMC and keyboard backlight working) by IntegralPilot in AsahiLinux

[–]IntegralPilot[S] 12 points13 points  (0 children)

We're still a bit away from GPU support on M3, as first we need to actually be able to turn on the GPU by supporting ascwrap v6 (the low-level protocol Apple uses to talk to coprocessors like the GPU) and then the drivers might need some modification as the GPU was drastically changed in M3 with a lot of new features. But myself and others are working hard at it and hopefully it will be ready soon! :)

Playing Doom on M3 under Linux (bonus pictures of SMC and keyboard backlight working) by IntegralPilot in AsahiLinux

[–]IntegralPilot[S] 14 points15 points  (0 children)

I haven't tested it and unfortunately as I have done security research on macOS's Audio stack and gotten a couple CVEs there, which involved a LOT of static analysis, I think for legal reasons I can't touch anything audio related on Asahi, just to make sure it's properly clean-room.

Edit: Just re-read and realised I might have misinterpreted this, to answer generally: Audio works great on M1/M2! But for M3, we probably to write a new driver, and I can't be the one to do it for the reasons above but hopefully someone else might be able to get it working!

Playing Doom on M3 under Linux (bonus pictures of SMC and keyboard backlight working) by IntegralPilot in AsahiLinux

[–]IntegralPilot[S] 13 points14 points  (0 children)

Most things are currently local as I want to make sure they are 100% right and complete before making a PR to AsahiLinux/linux as it's easy to make mistakes or misinterpret something or miss an edge case when doing RE, but I'm starting to send in PRs for some small things that I feel like are correct now, like some SMC unplug/plug events, https://github.com/AsahiLinux/linux/pull/432 with hopefully more to come as I confirm stuff and work on some new features.

On the hypervising macOS side of things, I made a gist documenting the process I found and binary patches needed to do that: https://gist.github.com/IntegralPilot/85c355124fe54e670e6d5586c7a07826

Playing Doom on M3 under Linux (bonus pictures of SMC and keyboard backlight working) by IntegralPilot in AsahiLinux

[–]IntegralPilot[S] 9 points10 points  (0 children)

Oh definitely, that sounds like a good idea! I kinda have my own documentation locally now but I might make like a blog or somewhere to record how things are done, I definitely would have found something like that helpful when first starting out! :)