You are not logged in.

#51 2012-03-06 18:39:48

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: 3x+ battery life

Or use pm-powersave to set them according to the state of your AC.

Regards

Offline

#52 2012-03-06 19:28:10

vwyodajl
Member
Registered: 2012-01-21
Posts: 183

Re: 3x+ battery life

or put it in /etc/acpi/handler.sh

Offline

#53 2012-03-07 08:01:23

nachiappan
Member
From: Raleigh, NC
Registered: 2011-11-13
Posts: 25

Re: 3x+ battery life

I tried adding all inidividual entries into /etc/rc.local and restarted my machine. No values mentioned in the rc.local where set.
Below is my rc.local file. Please let me know if i need to do any corrections.
Also I dont have /etc/acpi/handler.sh, can i just create one folder named acpi in etc and a file called handler.sh inside acpi foler and put all the below setting ?

#!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#
echo 60000 > /proc/sys/vm/dirty_expire_centisecs &
echo 5 > /proc/sys/vm/laptop_mode &
echo 1 > /sys/devices/system/cpu/sched_mc_power_savings &
echo 1 > /sys/devices/system/cpu/sched_smt_power_savings &
echo 60 > /proc/sys/vm/dirty_ratio &
echo 60000 > /proc/sys/vm/dirty_writeback_centisecs &
cat echo 60000 > /proc/sys/vm/dirty_writeback_centisecs &
echo 1 > /sys/module/snd_hda_intel/parameters/power_save &
echo 1 > /sys/module/i915/parameters/i915_enable_rc6 &
for i in /sys/class/scsi_host/host*/link_power_management_policy; do echo min_power > $i; done &
for i in /sys/bus/usb/devices/*/power/control; do echo auto > $i; done &
for i in $(ls /sys/bus/usb/devices/*/power/level);do echo auto > $i;done &
for i in $(ls /sys/bus/{pci,i2c}/devices/*/power/control);do echo auto > $i;done  &
echo -n 10 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor &
echo -n 15 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold &

Regards,
Nachi

Last edited by nachiappan (2012-03-07 08:15:13)

Offline

#54 2012-03-07 08:04:49

taylorchu
Member
Registered: 2010-08-09
Posts: 405

Re: 3x+ battery life

just one more discovery.
irqbalance dramatically reduces system interrupts.
i highly recommend everyone to install this because it makes system run smoother by balancing out the load, and add 30 to 40 minutes battery life.
this update is included in the main thread.


"After you do enough distro research, you will choose Arch."

Offline

#55 2012-03-07 08:37:55

el mariachi
Member
Registered: 2007-11-30
Posts: 595

Re: 3x+ battery life

It doesn't change anything for me... (irqbalance).
The kernel already balances the load:

sudo cat /proc/irq/*/smp_affinity

Bound to cpu0 - 1
Bound to cpu1 - 2
Bound to cpu0 and/or cpu1 - 3
Bound to cpu3,4,7 - 282

Offline

#56 2012-03-07 19:20:04

taylorchu
Member
Registered: 2010-08-09
Posts: 405

Re: 3x+ battery life

you are right because irqbalance is enabled in kernel config


"After you do enough distro research, you will choose Arch."

Offline

#57 2012-03-07 21:05:55

Earnestly
Member
Registered: 2011-08-18
Posts: 805

Re: 3x+ battery life

taylorchu wrote:

you are right because irqbalance is enabled in kernel config

Then how did you gain 30-40 minutes of battery life?

At any rate, here's some documentation about Tuned IRQs

Offline

#58 2012-03-08 09:36:17

broken pipe
Member
Registered: 2010-12-10
Posts: 239

Re: 3x+ battery life

so much time? i thought it's just good for overall performance tongue

Offline

#59 2012-03-08 10:06:25

taylorchu
Member
Registered: 2010-08-09
Posts: 405

Re: 3x+ battery life

Kaustic wrote:
taylorchu wrote:

you are right because irqbalance is enabled in kernel config

Then how did you gain 30-40 minutes of battery life?

At any rate, here's some documentation about Tuned IRQs


because i did not use archlinux default kernel. so if you use arch default, you can skip irqbalance.


"After you do enough distro research, you will choose Arch."

Offline

#60 2012-03-08 12:12:27

Earnestly
Member
Registered: 2011-08-18
Posts: 805

Re: 3x+ battery life

Ah fair enough.
Do you think that your (non-default) kernel configuration has any other [side-]effects on power and performance regarding all the other options you've listed?

Offline

#61 2012-03-09 08:52:51

taylorchu
Member
Registered: 2010-08-09
Posts: 405

Re: 3x+ battery life

i created aur package called "powerdown".
you just install the package and add "powerdown &" to rc.local.


"After you do enough distro research, you will choose Arch."

Offline

#62 2012-03-12 05:53:11

jocheem67
Member
Registered: 2009-11-09
Posts: 243

Re: 3x+ battery life

I tried adding all inidividual entries into /etc/rc.local and restarted my machine. No values mentioned in the rc.local where set.
Below is my rc.local file. Please let me know if i need to do any corrections.
Also I dont have /etc/acpi/handler.sh, can i just create one folder named acpi in etc and a file called handler.sh inside acpi foler and put all the below setting ?

You can put 'm in a script and point to that script from within rc.local:

sleep 10 && /home/%%%%%%/power_saving.sh

The sleep is important in my case

Last edited by jocheem67 (2012-03-12 05:53:41)

Offline

#63 2012-03-14 17:58:54

nachiappan
Member
From: Raleigh, NC
Registered: 2011-11-13
Posts: 25

Re: 3x+ battery life

How do I check if irqbalance is already enabled ?
I tried  $sudo cat /proc/irq/*/smp_affinity .. and below is the output.. How do I read the below output ?
ff
0f
0f
0f
0f
0f
0f
0f
0f
0f
ff
0f
0f
0f
0f
0f
0f
0f
0f
0f
0f
0f
0f
0f

Offline

#64 2012-03-14 20:16:44

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: 3x+ battery life

Very nice smile

When I run powerdown I get the following output:

toad@archtop 526\27 ~/.kde4/share/config > FATAL: Module uvcvideo not found.
Error for wireless request "Set Power Management" (8B2C) :
    SET failed on device wlan0 ; Operation not supported.

/dev/sda6:
 setting fs readahead to 2048
 setting Advanced Power Management level to 0x01 (1)
 setting standby to 6 (30 seconds)
 readahead     = 2048 (on)
 APM_level      = 1

/dev/sda5:
 setting fs readahead to 2048
 setting Advanced Power Management level to 0x01 (1)
 setting standby to 6 (30 seconds)
 readahead     = 2048 (on)
 APM_level      = 1

/dev/sda7:
 setting fs readahead to 2048
 setting Advanced Power Management level to 0x01 (1)
 setting standby to 6 (30 seconds)
 readahead     = 2048 (on)
 APM_level      = 1
FATAL: Module bluetooth not found.
^C

never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#65 2012-03-15 06:20:30

taylorchu
Member
Registered: 2010-08-09
Posts: 405

Re: 3x+ battery life

@nachiappan
you dont have to check at all. i am 100% sure it is enabled for everyone in vanilla arch linux kernel.

@toad
if you run this with root privilege, it looks fine to me.
i could have suppressed the module and the hdparm err msg, but this actually tells you more about your system.


"After you do enough distro research, you will choose Arch."

Offline

#66 2012-03-15 06:35:13

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: 3x+ battery life

Yep, ran it as root, was just confused that it suddenly stopped dead with "FATAL: Module bluetooth not found." smile

Perhaps some sort of "All is fluffy" message to tell the non-code-reading-dumbass user like me that things are rosy?


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#67 2012-03-17 19:14:14

taylorchu
Member
Registered: 2010-08-09
Posts: 405

Re: 3x+ battery life

ready in aur


"After you do enough distro research, you will choose Arch."

Offline

#68 2012-03-17 19:58:35

broken pipe
Member
Registered: 2010-12-10
Posts: 239

Re: 3x+ battery life

oh you edited your first post and all goodies are gone sad

stupid question, but which hdparm options should be applied on a ssd? spindown? write through? etc.

Offline

#69 2012-03-17 20:36:18

taylorchu
Member
Registered: 2010-08-09
Posts: 405

Re: 3x+ battery life

https://github.com/taylorchu/powerdown/ … /powerdown

ssd does not need hdparm. when you run it, it has no effect.
however, ssd does support readahead.


"After you do enough distro research, you will choose Arch."

Offline

#70 2012-03-17 21:21:01

broken pipe
Member
Registered: 2010-12-10
Posts: 239

Re: 3x+ battery life

ok thx, you're great!
yes readahead is enabled through systemd.

Offline

#71 2012-03-21 19:09:11

intrntbrn
Member
From: Germany
Registered: 2011-12-01
Posts: 66

Re: 3x+ battery life

nice script. on powertop2 are still these values "bad"
does someone know how to disable them permanently?

Bad           VM writeback timeout                                                                                   
   Bad           Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family 2 port SATA IDE Controller
   Bad           Runtime PM for PCI Device Ricoh Co Ltd MMC/SD Host Controller
   Bad           Runtime PM for PCI Device Intel Corporation Centrino Advanced-N 6205
   Bad           Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller
   Bad           Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family 4 port SATA IDE Controller
   Bad           Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1
   Bad           Runtime PM for PCI Device Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller
   Bad           Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family KT Controller
   Bad           Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2
   Bad           Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller
   Bad           Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1
   Bad           Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2
   Bad           Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5
   Bad           Runtime PM for PCI Device Intel Corporation 2nd Generation Core Processor Family DRAM Controller
   Bad           Runtime PM for PCI Device Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1

got another problems: when running powerdown via rc.local my system takes about  1min+ until i can login at slim. and then other autostarts like autoconnection to wlan via wicd doesnt work.

Last edited by intrntbrn (2012-03-21 19:20:17)

Offline

#72 2012-03-23 02:58:36

taylorchu
Member
Registered: 2010-08-09
Posts: 405

Re: 3x+ battery life

@intrntbrn
let me try to fix these. but powertop2 is really out-of-date, you should not trust it much.


"After you do enough distro research, you will choose Arch."

Offline

#73 2012-03-30 15:22:33

intrntbrn
Member
From: Germany
Registered: 2011-12-01
Posts: 66

Re: 3x+ battery life

it wasnt your script. i forgot to build my kernel with ahci and was booting @compatible mode. everything works, but i stay with tlp.

Last edited by intrntbrn (2012-03-30 15:23:28)

Offline

#74 2012-03-30 15:40:14

el mariachi
Member
Registered: 2007-11-30
Posts: 595

Re: 3x+ battery life

I was expecting this script my laptop's temperature, but the decrease is very slight. It still cruises (chromium with 5 tabs open, two libreoffice writer windows open and transmission) @60ºC, although actual cpu usage is always <10%. Have you tried any undervolting methods? I tried intel-phc but it invariably crashes my system (used to work with 2.26 kernels; doesn't work with the newer patches for 3.x; yes I have an intel cpu tongue) zen-kernel has a voltage control option, but I don't understand how to make use of it.

Other than that (i.e. for the purpose it was built), the scripts works fine wink

Offline

#75 2012-03-31 14:12:32

twilight0
Member
From: Greece
Registered: 2011-05-01
Posts: 233
Website

Re: 3x+ battery life

Powerdown is actually nice, although I think it is too aggressive when it comes to hard drive spin down timeouts.

I am using pm-utils + acpid + laptop-mode

Machine: Dell XPS L702X, Intel Core i7 2670QM, Geforce GT555M with no Optimus

Windows: ~3h 30 min moderate use, lowest brightness
Arch: ~4h moderate use, lowest brightness

I think power regression on 3.3 linux kernel will be history.


Proud Arch Linux user since 2007.

Offline

Board footer

Powered by FluxBB