by slashdev · 4y ago · 0 comments
I'm running a very recent kernel in Fedora and have tried numerous power saving mechanisms (currently autocpufreq, although it's results are not much different from gnome PPD) and I'm lucky if I get 3 hours from the thing while running 10-15 FF tabs and a single instance of VSCode+Remote SSH extension. This is ~1/2 of what I can get in Windows.
I think a lot of Linux users would be surpised how good their battery life would be if they installed Windows on their laptops. It's not Linux's fault per se, it's just that there's considerably less engineering manpower going into tuning the power efficiency of laptop hardware on Linux. People get up in arms because they can't reconcile the fact that "Windows is bloated" with the fact that it gets better battery life, but if you think about it for a few seconds it really shouldn't surprise anyone.
It IS linux's fault, in the way that whenever someone new comes into the ecosystem and says "hey this important thing doesn't work well or is broken for me" and get accosted from all directions by crazy people who haven't touched mac or windows in 20 years who insist that what you describe isn't possible, linux is super easy to fix yourself (lol), and that ideas from computing in the 60s are unambiguously the best ideas ever made in computing.
The linux ecosystem doesn't even have a legitimate window manager. When people tell the linux world "hey there's an issue" the linux world always responds with "fuck off"
MacOS is especially bad because they don't even try to address their deficiencies. They just bandaid over it with an app ecosystem and then don't give that ecosystem an API that's to sufficient to do the job (e.g. the limitations of amethyst and amphetamine re: focus control and lid closing).
And that's before we get into intentionally missing features like focus-on-hover.
This is possible because the machine is basically a pure Intel device, so in-kernel support for most hardware components is good. The key aspect is to implement fairly aggressive udev rules and to use no desktop environment, so that the CPU stays in powersaving states for as long as possible. This is where Linux really shines, as X plus a window manager is much lighter than anything else.
There is still some room for improvement with a custom kernel, a custom Firefox build or a better wireless card, the only non-Intel component. Broadcom Linux drivers are awful. Also Safari is a marvel in terms of efficiency.
> The key aspect is to [...] use no desktop environment, [...]
Is this satire?
As an example, IMO an idle computer should have all CPU save one or two at 0% utilization, and that remaining CPU(s) shouldn't be averaging more than a few percent, in short spiky bursts. FreeBSD or Debian are like this, but Ubuntu is not.
Why do people write comments like this as though it's reasonable way to use an everyday driver PC?
"I don't use a DE" - well then yes, obviously but you've also removed like 80% of the functionality to turn the thing into a dumb console. That's not what I want to use a computer for.
The rest is largely correct, but this part is completely wrong. Linux has a bunch of legitimate window managers, most of them much better than MacOSX or Windows.
The problems with window managers on Linux are: 1) fragmentation: there's a bunch of them, all competing with each other, but with insufficient dev resources, so they all feel half-baked, 2) unreliability: because of #1, they have a lot of bugs 3) churn: with Gnome and KDE specifically, they keep throwing things out just as they finally make their product mature and starting over every so often, subjecting users to systems that are never really mature or reliable.
I love my Macbook, but really wish they'd borrow some ideas from Windows and Linux
Let alone arcane tech like "search in list of open windows"
You just have to recompile the kernal.
Linux just is worse on battery than any of the other mainstream OSs in my experience, though the margin has reduced over time. It's still my platform of choice (because even now, in 2022, the choices available are crap), but denial makes them disappear only from the imagination, not reality.
> It's not Linux's fault per se, it's just that there's considerably less engineering manpower going into tuning the power efficiency of laptop hardware on Linux.
You're not wrong, but it's worse than that. A lot of the power management is tied in to proprietary firmware. Then there's the whole Intel Gen12 debacle...
I would argue that Chromebooks are pretty solid proof that it isn't Linux's fault, because they by and large Linux systems that get fantastic power management results.
> People get up in arms because they can't reconcile the fact that "Windows is bloated" with the fact that it gets better battery life, but if you think about it for a few seconds it really shouldn't surprise anyone.
Windows gets better battery life on laptops designed for better battery life with Windows. At the same time, it is often surprising how running a program under WINE on Linux will outperform the same program running on Windows. ;-)
Sorry, that should read:
"I would argue that Chromebooks are pretty solid proof that it isn't Linux's fault, because they are Linux systems that by and large get fantastic power management results.
The firmware involved is also distinctly non-trivial.
Even if those laptops don't support Linux as well as they claim to, it seems like it'd be less of a headache to deal with than Framework with their unique dongle situation.
Install TLP, uninstall thermald, and make sure turbo mode is off (it's on by default in Linux - probably applies to Intel only).
Under light load the system is using 6-8w (about 9-10h of usage on the 80WH battery), under 4w when completely idle. This is latest Fedora on a ThinkPad X1 Extreme with KDE. I want to see that with Windows.
You have to invest a bit more time with Linux (for example the fingerprint reader on my Laptop prevented the CPU from going into lower power modes), and that part is unfortunate.
On the other hand I never experience things randomly not working like it was with Windows.
Your mileage may vary.
Sorry, but that's not a good argument in favor of Linux when basic power management is not part of the OS and you need to set it up yourself manually. Can you imagine Microsoft or Apple shipping their OSs without power management? I need an OS to work out of the box so I can get to work/entertainment, not a hobby to tinker with. I still enjoy tinkering with Linux but it should be only when I want-to, not a need-to.
> I want to see that with Windows.
Yeah, you can get Linux to be more economical than Windows by manually installing a bunch of tools that throttle down the CPU into its lowest power mode and running it at 600MHz fixed all the time, and now you have a laptop that's super slow, all for the sake of battery life and winning online arguments. Good job. /s You can force that in Windows as well, but why would you?
I want to see Linux automatically scale the CPU power and frequency based on the load put on it like Windows does: idles at 600MHz when doing nothing, click on the Firefox tab and it shoots up to 3,6GHz, then back down to 800MHz. That's what any sane OS should do out of the box, not have you install and fiddle with a bunch of tools and maybe still not be as good.
>On the other hand I never experience things randomly not working like it was with Windows.
I have way more things randomly not working on Ubuntu 22.04 Gnome at work than on Windows 11 at home (none actually on this one).
And I'm saying this an Linux/FOSS user and fan.
That entirely depends on the distro you use. Any "mainstream" distro should already have power saving tools set up properly. Of course if you use something more DIY like Arch you will have to set those up yourself. You can't just group every distro together as "Linux" when you will get a different experience on each one.
> I want to see Linux automatically scale the CPU power and frequency based on the load put on it like Windows does: idles at 600MHz when doing nothing, click on the Firefox tab and it shoots up to 3,6GHz, then back down to 800MHz. That's what any sane OS should do out of the box, not have you install and fiddle with a bunch of tools and maybe still not be as good.
Unless you are using the performance or powersave governors (except with intel-pstate active) that's already what it should be doing. Once again you shouldn't have to tinker with that stuff on any sane distro.
Ships with Linux, some good marketing. I think PopOS! has lost the thread on why they exist, in that it started as an 'it just works' version of linux, and it seems to be managed as yet another enthusiast grade linux. It doesn't take much time over at r/popos to see this sentiment spelled out.
I'm not leaving the linux ecosystem, but I can tell you i'd be shocked if I go with either Framework again. Majorly disappointed for what should have been a top tier system when I bought it. I'm on the fence about PopOS. I need an OS that works out of the gate and doesn't break things like audio and bluetooth down the road (both of which are borked in the current version).
Idk. Hard time to be committed to FOSS, but the options aren't better.
I had Motile M141 laptop with Ryzen 3200U and it had better battery life on Linux than Windows.
800MHz would be more than enough processing power for most things I do. Just about virtually everything we do now, we were doing when 400MHz Celerons existed.
Nobody does efficient coding any longer.
The framework laptop would also seem to suffer from using user-replaceable DDR4 instead of, say, LPDDR5 like 12th gen compatriots generally do (higher performance, less power).
I think the biggest thing is not having a discrete GPU.
[EDIT] And that's even true for Apple laptops, IME.
System76 does get complete hardware specs from the chipset manufacturer, though, and their cooperation in porting an open-source firmware to the motherboard. They run Coreboot instead of the proprietary OEM UEFIs, and this has let them achieve some nice things in power management (including MacBook-like instant on from sleep and hibernation, for example) on some models.
I'm still excited for the first systems where they get to do the physical design as well, but their firmware work on their rebadged laptops is substantial and relevant to the power efficiency issue.
I got all the extra USB features working. It should be possible to support everything else too. If I learn this I'll add support for all the laptops I buy in the future too.
Or any other "performance"-component for that matter, which typically requires proprietary software counterpart (drivers) to run efficiently. Most vendors only ship decent Windows drivers, and the Linux counterpart (if any) is considered "good enough".
I would not consider this the fault of kernel developers. Often there is basically nothing they can do. You just need to look at what hoops the Nouveau-devs have to jump through - colossal effort, little appreciation from users.
Do you know how I can check if the discrete card is being used / drawing power?
I wrote a script to query that data and output it in a format compatible with i3status. In case you'd like to see how it works:
https://github.com/matheusmoreira/.files/blob/master/~/.loca...
Please share the changes if you figure out an AMD solution. I'm curious.
It all comes down to driver support. If you manufacturer doesn't have proper drivers, your experience will suck. It says a lot about Lenovo that open source Linux drivers work better than their proprietary ones, but that probably comes with the territory if you combine Intel and Nvidia.
https://lore.kernel.org/all/20220901221720.1105021-1-joel@jo...
One thing I noticed almost immediately when running linux is that when I was just farting around learning the OS, the laptop would get stone cold. But when I did something large, like compile a kernel, while the laptop was actually on my lap I could physically feel the heat from the CPU start to leak through the case.
I find it much more damming that Apple smokes Windows in battery life even despite Microsoft having its own line of laptops (Surface) and having the money to pour into it vs Linux.
If you're on Gnome use "power saving" performance mode. Proprietary OSes throttle aggressively whereas Linux doesn't on "balanced" mode.
Linux is great
Not sure why this is getting downvoted
So now my battery is just a UPS. Which is actually kind of nice at times!
Now if only everything else worked flawlessly out of the box.
I got it for half the price of equivalent hardware in a MacBook Pro (8-cores/16 threads, 64 gb ram, 3 TB NVME storage, monster graphics card.)
Come on...
That's like saying: this piece of software is great but only under very specific conditions, everything else is non standard and you can't complain.
If the OEM provides spec/drivers/assistance to microsoft and not to anybody else, yes, it's their fault.
Even more so if collaboration is done only under NDA. And it's been happening for decades.
(Pretty sad that nowadays HN does not even understand such basic stuff)
Also, no need for the snark.
> everything else is non standard and you can't complain.
No, you can first get a correct understanding and then complain to who is really responsible.
Again, no need for the snark.
You do know there are open and closed source drivers on Linux, right?
OEMs develop stuff for Linux as well, it's just that they don't have a lot of incentives to do it properly, since most of the user base is on another OS.
So no, it's not a hardware issue, the hardware is great. It's a software, business and culture issue that companies don't have incentives to develop consumer grade software for Linux and that Linux hasn't implemented proper performance/efficiently core support, proper egpu support, seamless hibrid graphics support, etc. Because all those tend to be stuff that the general consumer wants and not things servers would use.
I encourage you to explore more around what you say before disregarding other people's opinion with "nowadays HN does not even understand such basic stuff" when you yourself haven't even given it much thought, please. You don't need to be so snarky either.