12 ms·
It's also a searing indictment of Linux. I get less than half the battery life on my Alienware AMD laptop under Linux than under Windows. I don't know what Linu
by slashdev 4y ago
It's also a searing indictment of Linux. I get less than half the battery life on my Alienware AMD laptop under Linux than under Windows. I don't know what Linux is doing wrong here, but it is not energy efficient.
- jchw 4y agoDoes that laptop support Linux? If not, I'd expect a key reason is simple; it likely is not using all of the power saving functionality supported by the laptop. This might include things like S0ix, throttling, proper sleep states, etc. There's a lot of factors going in, and I think by and large it is not actually an endemic issue with Linux itself. Consider for example that x86 Chromebooks have no issue fully exploiting modern x86 power saving features and getting good battery life.
- eloff 4y agoIt does not. I use some extra software to try and improve that, which helps, but it also means the laptop is noticably laggy on battery. But you're right that is likely part of the equation. I don't think it's the whole story though, I see other people complaining of wise than Windows battery life on laptops that do support Linux.
- zdragnar 4y agoI've got an lg gram that I use for day-to-day life, and the battery on linux and windows is more or less identical. I think the biggest thing is not having a discrete GPU.
- yamtaddle 4y agoI've personally sworn off discrete GPUs in laptops entirely. My direct and observational experience over a couple decades has been that they cause something like half the major problems in laptops, despite not being present in all of them. Your odds of not having any serious problems over, say, a five-year laptop lifespan are dramatically lower without a discrete GPU. [EDIT] And that's even true for Apple laptops, IME.
- jchw 4y agoThe thing is, there aren't really that many laptops designed to run Linux. Even offerings like these and those from System76 are actually made largely based on designs made to run Windows and adapted later. Sure, this feels like a cop-out and is not really of much aid to anybody, but it's only fair to note. Generally, I do not have dramatically worse battery life on Linux vs Windows, but I also did stop buying laptops with NVIDIA graphics. (Irrespective of Linux, these have given me tons of trouble. Even on Windows, external displays were a painful experience on my Thinkpad P52 no matter what mux settings were set in firmware. I guess it works out OK since NVIDIA on Linux is far from ideal at the moment.)
- pxc 4y ago> Even offerings like these and those from System76 are actually made largely based on designs made to run Windows and adapted later. 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.
- jchw 4y agoI haven't owned a System76 laptop personally, but I really like what they have done in theory. I've actually been waiting largely because I'm interested to see what they put out when they start fabbing their own laptops.
- pxc 4y agoI agree! The desktops they've built themselves are wonderfully designed, if rather expensive. I'm looking forward to the first laptop they make where they designed the whole thing.
- orangepurple 4y agoRun powertop as root and go to the analysis tab https://wiki.archlinux.org/title/powertop https://wiki.archlinux.org/title/powertop
- matheusmoreira 4y agoSuppose I want to reverse engineer all of my laptop's power saving features and write drivers for them or whatever it is that Linux needs to work properly. How do I begin? I managed to get as far as dumping ACPI DSDT but I couldn't figure out where to go from there. 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.
- jeroenhd 4y agoFor me it's the exact opposite: I can't get the Linux battery life on Windows without turning Windows down into a stutterfest. Windows is also noisy as hell. 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.
- jcims 4y agoThis used to be the other way around. I worked for a laptop company (Winbook!) in the 90s and Windows 3.x and IIRC even (early) Windows 95 were largely oblivious to power management features. These laptops had no fan and the bottom of the case acted as a heatsink. (We would regularly get calls from customers complaining about damage to their tables/desks). 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.
- dimensionc132 4y ago
- bipson 4y agoAlienware? I suspect you have a dedicated graphics card? 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.
- jandrese 4y agoProbably an Optimus setup on the Windows side. It basically powers down the graphics card most of the time and switches to the lighter Intel graphics instead. Linux support for Optimus is poor and usually you end up having to choose either good battery life or good gaming performance.
- eloff 4y agoThis is likely it as the AMD CPU has a built-in low power Radeon GPU, and there's a monster Nvidia card for gaming. Do you know how I can check if the discrete card is being used / drawing power?
- pxc 4y agoI'm pretty sure Intel `powertop` can tell you, but if it can't tell you directly you can measure the difference in power consumption depending on whether the dGPU is enabled in the BIOS.
- matheusmoreira 4y agoI don't know about AMD but nvidia cards have a management interface that provides useful data like temperatures, load and wattage. AMD should have something similar. 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/~/.local/bin/nvidia-smi.py https://github.com/matheusmoreira/.files/blob/master/~/.loca... Please share the changes if you figure out an AMD solution. I'm curious.
- martin1975 4y agoWhy do you run Linux on Alienware hardware?
- eloff 4y agoI run Linux for work, and gaming laptops tend to have the best performance characteristics. Plus I can play games on it with dual boot. 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.)
- matheusmoreira 4y agoIn my case at least: because it was hard to find non-gamer laptops with fast CPUs. Turned out to be a moot point anyway because the thing throttles itself to uselessness after seconds under load despite three noisy fans.
- barbariangrunge 4y agoI used a dell xps with ubuntu/gnome for years that used to get me 7-10 hours of battery life as long as I turned wifi off and was working in sublime text. This was more than I got on windows, and more than my macbook got at the time Linux is great Not sure why this is getting downvoted
- deleted 4y ago[deleted]
- goodpoint 4y agoDon't blame Linux developers for the behavior of OEMs and your choice of hardware.
- ranguna 4y agoSo now it's my hardware's fault that my battery is better on Windows than on Linux? 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.
- goodpoint 4y ago> is my hardware's fault that my battery is better on Windows than on Linux? 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.
- ranguna 4y agoSpecs for Microsoft? 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.
- mdp2021 4y agoI can tell you that I can run Linux at ~3.5 Watts/hour ("normal" workflow - chiefly on documents) on my laptop: you should check what is draining your battery, because the issue on efficiency you see is not necessary at all.
- seabrookmx 4y agoThere's a lot of Linux apologists in your replies but my experience is exactly the same _with a laptop that supports Linux_ (Framework laptop). 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.
- trelane 4y agoI'm not convinced Framework actually supports Linux, though. AFAICT, it supports Windows and can ship with no OS, and you have to do the rest yourself. To predictable end (e.g. having to deal with kernel parameters to make it work.) The firmware involved is also distinctly non-trivial.
- bogwog 4y agoThat's actually one of the big reasons I've held off on buying one (although the #1 reason is lack of AMD options), and am eyeing laptops from HP and Lenovo that actually advertise full Linux support (like the HP Dev One). 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.
- slaw 4y agoHP Dev One hits all checkboxes except it has very glossy screen.
- 4y ago
- sudosysgen 4y agoI also have an Alienware and I had the same experience until I spent a lot of time tuning battery life, now I can get 7-9 hours of autonomy. If you want, I can share my setup with you to spare you the trouble.
- alyosha-swamy 4y agocan you share this
- Matl 4y agoIs any serious money going into optimizing Linux battery life on laptops? Not that I know of. Since there's no money in Linux laptops as compared to Windows laptops, why is this surprising? 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.
- mrb 4y agoUsually it's the fault of the Linux drivers. They don't correctly configure the various integrated peripherals to draw as little current as possible: the WiFi chip, the Bluetooth chipset, the webcam, or whatever random integrated USB peripheral you find on an average laptop.
- kccqzy 4y agoWell people are working on it. As a random example I recently stumbled upon the "lazy RCU" patch in Linux. RCU is of course the synchronization mechanism to have mutable shared data across threads where reads don't need mutexes. Did you know that Linux's answer to "how do know this shared pointer can safely be freed" is conceptually to schedule the current thread on every single CPU? That doesn't sound power efficient and it isn't. https://lore.kernel.org/all/20220901221720.1105021-1-joel@joelfernandes.org/ https://lore.kernel.org/all/20220901221720.1105021-1-joel@jo...
- sangnoir 4y agoThis is not inherently the fault of Linux, but the lack of drivers or decent tuning/power management default by OEMs. I get 11 hours off my $300 Linux laptop, but it's a Chromebook that's supported by Google directly, and I assume its components were preselected and the kernel is tuned up the wazoo.
- 2muchcoffeeman 4y agoThis is why I started using Pop. I saw something about better power saving and yeah, it has better defaults out of the box and I got better battery life. Now if only everything else worked flawlessly out of the box.
- Waterluvian 4y agoI’ve given up on good battery life in Linux. Any time I ask I get the “it’s easy, just do all this ridiculously complex stuff” and then it doesn’t work anyways. So now my battery is just a UPS. Which is actually kind of nice at times!
- Tsagadai 4y agoIt's a pure resourcing issue. How many resources are allocated to improving linux desktop experience on laptops? A tiny fraction compared to Microsoft and Apple. Linux paid developers are usually focused on the server side. If next to nothing is invested in making it better then it doesn't get better.
- fortran77 4y agoThis is why I run Windows on my laptop and use WSL when I need a Linux shell. Linux either doesn't care about or can't properly implement all the power management functions the chipset supports
- Mikeb85 4y ago> I get less than half the battery life on my Alienware AMD laptop under Linux than under Windows If you're on Gnome use "power saving" performance mode. Proprietary OSes throttle aggressively whereas Linux doesn't on "balanced" mode.
- Arn_Thor 4y agoIt's fascinating to me. Linux in so many ways feels "lighter" in use than Windows, but it just eats power like nothing else