News for hackers. Stuff that matters.
Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by MuffinFlavored on Thursday April 06, 2023 @12:49PM (#35471050)
It'll be interesting to see how many days it'll take from when this is merged to when "Wlan/BT/USB controller/keyboard/trackpad/display" support will be added (which is currently missing)

I'm surprised M2 is so different than M1. M1 on Linux has WLAN + BT + USB + keyboard + trackpad + display, right?

Admirable work as always. Amazing progress. How are they doing it with no documentation? Are they reverse engineering .kext files in Ghidra or something?

Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by gpm on Thursday April 06, 2023 @12:55PM (#35471126)
M1 has all that I believe, but not in linux 6.4, some features are still in a fork

https://github.com/AsahiLinux/docs/wiki/Feature-Support

Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by gigatexal on Thursday April 06, 2023 @03:46PM (#35473411)
IIRC the gpu driver for example was reverse-engineered i guess from the macos driver. Asahi-Lina has a whole series of youtube videos and blog posts about it. I imagine the other drivers are largely similar.
Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by tracker1 on Thursday April 06, 2023 @01:26PM (#35471570)
Really hoping to see this progress well. I've still using MacOS on my M1 air, does anyone have any personal experience with Asahi on their M1? I'd like to shift to a Linux desktop distro, but really need some thing resembling "just works" ... dealing with my BT headset is about as much regular irritation as I put up with currently.
Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by tcmart14 on Thursday April 06, 2023 @01:37PM (#35471707)
Depends on your needs. I've been running it and I've been fine with. Most everything I need is support or supported well enough. You just need to look at the hardware support. If you absolutely can't live without the working webcam today, then you should wait because it doesn't have a driver yet. If you just need to run VS Code and write code, read documentation online and watch youtube videos, it can do all of that just fine as if your on an intel box running linux.
Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by jxhug on Thursday April 06, 2023 @01:31PM (#35471639)
It’s really not bad. I’ve used it a fair bit on my M1 Mini, for me it wasn’t enough to be my daily driver but it’s making lots of progress and I would definitely recommend you give Asahi a try.
Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by brundolf on Thursday April 06, 2023 @02:27PM (#35472376)
It dual-boots by default and even uses Apple's own boot menu, so you can try it out yourself with very little cost (aside from some disk space)
Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by zamadatix on Thursday April 06, 2023 @03:23PM (#35473141)
Asahi is far from a "just works" solution at the moment. I love it but there is a reason it doesn't have a stable release and important things like GPU are alpha opt in "-edge" packages.
Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by solarkraft on Thursday April 06, 2023 @03:46PM (#35473416)
Really? I haven't used it much, but when I first tried Asahi (almost a year ago at this point), the core functionality seemed to work perfectly well.
Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by zamadatix on Thursday April 06, 2023 @09:27PM (#35476920)
Core functionality works fantastic (depending on your definition of core)! That said it's a different topic. I've used it more than macOS on M[12] devices and love it but it's definitely not "just works" status.
Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by Damogran6 on Thursday April 06, 2023 @01:44PM (#35471790)
How well do these ports handle power? Part of the magic of the macs is the OS/hardware integration...and part of the power management is really deeply embedded between applications, the OS, and the hardware.
Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by mikae1 on Thursday April 06, 2023 @02:42PM (#35472586)
I'd love to know about this as well. Reports I found around the web are from the pre GPU driver era.
Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by nextos on Thursday April 06, 2023 @04:00PM (#35473570)
It seems like the parent post was asking something slightly different, but regarding energy usage Linux can get really close to macOS on m1 machines. I have tested this myself quite extensively. The keyword is can. No distribution ships with most optimizations enabled by default. Powertop can be a good starting point to see what you need to turn on. If you run stock settings, power usage is going to be disappointing.

Powersaving is not turned on by default because lots of hardware, e.g. some audio cards and keyboards, misbehave on powersaving states. macOS has the advantage of dealing with tightly controlled hardware, and might use powersaving blacklists for peripherals.

The distinguishing feature of Macs in terms of powersaving is IMHO Safari, which is an energy efficiency marvel, especially if you play videos. I don't play videos often, so Firefox is not that bad for me. Aside from this, my Linux desktop has a lot less services than macOS, so it compensates the difference. Someone should start a serious Firefox energy saving initiative. By simply tweaking compilation parameters, I am sure some significant savings can be accomplished.

Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by mikae1 on Thursday April 06, 2023 @04:56PM (#35474317)
> It seems like the parent post was asking something slightly different, but regarding energy usage Linux can get really close to macOS on m1 machines. I have tested this myself quite extensively. The keyword is can. No distribution ships with most optimizations enabled by default. Powertop can be a good starting point to see what you need to turn on. If you run stock settings, power usage is going to be disappointing.

Thanks! Perhaps you should write a guide with your findings and optimizations. It's sorely missing.

Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by ingenieroariel on Thursday April 06, 2023 @02:47PM (#35472653)
On my usage the battery lasts about half the time. (Apple MacBook Air M1, 16GB). NixOS on the other side and a lot of compilation. Sleep works.

(edit) I misunderstood your question. I have charged my iPhone in a port and have also used an external audio card that drew power from it. Not sure it behaves as well as OSX but it works.

Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by Damogran6 on Friday April 07, 2023 @10:39AM (#35482022)
Sorry (and it's a bit late), but I meant port as in code, not port as in USB-C
Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by gigatexal on Thursday April 06, 2023 @03:45PM (#35473394)
it's probably not as good but we know it will get better over time, i'd take 25% the battery life to run pure linux over macos at this point
Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by Takennickname on Thursday April 06, 2023 @05:53PM (#35475054)
Why even get a macbook at that point?
Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by Teever on Thursday April 06, 2023 @10:32PM (#35477307)
Because m1 macbook's are cheap as borscht on the used market, they're still the best or some of the best hardware out there, and the battery life situation is only going to improve.
Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by gigatexal on Friday April 07, 2023 @04:58AM (#35479661)
this. the hardware is second to none. it's amazing. I just want the freedom to run the m1 without the limitations of macos. no shade to macos just it's not for me.
Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by AceJohnny2 on Thursday April 06, 2023 @04:25PM (#35473898)
In case you're tempted: Asahi folks (who are doing all the Linux Apple Silicon work) recommend against running mainline kernel on Apple Silicon.

They're slowly working on upstreaming their work, but don't expect anything functional yet.

If you want to run Linux on Apple Silicon, use Asahi.

Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by webaholic on Thursday April 06, 2023 @04:47PM (#35474167)
Any pointers to their advice as to what the reason is?
Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by AceJohnny2 on Thursday April 06, 2023 @04:59PM (#35474336)
For example:

https://social.treehouse.systems/@marcan/110049540523616625

or

https://social.treehouse.systems/@alyssa/110049699088379305

(these are just their most recent reactions to similar events. I didn't bother searching through the last 3 months of their Mastodon posts to find the one where they talk specifically about kernel-upstreamed stuff)

Oh and tangentially, Hector Martin got tired of HN and blocked it:

https://social.treehouse.systems/@marcan/110124271163472879

Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by mixmastamyk on Thursday April 06, 2023 @05:29PM (#35474754)
Takes a while to upstream, so is behind.
Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by sliken on Thursday April 06, 2023 @07:08PM (#35475760)
There's a ton of stuff not upstreamed. There's work being done on upsteaming, but the changes are not trivial.

Some of the things I've heard discussed:

* All distros default to 4k pages and that's set at kernel compile time. Asahi (at least for now) is defaulting to 16k pages, which helps minimize page faults and TLB thrashing. For awhile the GPU acceleration required 16k pages. OSX uses 16k pages I believe.

* The apple GPU acceleration is in Rust, and while the Linux kernel is adding rust support, it's not fully functional for something as complicated as a 3D accelerated GPU. The required patches are shrinking, but not zero.

* Various hardware differences, device trees, loading firmware blobs, speaker protection to prevent overdriving, are being upstreamed, etc.

So the goal is any Linux distro running on Apple, but for the short term you are best off using Asahi Linux.

Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by HopenHeyHi on Thursday April 06, 2023 @04:55PM (#35474294)
I've tried starting a new thread but I guess I don't have enough karma so I'll mention it here.

By all means somebody else can post it and take the fake internet points. A discussion worth having in my opinion..

  Ask HN: Asahi Linux think HN is exhausting, blocks traffic - introspection opportunity?

  Hacker News is just exhausting... 227 comments on our newest blog, and every single main comment thread is derailed into misinformation or nonsense, half of which could be answered if they'd actually read the article.

  Every single comment actually about the article either gets no replies, or gets immediately derailed into something ridiculous. I really need to just block that domain on all my devices, there is just no value in the content left whatsoever.
https://social.treehouse.systems/@marcan/110060225535294882

I agree completely. I think the tone and quality of discussion here has taken a steep downturn.

Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by Firmwarrior on Thursday April 06, 2023 @07:16PM (#35475835)
The rest of this thread looks fine to me..
Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by realjhol on Friday April 07, 2023 @03:41AM (#35479178)
People can talk about whatever they want.
Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by neurostimulant on Friday April 07, 2023 @09:57AM (#35481600)
HN has always been like that. I joined in 2012 and it's already like that. Expect the comment chains to get derailed everywhere if it's more that 3 children deep. Sometimes it's a good thing because it lead to some interesting discussions, but it can be tiring for the site owners / authors that got linked.
Re:Linux 6.4 Bringing Apple M2 Additions for 2022 MacBook an... by darthrupert on Friday April 07, 2023 @01:11AM (#35478264)
It almost looks like AMD will mostly (in every way except heat dissipation) catch up to Apple before Asahi becomes usable. Great work, still, though.