You are not logged in.

#76 2012-04-01 12:56:11

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

Re: 3x+ battery life

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

What makes you think so?

Regards

Offline

#77 2012-04-01 13:42:30

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

Re: 3x+ battery life

Well, they did have problem with power regression on 3.1 and 3.2 kernels, didn't they? Did they fix it in 3.3?


Proud Arch Linux user since 2007.

Offline

#78 2012-04-01 13:48:18

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: 3x+ battery life

twilight0 wrote:

Well, they did have problem with power regression on 3.1 and 3.2 kernels, didn't they? Did they fix it in 3.3?

3.3 has been in [testing] for a while now.  why don't you give it a try?

Last edited by graysky (2012-04-01 14:30:38)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#79 2012-04-01 13:57:58

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

Re: 3x+ battery life

I never install packages from [testing]. Sorry about that. I can wait until its marked "stable", I am patient enough.


Proud Arch Linux user since 2007.

Offline

#80 2012-04-01 14:00:33

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

Re: 3x+ battery life

there has been some more work on aspm I think, but nothing too serious. but that's from Phoronix so take it with a grain of salt

Offline

#81 2012-04-02 02:41:57

heliedgar
Member
Registered: 2010-10-21
Posts: 4

Re: 3x+ battery life

Hello very nice script but when its activated my wireless mouse get autosuspended, how can i fix this? its very annoying

Offline

#82 2012-04-02 03:05:28

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

Re: 3x+ battery life

@heliedgar
this is because it is a usb device. by default, kernel will suspend it in 2 secs (if you stop moving your mouse for 2 secs, you will have to click first then use it.). i now added a rule to extend the time to 10 secs; i guess this time is much more reasonable.


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

Offline

#83 2012-04-02 03:35:13

heliedgar
Member
Registered: 2010-10-21
Posts: 4

Re: 3x+ battery life

thank you!! is this better than tlp?? BTW your slogan "After you do enough distro research, you will choose Arch." apply for me _-_ Archlinux its THE best.

Offline

#84 2012-04-27 11:17:15

samrat94
Member
Registered: 2011-01-07
Posts: 29

Re: 3x+ battery life

I've installed the AUR package, but even after I run `sudo powerdown`, powertop2 is still showing a discharge rate of ~27W. Did I do anything wrong?

Offline

#85 2012-04-29 08:20:48

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

Re: 3x+ battery life

@samrat94
powerdown has a new release today.

there are some packages that I think you can remove
1. powertop, powertop2: these packages have no updates for at least 3-4 years. if you think kernel has no changes on power management for 3 or 4 years, go ahead and continue to use them.
replacement: ppower is included in new powerdown. it shows laptop power usage in mWh. the value is usually between 10000 to 25000.

2. laptop-mode-tools: this is a huge framework on power management. It has dozens of configs you need to setup, which normally no one knows how to control them. I think it is a "troubleware"; to use it properly, you have to google more. most of time, you dont even know what works or not.
replacement: powerdown shows what does not work right in the screen. it contains all the rules optimized that just work.

3. tuxonice, uswsusp, pm-utils: too hassle to set things up. again, they complicate suspend and resume. the default kernel already support suspends and resume pretty well.
replacement: ps2mem uses default kernel for ram suspend and resume. you just run "sudo ps2mem"; no framework, no setup.

4. ppoweroff solves a bug in kernel(even in 3,4 rc that ehci_hcd messes up shutdown when it is set to powersave mode).
this is a wrapper for 'poweroff'. you just call it to shut down your arch box.

Last edited by taylorchu (2012-04-29 08:24:01)


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

Offline

#86 2012-04-29 10:38:11

samrat94
Member
Registered: 2011-01-07
Posts: 29

Re: 3x+ battery life

Has it already been released? I don't see a new update

Offline

#87 2012-05-02 09:42:14

vermelho
Member
Registered: 2012-05-02
Posts: 8

Re: 3x+ battery life

It is great!! I havent measured my new battery time with your script but I suspect its around 9 or 10 hours for my x220 with 9 cell battery, should last for at least 8 hours of moderate use.

My only request would be a powerup revert script or some pointers on how I can make my own, thus I can use acpid to set a battery saving mode when power cord is unplugged and revert to performance mode when the cord is plugged back.

Thanks!!!

Offline

#88 2012-05-02 09:51:50

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

Re: 3x+ battery life

+1 on the powerup script wink

Offline

#89 2012-05-02 14:12:58

theGunslinger
Member
Registered: 2011-05-20
Posts: 300

Re: 3x+ battery life

Loving this script, thanks a lot Taylorchu. Just wanted to ask about ps2mem, if anyone has a script that triggers it with laptop lid going down or something alike. Not that it's hard to type a command but i like automation.

Offline

#90 2012-05-02 15:30:39

samrat94
Member
Registered: 2011-01-07
Posts: 29

Re: 3x+ battery life

@taylorchu-

☿ sudo ppower
[powerdown] using 0 mWh

Also, I'm getting this:

☿ sudo powerdown
[powerdown] cannot write 1 to /sys/module/snd_ac97_codec/parameters/power_save
[powerdown] cannot write 1 to /sys/module/i915/parameters/i915_enable_rc6

Offline

#91 2012-05-02 19:10:48

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: 3x+ battery life

theGunslinger wrote:

Loving this script, thanks a lot Taylorchu. Just wanted to ask about ps2mem, if anyone has a script that triggers it with laptop lid going down or something alike. Not that it's hard to type a command but i like automation.

Look at the acpid package then, the acpi daemon registers events like the lid closing, or plugging or unplugging AC. It's not that difficult.

Last edited by .:B:. (2012-05-02 19:11:09)


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#92 2012-05-02 20:05:42

theGunslinger
Member
Registered: 2011-05-20
Posts: 300

Re: 3x+ battery life

.:B:. wrote:
theGunslinger wrote:

Loving this script, thanks a lot Taylorchu. Just wanted to ask about ps2mem, if anyone has a script that triggers it with laptop lid going down or something alike. Not that it's hard to type a command but i like automation.

Look at the acpid package then, the acpi daemon registers events like the lid closing, or plugging or unplugging AC. It's not that difficult.

Will do, thanks for the reply.

Offline

#93 2012-05-04 01:31:40

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

Re: 3x+ battery life

@samrat94
1. you are charging.
2. you dont seem to have those device.

@everyone
I pushed a newer version.
this version solves a bug that ps2mem will load ehci_hcd but this will also load bluetooth and other modules again.
I found out kmod modprobe is asynchronous.
to solve this problem I basically wait for 2 second, and run powerdown again.


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

Offline

#94 2012-05-04 09:18:56

aesiris
Member
Registered: 2012-02-25
Posts: 97

Re: 3x+ battery life

taylorchu wrote:

@samrat94
1. you are charging.
2. you dont seem to have those device.

I have the same results as taylorchu.
1. the script is reading from /sys/class/power_supply/BAT0/power_now but it does not exists. This is what I have:

$ find /sys/class/power_supply/BAT0/
/sys/class/power_supply/BAT0/
/sys/class/power_supply/BAT0/uevent
/sys/class/power_supply/BAT0/subsystem
/sys/class/power_supply/BAT0/device
/sys/class/power_supply/BAT0/status
/sys/class/power_supply/BAT0/present
/sys/class/power_supply/BAT0/technology
/sys/class/power_supply/BAT0/cycle_count
/sys/class/power_supply/BAT0/voltage_min_design
/sys/class/power_supply/BAT0/voltage_now
/sys/class/power_supply/BAT0/current_now
/sys/class/power_supply/BAT0/charge_full_design
/sys/class/power_supply/BAT0/charge_full
/sys/class/power_supply/BAT0/charge_now
/sys/class/power_supply/BAT0/type
/sys/class/power_supply/BAT0/model_name
/sys/class/power_supply/BAT0/manufacturer
/sys/class/power_supply/BAT0/serial_number
/sys/class/power_supply/BAT0/power
/sys/class/power_supply/BAT0/power/async
/sys/class/power_supply/BAT0/power/runtime_status
/sys/class/power_supply/BAT0/power/runtime_usage
/sys/class/power_supply/BAT0/power/runtime_active_kids
/sys/class/power_supply/BAT0/power/runtime_enabled
/sys/class/power_supply/BAT0/power/control
/sys/class/power_supply/BAT0/power/runtime_suspended_time
/sys/class/power_supply/BAT0/power/runtime_active_time
/sys/class/power_supply/BAT0/power/autosuspend_delay_ms
/sys/class/power_supply/BAT0/alarm

if I change it to

$ echo $(( $(cat /sys/class/power_supply/BAT0/voltage_now) * $(cat /sys/class/power_supply/BAT0/current_now) / 1000000000))
6092

the result agrees with upower -d

2. it appears that i915_enable_rc6 can not be changed. See this patch in kernel-3.3.3

commit c30ba23cbb70c00e621ca731fec17ccc01035384
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Wed Apr 11 09:39:02 2012 -0700

    drm/i915: make rc6 module parameter read-only
    
    commit f57f9c167af7cb3fd315e6a8ebe194a8aea0832a upstream.
    
    People have been getting confused and thinking this is a runtime control.

so it must be set at boot

Offline

#95 2012-05-04 17:03:25

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

Re: 3x+ battery life

now, two options must be set on boot
1. pcie_aspm=force
2. i915.i915_enable_rc6=1

btw, everyone should have power_now for battery (if you update)
http://git.kernel.org/?p=linux/kernel/g … 155e507e13


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

Offline

#96 2012-05-11 15:47:24

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

Re: 3x+ battery life

I don't know how accurate the reading is, but acpi is telling me that my full battery will last for 4h 30m (it's rated for 2h 30m)!
TOTAL IDLENESS: 4h 55m yikes

Last edited by el mariachi (2012-05-11 15:48:41)

Offline

#97 2012-05-11 16:42:09

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: 3x+ battery life

Does this package change the settings whether i'm on ac or battery?
Otherwise: +1 on powerup script (so with acpid and this package i can remove lmt)

Offline

#98 2012-05-14 01:20:39

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

Re: 3x+ battery life

POWERUP is here!


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

Offline

#99 2012-05-14 20:42:47

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: 3x+ battery life

I think this can be the right place to post this.
I created my own script for pm-powersave, and i was wondering, usb autosuspend won't work if, when you're on battery, plug an usb device, because the script must be executed again in order to obtain autosuspend.
So, is there a way to get autosuspend work even in the same ac state? May be creating an udev rule? But then, must i create a rule for all the device i can plug in?
Thanks guys!

Offline

#100 2012-05-15 15:51:25

kinu
Member
Registered: 2009-06-13
Posts: 64

Re: 3x+ battery life

HI,

I'm getting

cat: /sys/class/power_supply/BAT0/power_now: No such file or directory
/usr/bin/ppower: line 4: /1000: syntax error: operand expected (error token is "/1000")

when issuing ppower.

uname -a gives me

Linux saler 3.3.6-1-ARCH #1 SMP PREEMPT Sun May 13 10:52:32 CEST 2012 x86_64 GNU/Linux

Which package do I have to install to get ppower working?

Thank you in advance.

Offline

Board footer

Powered by FluxBB