News for hackers. Stuff that matters.
Re:ARM64 Linux Workstation by mardifoufs on Friday March 03, 2023 @07:39PM (#35016921)
I'm wondering if an M1 MacBook would actually have such a good battery life on linux. The processor is very power efficient, but I'd (naively) assume that MacOS's power management probably has a big influence too. In the same way that Linux laptops usually have a bad battery life compared to the same hardware on Windows. How good is Asahi when running similar workloads? And is it possible that it could reach parity with "stock" MacOS?

(I'm sure linux is in theory just as power efficient as MacOS or Windows, but distros are just usually not very concerned or capable of tuning it well enough.)

Re:ARM64 Linux Workstation by rektide on Friday March 03, 2023 @08:37PM (#35017250)
Installing Linux has had huge wins for me for power usage. Running powertop --auto-tune helps a good bit.

I used to fiddle forever but this gets like 80% of the wins. Things like "do we reduce power state of sata links" used to be extremely conservatively set, for fear of really old hardware from the beginning of sata era that behaved badly, but was an obvious &bhige win for 99.999999% of folk. Linux has finally started turning a bunch of these baseline expected tuning on by default, across the past few years (rather than powertop doing it), so the out of box experience is finally much more reasonable.

It's been like this forever but people love throwing shade. I had a Transmeta Crusoe laptop (p1120) amd yes, at first battery life was worde. But I did low hanging fruit optimizations, and Linux got better, and soon I had like an hour more runtime on Linux.

Mac famously has a trashburger IO subsystem, so not having that boat anchor hanging off the side should probably let the system hurry-up-and-idle better, saving power.

Re:ARM64 Linux Workstation by pxc on Friday March 03, 2023 @11:49PM (#35018285)
powertop is way underrated. You don't have to know much to get a lot out of it safely.
Re:ARM64 Linux Workstation by FooBarWidget on Saturday March 04, 2023 @04:00AM (#35019393)
I don't understand why the powertop tunings aren't the default when the distro detects it's running on a laptop.
Re:ARM64 Linux Workstation by iforgotpassword on Saturday March 04, 2023 @05:57AM (#35019977)
The most annoying thing that prevents me from running --auto-tune on bootup is that there's no way to exclude USB devices. So if I boot when docked, the mouse will stop working when I don't move it for a few seconds and I need to click to make it work again. And no, unplugging it once is not an acceptable solution.
Re:ARM64 Linux Workstation by rektide on Saturday March 04, 2023 @01:45PM (#35023283)
It just got added in 2023, but there's now --auto-tune-dump which generates a command line invocation of powertop that would set all the auto-tune settings. Instead of running --auto-tune, you can make a script of this dump, modify it to your contentment, and run the script instead of auto-tune at startup. So you can omit your mouse!

Ideally there would also be a way to omit certain device or subsystem tunings from auto-tune as well.

Personally I think it'd be fun to mess around with more advanced schemes, where we dynamically alter powersaving behaviors based on user behavior. What we have now seems somewhat unresponsive. It'd be fun to dive into.

https://github.com/fenrus75/powertop/pull/116

Re:ARM64 Linux Workstation by iforgotpassword on Saturday March 04, 2023 @02:22PM (#35023650)
Awesome! Yes, I was thinking about doing this manually by toggling every setting manually and copying the command being displayed but gave up quite quickly as it was too cumbersome. Sometimes the screen would refresh before you copied so you had to do it again... This option solves that nicely.
Re:ARM64 Linux Workstation by psychoslave on Saturday March 04, 2023 @04:55AM (#35019659)
I wasn't wasn't of this, thanks
Re:ARM64 Linux Workstation by pleb_nz on Friday March 03, 2023 @09:16PM (#35017469)
I think it'll be the same on the MacBook pro 14 m1, at least for some people like myself. I had a Lenovo p15 with an Intel chip running fedora before my m1 MacBook and I got roughly the same life during the same working day between the two.
Re:ARM64 Linux Workstation by coldtea on Friday March 03, 2023 @09:21PM (#35017494)
>I'm wondering if an M1 MacBook would actually have such a good battery life on linux.

Not 100% the same, but the Asahi members reported something like 8 hours on a M1 Macbook, so that's better than most/all x86 laptops with Linux

Re:ARM64 Linux Workstation by t-3 on Friday March 03, 2023 @10:19PM (#35017822)
Better than high performance mobile workstations, sure, but I was getting 10-12 hour battery off a macbook air running Gentoo nearly a decade ago. PBP gets 10+ hours. $25 scrap latitude with ~70% peak capacity gets 6-8 hours.
Re:ARM64 Linux Workstation by apatheticonion on Friday March 03, 2023 @10:25PM (#35017856)
I actually think you're onto something with this. When I run compilation workloads on my M1 MBP, I get 3-4 hours battery life.

VMs and games (crossover) also bring my battery life down to 4-6 hours.

My old intel MBP would get around the same battery life when doing the same workloads (games under bootcamp Windows), it would get worse battery life sitting idle or for optimised workloads (like video playback).

Mixed workloads, I get maybe 2-3 hours more with my M1 laptop. That's not nothing, but it's not the crazy 18 hours battery life in the marketing material

Re:ARM64 Linux Workstation by ILMostro7 on Friday March 03, 2023 @11:21PM (#35018141)
18 hours battery life is mostly marketing. Not even sure how to test that, maybe on 20% display brightness with no programs running, other than the OS...assuming it doesn't take screenlock/display off into account?
Re:ARM64 Linux Workstation by mardifoufs on Friday March 03, 2023 @11:44PM (#35018256)
I remember reviews on youtube that showed the macbook air/pro M1 playing video (streaming?) for that long. Actually, it kept going for 20h.

https://youtu.be/KE-hrWTgDjk?t=645

Re:ARM64 Linux Workstation by AnthonyMouse on Saturday March 04, 2023 @01:55AM (#35018824)
Benchmarketing. It has hardware support for video codecs so it can play video efficiently in particular even though people traditionally think of that as something processor intensive.

The question is, what's the battery life when you're doing kernel compiles or GPGPU.

Re:ARM64 Linux Workstation by apatheticonion on Saturday March 04, 2023 @05:14AM (#35019757)
According to "Garry explains" on YouTube, the M1 MBP gets 3 hours of battery life looping kernel (I think) compilations until the laptop dies.
Re:ARM64 Linux Workstation by OmarAssadi on Saturday March 04, 2023 @10:54AM (#35021700)
That feels about right to me too. I don't know if I'm usually just doing more computationally intensive stuff than most with my 16" M1 Pro, but I think the only way I could get anywhere near the advertised numbers is if I basically just had Safari open and the display on half brightness.

And not to beat the already long dead horse any more, but toss in some electron apps running in the background, I probably average somewhere around ~7 hours or so. I'm not convinced the 10+ hour lifetime is possible if you've got stuff like Discord/Slack/VS Code open.

But in terms of when I am doing truly evil things to it, I am surprised it lasts as long as it does, be it max CPU compiling or all of this morning when I was toying around with stable diffusion, it gets around ~4 hours or so.

Re:ARM64 Linux Workstation by tcmart14 on Friday March 03, 2023 @11:26PM (#35018161)
I need to go back and watch the marketing material, but I think everytime they brough up battery life, it was under conditions. Like 20 hour battery life browsing the web. 18 hour battery life with video playback. I don't think anywhere they claimed 20 hour battery life using something like Blender.

Which of course should be expected. My M1 probably gets about 18-20 hours when I am just web browsing. If I am compiling Xcode projects, half that. Messing around in C in Emacs, probably 14-16 hours battery life.

Re:ARM64 Linux Workstation by jeswin on Friday March 03, 2023 @10:19PM (#35017823)
> 8 hours on a M1 Macbook, so that's better than most/all x86 laptops with Linux

It is makes no sense to compare an $1k/$2k M1 Macbook with random laptops. Those laptops exist because people want to run MS Word or Excel for $400. That's the feature.

Various System76 laptops, Thinkpads (among many other laptops recommended by Linux users) give you battery life comparable to macOS on the M1.

Re:ARM64 Linux Workstation by ekianjo on Friday March 03, 2023 @11:26PM (#35018162)
> arious System76 laptops, Thinkpads (among many other laptops recommended by Linux users) give you battery life comparable to macOS on the M1.

that is a lie. system76 and thinkpads are nowhere close to giving you a full day of battery life on Linux.

Re:ARM64 Linux Workstation by mardifoufs on Friday March 03, 2023 @11:36PM (#35018219)
I keep hearing about battery life being just as almost just as good or better on linux (and on Windows too, though that's a more realistic claim). Yet even the latest gens thinkpads are pretty awful w.r.t battery. My friend bought an i5 12xxx Thinkpad X1 and can barely do 5 or 6 hours of screen on time, when the stated capacity is 16h. Lenovo denied a refund, because it's working as intended according to them (and my colleagues with s76 laptops don't even really expect more than 3-ish hours of battery at best). My work provided t14 gen 3, that I like, can't even keep it's charge when unplugged and in my bag for long enough.

And I'm no Apple fanboy, the only Apple device I've ever used has been an ipad 5 years ago and my M1 macbook.

Re:ARM64 Linux Workstation by Joeri on Saturday March 04, 2023 @02:47AM (#35019060)
Lenovo’s battery life numbers are consistent generation to generation, but wildly unrealistic. My 2015 thinkpad (since replaced by m1 air) was rated as 12 hours but could do at most half in practice doing very light tasks and typically ran about 4 hours. So when you buy a thinkpad you should assume actual battery life is a third to half of the rated life.

Apple’s numbers are equally unrealistic. They rate my m1 air for 15 hours, but in practice it gets to around 8 hours.

Re:ARM64 Linux Workstation by shaunsingh0207 on Saturday March 04, 2023 @05:20AM (#35019791)
My macbook pro was rated for 18 hours and I find it very easily meets or exceeds that number if I'm working on general tasks.

Of course if its a day where I'm compiling often and have several tasks running its going to be lower, but thats not the usecase they advertise

Re:ARM64 Linux Workstation by dTal on Saturday March 04, 2023 @08:48PM (#35026295)
Eh... I have a T480. It's advertised at "17+" hours. With the 72Wh extended battery fitted, it has a total of 96Wh energy storage. With some small effort tuning (making sure the nvidia GPU is properly powered down etc) I can easily get its consumption down to about 5W - less, with lowered screen brightness and wifi off. 96Wh / 5W = 19h 12 min. Seems legit.
Re:ARM64 Linux Workstation by user_7832 on Saturday March 04, 2023 @08:04AM (#35020486)
Just a sample size of 1, but my HP ProBook 430 G3 (6th gen i5) could comfortably hit 8 hours of battery life, or beyond 10 on light tasks - before the battery went kaput unfortunately. However it was the “large battery” variant with I think a 40 or 50ish Wh capacity on a 13” screen.
Re:ARM64 Linux Workstation by chaxor on Saturday March 04, 2023 @02:28AM (#35018992)
System76 systems absolutely do not have good battery life. The systems the make tailored only to battery life try to be comparable in battery (~14h system76 to ~25h on m2 pro) but obviously x86 vs arm makes this attempt exceedingly difficult. You're going to remove a massive amount of computational power from an x86 system to improve it's battery life like that. However, of course if you're interested in increasing a laptop battery life, it helps to have control over the system if you have the time to put forth on optimizing it. I would imagine an asahi linux (archlinuxARM) system could be made to last much longer than macOS. However, this would require 1) not running any wm, or perhaps a simple one like awesomewm, 2)drastically reducing screen brightness, 3) removing any processes that run in the background continually (you could take this rabbit hole far - perhaps even to NTP requests and such), etc. MacOS doesn't have as much configurability like this, so it's variance in battery life is much less - probably a range of 10h-37h if you really push it. Linux could probably take that to 20min-8days if you tried.
Re:ARM64 Linux Workstation by danieldk on Saturday March 04, 2023 @04:11AM (#35019439)
I had a ThinkPad T14 AMD and the battery life on Linux was very mediocre, even after tuning with powertop. It was usually 2-4 hours, on Windows more like 8-9 hours.
Re:ARM64 Linux Workstation by flkiwi on Saturday March 04, 2023 @11:41AM (#35022158)
Conversely, I'm on a Gen 8 X1, and on Silverblue with tlp replacing power-profiles-daemon, I routinely get 8-9 hours. Anecdata and whatnot, but I'm pretty happy with modern linux + modern hardware. That's not to say I wouldn't love to get my hands on an M1 macbook to see the difference though...
Re:ARM64 Linux Workstation by yencabulator on Saturday March 04, 2023 @06:05PM (#35025414)
It's almost as if "Linux" said very little about what software people are running, in what configuration.
Re:ARM64 Linux Workstation by danieldk on Sunday March 05, 2023 @03:25AM (#35027886)
Right, and that is the issue. If I buy a Mac and run MacOS I can be sure that I get long battery life. If I get a PC laptop and run Linux, it's a random crapshoot if the random combination of hardware, kernel version, etc. (I also used Silverblue and Fedora) of whether you get a good battery life.

Maybe Asahi Linux will improve things, since they only target a very small number of hardware configurations.

Re:ARM64 Linux Workstation by coldtea on Saturday March 04, 2023 @11:26AM (#35021998)
That hasn't been my experience... If anything System76 are much much worse, and Thinkpads mediocre in that aspect
Re:ARM64 Linux Workstation by cycomanic on Saturday March 04, 2023 @07:30AM (#35020335)
My Lenovo X1 carbon was giving me more than 10h 6 years ago (after powertop tuning), so high quality laptops have been providing similar battery life for a long time.
Re:ARM64 Linux Workstation by 16 on Friday March 03, 2023 @09:28PM (#35017531)
Battery life is significantly worse on my m1 pro macbook pro under asahi. I'd estimate about half of MacOS.
Re:ARM64 Linux Workstation by mardifoufs on Friday March 03, 2023 @11:39PM (#35018234)
Is it worse across the board? Is idle power consumption higher, or is it mostly when under load that it gets worse?
Re:ARM64 Linux Workstation by shaunsingh0207 on Saturday March 04, 2023 @05:19AM (#35019785)
I find under load its the same, idle power consumption is higher. It seems linux doesn't have the same level of delegation on powerformance/effeciency cores that apple manages with macOS
Re:ARM64 Linux Workstation by somethoughts on Friday March 03, 2023 @09:29PM (#35017537)
I think the key difference (hopefully) will be that there are a limited number of hardware configurations for Mac. Still a lot (i.e. 100+ SKUs) but not nearly the number of x86 hardware configurations (i.e 10000+)

Also presumably if Apple wants this to happen, they as a single vendor can provide a single definitive answer on what they are doing for each configuration. Eventually...

In the x86 world, there is Intel, AMD and like 50 different manufacturers each with a particular HW implementation/BIOS customization, leading to IntelAMDHardware_Vendor_customizations^50 permutations that'd need to be validated.

Re:ARM64 Linux Workstation by jorvi on Saturday March 04, 2023 @01:47AM (#35018791)
It’s been a while since I’be owned a MacBook, but the speakers sounded significantly worse on Linux (and if you own a MacBook you know they can sound pretty decent) because they are EQ’d in macOS, not the speaker firmware.

Never has there been any effort taken within Linux to apply a generalstic ‘small speaker EQ’ to anything with detected internal speakers.

Similarly, the Linux kernel by default is optimized for server style workloads (throughput) instead of smoothness. It would be so easy to check for an internal battery and if true apply a few kernel parameters so your laptop stays smooth under load.

Linux as a desktop (well, laptop) OS is terrible not because it is incapable of being great at it, but because people don’t seem to care for the death-by-a-thousand-cuts issues.

Re:ARM64 Linux Workstation by kerneis on Saturday March 04, 2023 @02:18AM (#35018949)
Re:ARM64 Linux Workstation by jnsaff2 on Saturday March 04, 2023 @02:17AM (#35018934)
There was even an article[0] about the sound of macbook speakers quite recently.

[0] https://news.ycombinator.com/item?id=34935483

Re:ARM64 Linux Workstation by AnthonyMouse on Saturday March 04, 2023 @02:20AM (#35018959)
The permutations don't really matter. If one machine has Broadcom wireless and Intel graphics and another has Qualcomm wireless and AMD graphics and they're both supported and then you come across one that has Broadcom wireless and AMD graphics, you already have the drivers for it.

The real trouble is that you get some wireless chip which isn't popular enough for anybody to reverse engineer it but the manufacturer didn't provide any documentation, so the driver for it sucks or doesn't exist.

There is plenty of well-supported hardware so the solution is, don't buy the bad one. But some poor sucker who already did and now they want to run Linux on it may have a bad time.

Re:ARM64 Linux Workstation by qwytw on Saturday March 04, 2023 @03:12AM (#35019179)
But power management is still ussually subpar(compared to Windows) even on the well supported ones.
Re:ARM64 Linux Workstation by LtdJorge on Saturday March 04, 2023 @07:30AM (#35020338)
Because Linux drivers don't implement as many features as their Windows counterparts, sadly.
Re:ARM64 Linux Workstation by carlhjerpe on Saturday March 04, 2023 @08:38AM (#35020691)
I run a T14s with nixos. For me battery is never ever a problem, sure it runs out if I fall asleep and YouTube is autoplaying. But it lasts almost an entire workday in the couch, it's usbc powered so I can charge it a bit with my powerbank.

Just clearing some FUD if people consider Linux bad for everyday use, that's mostly shit if you run Wayland and like sharing your screen (Jitsi or obs+virtualcam works well too).

Edit: remember Android runs on the Linux kernel-ish

Re:ARM64 Linux Workstation by linmob on Saturday March 04, 2023 @04:52AM (#35019644)
I used my M1 MacBook Air last weekend with Asahi and GNOME on train ride for roughly 4 hours (browsing the web, fiddling with a server over ssh, writing a blog post) and when shutting it down, it was still at 78%.

This used to be different when I first installed Asahi, but the GPU driver and other improvements have made battery life something I don't really worry about anymore.

Re:ARM64 Linux Workstation by paines on Saturday March 04, 2023 @07:32AM (#35020352)
thank you for that report. This convinced me to install it now.
Re:ARM64 Linux Workstation by biomcgary on Saturday March 04, 2023 @02:23PM (#35023657)
The only thing holding me back from running Asahi is lack of HDMI output (at least on M1 Airs). Has anyone heard about progress (or its likelihood) recently?
Re:ARM64 Linux Workstation by paines on Saturday March 04, 2023 @04:18PM (#35024589)
I tried it just now on M1 14'': nothing...
Re:ARM64 Linux Workstation by paines on Saturday March 04, 2023 @04:35PM (#35024719)
Actually it works quite nicely on a M1 14''. Even battery life is quite good. Compared to my Dell XPS 15 7590 it has twice the battery life, easily if not even more.

One thing which bothers me a lot as it makes the laptop hardly useable for me at night: display brightness cannot be adjusted, it is either off or 100%. Some user claim this can be accomplished by installing the asahi-edge kernel, which does not even boot for me.

And this also bothers me lot: why are things checked in/distributed which do not work at all in Asahi Arch?!?! If you install e.g. a dev kernel which does not boot because the NVME driver is broken and you do not have a fallback kernel you are doomed. You cannot mount the partition in macOS to fix this manually.

Re:ARM64 Linux Workstation by paines on Sunday March 05, 2023 @03:06AM (#35027817)
Also the whole things seems somewhat un-deterministic. This morning I booted and the the Login screen nothing works. No keyboard input, touchpad won't move the cursor. Powerbutton works and will power off the machine. Then, u-boot starts and it stopped with some inputs, like it seems those keys I entered at the login scree, which shouldn't be at all NEVER....a few reboots and then it works normal. Very strange...
Re:ARM64 Linux Workstation by paines on Tuesday March 07, 2023 @05:49AM (#35053867)
Okay, one step further, and one step back: installing the asahi-edge kernel requires the mesa-asahi-egde package otherwise you won't see a thing. This isn't been done automatically. Now brightness works which is fine, but working e.g. with raylib which will create a GLX context fails now with mesa-edge...