SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2012-07-12 21:44:50

machinebacon
#! unstable
From: China
Registered: 2009-07-02
Posts: 6,826
Website

Saving power on Linux

This thread should collect some tips & tricks about powersaving in Linux. If you have a useful information on how to save Watts, extend battery life, reduce power consumption, fan noise, heat from CPU/GPUs etc. please share.

A very good and informative website on the topic is http://www.lesswatts.org/

Thanks in advance!


Sweaty lads picking up the soap | I love the new "Ignore user" button

Offline

Be excellent to each other!

#2 2012-07-12 22:34:40

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: Saving power on Linux

Good idea

Some stuff already on this forum eg power saving

Tip Many people still run a laptop with the power lead permanently plugged in. A good way to reduce the battery life sad

Run the batt down before recharging (although I haven't researched modern batt types and how they cope with a charging regime)

EDIT Seems most of the above is outdated and uninformed! big_smile

Last edited by damo (2012-07-13 13:52:47)


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

#3 2012-07-12 22:42:04

pidsley
Window Mangler
Registered: 2012-05-23
Posts: 1,752

Re: Saving power on Linux

damo wrote:

Run the batt down before recharging (although I haven't researched modern batt types and how they cope with a charging regime)

This used to be true with nickel-cadmium (NiCd) batteries, but those have not been used for laptops for some time. Modern lithium ion batteries do not have the same kind of memory effect -- they do not need to be fully discharged before recharging.

Last edited by pidsley (2012-07-12 22:43:42)

Offline

#4 2012-07-12 22:43:00

machinebacon
#! unstable
From: China
Registered: 2009-07-02
Posts: 6,826
Website

Re: Saving power on Linux

^Oh yes, good tip.

@heat: Anybody else noticed that hybrid graphics (e.g. Intel i5/ATI combo) produces a lot of heat? Lenovo Ideapad Y560, constantly over 60 degrees (or is that normal?)


Sweaty lads picking up the soap | I love the new "Ignore user" button

Offline

#5 2012-07-12 22:50:15

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,749

Re: Saving power on Linux

machinebacon wrote:

@heat: Anybody else noticed that hybrid graphics (e.g. Intel i5/ATI combo) produces a lot of heat? Lenovo Ideapad Y560, constantly over 60 degrees (or is that normal?)

It's not. Without a proper vga-switcheroo mechanism, the AMD card is never shut down, and you have the dreadful open source driver eating your battery life and cooking eggs. Things improve slightly when installing the proprietary driver, but not by much. Pretty much everything needed is in hadran's thread. I've added CPU throttling when on battery in the same thread, which gave me about 30 minutes extra. Undervolting is also a possibility, though it's not for the faint of heart.

The lifespan of modern batteries isn't reduced by keeping the machine plugged in most of the time. They do deteriorate with time, but that's kinda normal (say, a replacement once every five years is to be expected).

Offline

#6 2012-07-12 22:53:56

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: Saving power on Linux

pidsley wrote:
damo wrote:

Run the batt down before recharging (although I haven't researched modern batt types and how they cope with a charging regime)

This used to be true with nickel-cadmium (NiCd) batteries, but those have not been used for laptops for some time. Modern lithium ion batteries do not have the same kind of memory effect -- they do not need to be fully discharged before recharging.

I figured it would be something like that. But a quick google produced this

Laptop batteries normally offer a predetermined number of charging cycles and are continuously losing a minute portion of their charge. As a lithium-ion battery sits unused inside a computer, running off the AC adapter, the computer heats up. The hotter it gets the more quickly the battery discharges. If the battery remains inside the laptop while constantly running off AC power, it is in a constant state of charging and discharging, needlessly eating up precious charges. It may be possible to recondition the battery and gain more charging power.

This implies to me that either you should run off battery-only as much as possible, or remove it when using AC power


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

#7 2012-07-12 22:56:35

machinebacon
#! unstable
From: China
Registered: 2009-07-02
Posts: 6,826
Website

Re: Saving power on Linux

Thanks elko. It's not my laptop, so I couldn't play around with it too much, but I have put radeon.modeset=0 and disabled the ATI adapter in BIOS, the Intel adapter is slightly cooler but still too hot IMO. I'll check that thread, thanks again.


Sweaty lads picking up the soap | I love the new "Ignore user" button

Offline

#8 2012-07-12 23:19:20

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,749

Re: Saving power on Linux

Try booting with i915.i915_enable_rc6=1

Offline

#9 2012-07-13 00:00:47

pidsley
Window Mangler
Registered: 2012-05-23
Posts: 1,752

Re: Saving power on Linux

[deleted] don't want to get in an argument. don't have a laptop.

Last edited by pidsley (2012-07-13 00:15:14)

Offline

#10 2012-07-13 05:51:39

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 13,970

Re: Saving power on Linux

pidsley wrote:
damo wrote:

Run the batt down before recharging (although I haven't researched modern batt types and how they cope with a charging regime)

This used to be true with nickel-cadmium (NiCd) batteries, but those have not been used for laptops for some time. Modern lithium ion batteries do not have the same kind of memory effect -- they do not need to be fully discharged before recharging.

In fact, most modern rechargeable batteries - from SLA to NiMH and LiIon - have much shorter lifespans if frequently discharged below 20%.  A typical LiIon battery can last about 5 years from manufacture if used conservatively, but can die in less than two years if fully discharged twice a week.

Offline

#11 2012-07-13 07:44:44

ivanovnegro
Ivan #000000
From: unstable madness
Registered: 2011-06-02
Posts: 5,432

Re: Saving power on Linux

On my old (3.5 years) HP laptop the battery still lasts about 3 hours (average), in idle mode even until 4 or more. I never used to get too mobile with it. But in fact, I always remove the battery when I do not need it at all and that is most of the time at home.

Offline

#12 2012-07-19 03:22:57

Ed Flanders
#! Member
From: cl
Registered: 2011-10-26
Posts: 60

Re: Saving power on Linux

I never take out the battery because of power outages. They are rare, but when they happen and you don't have your battery...


I've made a huge mistake

Offline

#13 2012-07-19 09:43:48

Tim
#! CrunchBanger
From: SWeden
Registered: 2012-07-09
Posts: 149

Re: Saving power on Linux

howcome my laptops drains more battery on crunchbang than windows 7?
Need to find a fix for this, maybe jupiter or somthing?! any idea?


Crunchy feeling #!

Offline

#14 2012-07-19 14:40:30

FiniteStateMachine
Part of the Machine
From: Ontario, Canada
Registered: 2009-06-29
Posts: 1,489

Re: Saving power on Linux

Arch has a good forum post that includes a set of scripts which implement a bunch of features normally missing:

https://bbs.archlinux.org/viewtopic.php?id=134109&p=1

Near the end Unia (from these forums I assume) jumps in and posts his own version github. Not sure if the original version or Unias is more up to date / better.


just call me...
~FSM~

Offline

#15 2012-07-19 14:48:37

sunfizz98
Carbonated Orange Juice
From: su terminal
Registered: 2011-05-12
Posts: 1,876
Website

Re: Saving power on Linux

@ivanovnegro
Yeah, I always remove my battery when I'm by a power source. No point in whittling down a battery unless I'm going on a road trip.

Offline

#16 2012-07-25 13:56:34

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Re: Saving power on Linux

FiniteStateMachine wrote:

Arch has a good forum post that includes a set of scripts which implement a bunch of features normally missing:

https://bbs.archlinux.org/viewtopic.php?id=134109&p=1

Near the end Unia (from these forums I assume) jumps in and posts his own version github. Not sure if the original version or Unias is more up to date / better.

Yep, that's me. You can find my version here: https://github.com/Unia/powersave

It's not per sé more up to date / better, just simpler. It's alot like Machinebacon's here so I didn't care to post over here.


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

I am a #! forum moderator. Feel free to send me a PM with any question you have!

Offline

#17 2012-07-25 14:31:41

Tunafish
#! Die Hard
From: the Netherlands
Registered: 2010-03-07
Posts: 1,204

Re: Saving power on Linux

To find out the current capacity of your battery, you can check /proc/acpi/battery/BAT0/info
or install acpi and run acpi -V
this will tell you the current capacity compared to the design capacity:

Battery 0: design capacity 9324 mAh, last full capacity 8771 mAh = 94%

I've heard so many different advices on charging/discharging and taking out the battery or not, that I don't have a clue what's best. So I usually do what's most easy.


sed 's/stress/relaxation/g'
Privacy & Security on #!

Offline

#18 2012-07-31 08:39:56

aeqel
Member
From: Australia
Registered: 2012-06-12
Posts: 25
Website

Re: Saving power on Linux

I recently tweaked the battery life on my laptop. Lenovo y560p (i7 with ATi graphics non switchable) I've been meaning to write a comprehensive how-to for a while.

I took some tips from hadrans thread. I don't use laptop-mode-tools anymore instead put a heap of scripts into the power.d folder as suggested in the thread. I also run the proprietary ATi driver with VSYNC OFF!
With all of these tweaks I went from getting 2.5 hours to 3.5 hours of battery life with wifi on and doing work on my laptop. This is BETTER than I get on Windows 7 easily! With wifi off I'm very impressed I can comfortably get 4 hours.

Basic run down:

1. Install pm-utils, powertop, xtrlock (to give locking capability)

sudo apt-get install pm-utils powertop xtrlock

Now is a good time to have a look at powertop to compare your power usage and wake ups before and after.

2. Remove xscreensaver, laptop-mode-tools, conky and the clipboard monitor - all of which create wake ups.

sudo apt-get remove conky xscreensaver acpi acpid laptop-mode-tools parcellite

3. Fix the locking screen: src: http://blog.technicallyworks.com/2012/0 … hbang.html

sudo ln -s xtrlock xflock4

4. Now is a good time to put the latest pm-utils and other scripts into the /etc/pm/power.d folder as said in hadrans thread, don't forget to make them executable.

5. Remove hal-polling: src: http://systembash.com/content/disabling … tosredhat/

sudo nano /etc/hal/fdi/policy/99-custom.fdi

Paste the following into the new file:

<?xml version="1.0" encoding="UTF-8"?>

<deviceinfo version="0.2">
    <device>
        <match key="storage.removable" bool="true">
            <remove key="info.addons" type="strlist">hald-addon-storage</remove>
        </match>
    </device>
</deviceinfo>

6. Install bash-mount to make up for the loss of the hal-polling: src: http://sourceforge.net/projects/bashmount/

7. If you have a backlit screen (i.e. not OLED - if you don't know you probably do have a backlit screen) use a primarily white minimalist theme. i.e. White wallpaper, white terminal windows, white everything. This last step saves an extra 0.8 watts for me compared to the standard mainly black minimalist theme.

Restart and enjoy.

Terse; like I said I've been meaning to write a more comprehensive guide. ><

By the way with this setup I get 3-10 wake ups per second when completely idle with wifi off. smile

Last edited by aeqel (2012-07-31 08:42:44)

Offline

#19 2012-07-31 08:59:48

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,749

Re: Saving power on Linux

aeqel wrote:

2. Remove conky and the clipboard monitor - all of which create wake ups.

5. Remove hal-polling:

This is dubious to say the least. acpid lets you suspend and reboot the computer on pressing the sleep or power buttons. The wakeups caused by conky and parcelite are so minor it's not even worth mentioning. Disabling the entire HAL storage mechanism is also extreme. The biggest power drain is HAL polling the DVD drive, which is a simple:

# hal-disable-polling  --device /dev/scd0

The two biggest power drainage causes are the CPU policy governor (switching from performance or ondemand to powersave nets you at least 30 minutes alone) and the screen brightness - anything over 65 percent will eat the battery like crazy.

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo