You are not logged in.
Edit scripts (located in /etc/powerconf) and Udev rules (/etc/udev/rules.d/powerconf.rules) to fit your needs!
Scripts are launched on udev events defined in udev rules.
During runtime, switching between power states is performed (/etc/powerconf/online, /etc/powerconf/offline).
On resume, if power state was not changed (still on battery or ac) /etc/powerconf/resume is executed to fix devices that are reset (gpu, disk in my example).
If on battery and charge is low (1% in my example) /etc/powerconf/battery is run (in my example hibernates the system).
Package in AUR: https://aur.archlinux.org/packages/powerconf
enj0y
Last edited by eruditorum (2013-02-18 14:34:20)
Offline
I guess this is a good idea, but there's already a similar project (well not equal) : https://bbs.archlinux.org/viewtopic.php?id=134109 .
I guess it would be better to extend that package, already tested by lots of users, instead of putting inside another one.
Tell me if i'm wrong, please.
By the way, thanks for sharing your project!
Offline
Post marked for deletion...
Last edited by eruditorum (2013-03-27 20:03:57)
Offline
The thing is that with most of the powersaving options it doesn't make any sense to disable them, which is why you'd only need some udev rules that permanently enable them + a script that handles lid events and brightness. If you suspend and hibernate via hotkeys and only use the lowest level of brightness, you wouldn't even need said scripts.
Last edited by webspider (2012-12-02 11:20:15)
Offline
@webspider, I have to agree with that. I used to do this stuff, making things change whether plugged in or not, until I realized that there really was no noticeable performance degredation when on battery power. From what I have read from some of the intel docs, setting the link power management to min_power potentially increases latency, but I cannot tell at all. So I just leave everything on power saving settings all the time. I guess it might be different if I had a less powerful computer, but as it is now, it is great. Also, I use the second to lowest screen brightness nearly always. The only time I turn it up is when I compute outside.
Offline
Post marked for deletion...
Last edited by eruditorum (2013-02-15 15:37:12)
Offline
Post marked for deletion...
Last edited by eruditorum (2013-02-15 15:37:28)
Offline
Post marked for deletion...
Last edited by eruditorum (2013-02-18 14:35:19)
Offline
Post marked for deletion...
Last edited by eruditorum (2013-02-18 14:35:38)
Offline
How would you enable all powersave by default? just udev rule? I've never done it before.
Offline
Yep, It works.
To set everything to powersave always:
SUBSYSTEM=="power_supply", RUN+="/etc/powerconf/offline"
I guess, you need to inspect properties of devices you want to save power with, then write the rule.
udevadm info /sys/class/* --attribute-walk
Last edited by eruditorum (2013-02-15 19:08:56)
Offline
Very nice, I'm using this from now on, really clean and simple.
Offline
UPDATE: Uploaded to AUR
Offline
I think it would be better to let the laptop suspend earlier, because 1% is a very low value, which is already unhealthy for the battery. 7% is a better value, or, if you insist, 4%.
edit: And using the cpu governor "powersave" doesn't really save power, in fact with it the cpu consumes MORE power, because it takes longer until it can sleep again.
Last edited by Army (2013-02-18 15:39:11)
Offline
I think it would be better to let the laptop suspend earlier, because 1% is a very low value, which is already unhealthy for the battery. 7% is a better value, or, if you insist, 4%.
Well, udev rule and scripts are configurable by definition, so you decide. On my system I want it to be 1%.
And using the cpu governor "powersave" doesn't really save power, in fact with it the cpu consumes MORE power, because it takes longer until it can sleep again.
Again, user decides what is better for him. I tried "ondemand" on battery, but in my case "powersave" is better (temperatures are lower).
Last edited by eruditorum (2013-02-18 16:20:54)
Offline
I really like this script, much easier to configure than powerdown!
I'm missing a few of the things from powertops warning list though, and my wifi doesn't seem to go into the correct power saving. Any tips would be great.
I'm on a Thinkpad X220 with Intel wifi.
Offline