What is the difference in battery life between linux on and macos on the Apple M1?
That is, I would be surprised if linux on the M1 had close to macos levels of battery life. My theory being the better battery life on the M1 is more due to the tight integration between the OS and the hardware power profiles than the power profiles themself.
I’m sure Apple has some unique tricks when it comes to energy efficiency, but I haven’t seen the same level of optimization in other operating systems. Apple’s energy management is just another competitive advantage, offering a level of sophistication that sets it apart technically and strategically. Just add the Mx chips to the equation.
Honestly, I don't think this is true. I had identical efficiency on my Intel MacBook Air running Linux, compared to OS X. Both ran out of battery +/- 10 minutes of each other on the same hardware.
The only distinct advantage is Safari, which is heavily optimized for efficiency. But a lightweight Linux desktop, with fewer active services, can compensate for that.
And, do you primarily use Google Chrome? You lost me a bit with "...but a lightweight Linux desktop" as it seems to counter your point. When discussing battery efficiency, I think it’s key to consider real-world tools like VSCode, which many of us use regularly. Chrome, especially, can drastically alter power usage across different operating systems.
I use Firefox on Linux, but used Safari on OS X. My point was that this gave some efficiency advantage to my MacBook Air running OS X, compared to the same machine running Linux (and Firefox). Safari is a little marvel of energy efficiency. This was countered, to some extent, by a simple barebones X11 setup on the Linux side. Otherwise, my setup was identical on both sides.
Linux tends to be regarded as energy inefficient because it ships with defaults that prioritize performance on desktops, workstations and servers. Some simple tweaks with udev rules can make a big difference. For example, adjusting the energy policy of your SSD can reduce consumption by 0.5-7 W. Wake-on-lan is also something that is typically enabled and drains a lot of battery when the machine is suspended.
I'd be surprised if MacOS could match the efficiency of Linux. MacOS relies on a hybrid kernel architecture that emulates a variety of different APIs that aren't used or integrated fully. The simple act of running software on MacOS is deliberately somewhat inefficient, which is a perfectly fine tradeoff for a desktop OS that's not intended for server or edge applications.
The fundamental hardware of Apple Silicon is very efficient but I don't think MacOS is inherently optimized any better than the others. My experience installing Linux on Intel and PowerPC Macbooks tended to increase their battery quite noticeably.
Well, if in 2021 you took your MacBook Air M1 (8GB) out on a Friday, downloaded movies, watched them, browsed the internet, did some casual development, and came back late Sunday without needing to charge it, I’d be impressed.
That is, I would be surprised if linux on the M1 had close to macos levels of battery life. My theory being the better battery life on the M1 is more due to the tight integration between the OS and the hardware power profiles than the power profiles themself.