7 ms·
PowerTOP – diagnose issues with power consumption and power management on Linux
- cesarb 5y agoJust be careful with powertop's suggestions: it suggests min_power instead of med_power_with_dipm (https://lore.kernel.org/patchwork/patch/830838/ https://lore.kernel.org/patchwork/patch/830838/), which can lead to data corruption. It happened with me on my current laptop, I played a bit with powertop on it when it was new to see how long its battery could last, and ended up with filesystem corruption, so I had to wipe and reinstall; luckily, I didn't have any important data on it yet.
- forbiddenlake 5y agoPowerTOP 2.14 on Arch Linux suggests med_power_with_dipm for me!
- deleted 5y ago[deleted]
- sdht0 5y agoLooks like this is fixed in the latest tlp versions: # tlp-stat defaults.conf L0019: SATA_LINKPWR_ON_AC="med_power_with_dipm max_performance" defaults.conf L0020: SATA_LINKPWR_ON_BAT="med_power_with_dipm min_power"
- na85 5y agoI went down this rabbit hole a few years ago. I bought an X220 (tablet edition) when it first came out. I still have it; with an i7 and 8 GB of RAM it quite frankly can still pull its weight despite being released in 2011 or so. Anyways, when it was new I kinda-sorta became obsessed about battery life and I tried all the tricks: Screen on minimum brightness, wifi and bluetooth disabled, SSD installed, all the options toggled in PowerTOP and tlp-stat[0], I could get that i7 down to just 6 Watts or so at idle, but of course even the interrupts from the keyboard would cause the power consumption to spike upwards. At 6 Watts it would last something like 9 hours, which is great when you're traveling. Pre-download a bunch of API documentation and man pages, and you can hack away on the plane. Powertop is a great tool that's only been getting better. I of course do not use that laptop any more; I gave it to my 4 year old daughter and taught her how to launch emacs. She plays a game where she makes fun letter patterns in the scratch buffer and I use a macbook pro as my daily driver. The battery life is substantially better, and I can't wait to try an M1. My wife's XPS can't hold a candle to the macbook as far as longevity is concerned. [0] https://linrunner.de/tlp/ https://linrunner.de/tlp/
- yewenjie 5y agoWhat's your best setting look like?
- na85 5y agoNowadays I don't use Linux on laptops because the UX is so bad. But when I last did, I just installed tlp which now mostly incorporates every suggestion from powertop anyway.
- windexh8er 5y agoI'm curious what you feel has gotten worse on Linux with regard to UX? I have the opposite experience. The only non-Linux machine in my office is a MBP from my employer which I feel gets in my way far more.
- na85 5y agoLinux irritations that don't happen on mac: - laptop wakes up randomly when lid is closed, fans spin up, drain battery - wifi is flaky - trackpad drivers/trackpad behavior in general are inferior - battery life isn't as good even with obsessive levels of tweaking
- windexh8er 5y agoThat's the rub I think. I have a T470 maxed out I bought years ago and everything in it is well supported. I'd even say it's more reliable than my 16" MBP that often crashes if I leave it connected to a docking station over night. I will agree though that the one thing I find much better on Apple laptops is the trackpad. I do disable the trackpad and use the nub, which I find more convenient for most things anyway.
- sildur 5y agoI have a MBP from 2018 and it's awful with wifi6, it always timeouts after a few minutes and I have to restart the wifi on the Mac. It happens on iOS too. No idea why, I'm still investigating.
- yewenjie 5y agoIs it possible to get better than Windows power management with this tool? How?
- nixpulvis 5y agoWhat is Window?
- na85 5y agoIt's an operating system. https://www.microsoft.com/en-ca/windows https://www.microsoft.com/en-ca/windows
- nixpulvis 5y agoOh wow! And how does this magical Windows handle power so well?
- nindalf 5y agoBetter to flag bad faith comments rather than reply in earnest.
- nixpulvis 5y agoNot bad faith, just bad form. I was probing for an explanation as to how Windows worked that needs beating by use of powertop. Power management is a wholistic concept for a computer. I appreciate that the comment was probably more along the lines of "how can I find slow processes on Windows" or something else that powertop may be useful for here.
- yaantc 5y agoI'd recommend just installing the "tlp" package, it includes most of what PowerTOP does and is "install and forget". Just an anecdote: I'm using Linux on a professional laptop, the same most of my colleagues use with Windows 10 (Latitude 7490). My battery life is significantly higher, high enough that I never care really, and the laptop is quieter: hearing the fan is the exception, not the norm. All this with Debian and the TLP package installed. The TLP configuration is just tweaked to aggressively idle the SSD (no spin down / spin up issue anymore) but that's it. I did this a long time ago when I moved from HDD to SSD, and just carry this over. A good deal of the difference may come from the antivirus on Windows, but TBC.
- nnoyingvegoon 5y agoI prefer SubBOTTOM
- sitzkrieg 5y agoafter years of fighting with tlp and cpu governors etc and never getting close to windows, i have to think this is mostly an indicator how impossibly difficult it is to get comparable power usage on linux just because there are so many cooks in the kitchen sometimes. i really wish i could put a single finger on the difference but its apparently a mystery to everyone still on both big platforms
- rektide 5y agoI've had the opposite experience. run powertop's auto tune, and the three laptops I've owned in the last decade have all ran longer than windows by a decent measure.
- vbezhenar 5y agoWhen I used Windows and checked Task Manager, it always did some silly work, there was always some I/O, there was always some CPU usage. With Linux it's dead silent. If I don't do anything, Linux does not do anything. I think that the only avenue where Windows might be superior is driver quality, but even that is questionable.
- disgruntledphd2 5y agoYeah, agreed. I recently moved to Windows (ten years Linux previously), and its shocking how bad the default battery life is.
- sitzkrieg 5y agohuh well im happy to hear its better, intel or amd?
- throwaway984393 5y agoPower management in Linux is a bit wacky still. I was running a super ancient Linux distro on this laptop for years, and had two weird incidents. In one, I was trying to tweak power settings manually, and somehow got the CPU fan stuck on "full-speed" for something like 6 months. Then later I installed either PowerTOP or TLP or some other tool I don't know, and it recalibrated my power settings.... immediately the fan stopped going full-speed, and it would only turn on when the CPU was really chugging. Fast forward to today, I upgraded to Ubuntu 20.04. Just letting the machine idle after boot-up runs the CPU fan continuously at low speed. Opening a browser sends it into full-speed mode until I close the browser (virtually any page). But it's the same machine, and same version of Firefox. So, something about this newer kernel + OS has resulted in the fan spinning way more than the old kernel + OS. Trying to figure out how or why leads you nowhere, because of course it's all specific to your hardware and whatever in the kernel has changed. Now you might think, "OK, just turn on power-saving, the fans should be silenced." Nope. Tried every single power tweak that exists, and I can't force the fans to quiet. I can make the CPU run dog slow, but the fans keep chugging. Which is really annoying when all you want is a few minutes of peace and quiet.
- Thev00d00 5y agoif it's years old perhaps it heatsinks are just a bit full of cruft nowadays?
- quijoteuniv 5y agoIn my cases, several Mac transformed to Linux and some windows transforms, they all run better in Linux. You can check with lm_sensors which reads the temperature of the sensors, specially on the cpu, then repaste them, you will see you gain 10 degrees Celsius or more on badly thermal pasted cpus. I also upped the minimum fan speed (by modifying a file on startup) lm_sensors reads that too, so upped 1000 revs were still is quite quiet and that helps. All of this while having CPUPower on conservative from startup. Peace and quiet :) I am curious: why do you have a throwaway account for posting this? Edit: is that machine even able to run another OS than Linux? If not Linux is awesome and can even run on that machine :)
- 5y ago
- zibzab 5y agoWhile this is fun to use, it was kind of meaningless before Linux did their huge powers refactoring a few years back. As it turns out, turning off unused peripherals like HDMI and ethernet save you more battery than any tweaks you can do. Anyway, around Linux 5.00 my old laptops battery life went from 2-3 hours to 6-7 and I haven't touched powertop since then.