SEARCH

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

You are not logged in.

#26 2011-04-04 08:32:30

hardran3
#! Junkie
From: forest town, lake land
Registered: 2011-02-26
Posts: 360

Re: Laptop power saving script for #! & Debian

Offline

Help fund CrunchBang, donate to the project!

#27 2011-04-04 12:29:46

brickuz
Member
From: Sweden
Registered: 2011-03-23
Posts: 40

Re: Laptop power saving script for #! & Debian

Offline

#28 2011-05-16 22:55:12

crunchfoxi
New Member
Registered: 2011-05-16
Posts: 1

Re: Laptop power saving script for #! & Debian

Offline

#29 2011-05-17 00:12:08

bozhkov
#! Junkie
Registered: 2009-12-29
Posts: 464

Re: Laptop power saving script for #! & Debian

Hm, simply adding this script and commenting out the webcam part reduced my battery life from 2,30 hours to 2 :S I have a Satellite L650D laptop with Ati Graphics and the stock debian kernel.

Offline

#30 2011-05-17 02:03:26

philthy
Member
Registered: 2009-10-21
Posts: 22

Re: Laptop power saving script for #! & Debian

I just created this script and made it executable. After restarting I went to go check the log in /var/log but there is no file in there called pm-powersave.log.

I don't know if I'm doing this correctly. I started by going to /etc/pm/power.d and doing touch powersave. I then copied and pasted the script into that file by doing sudo gedit powersave. Once that was saved I did sudo chmod +x powersave. Is there something I'm doing wrong?

Offline

#31 2011-05-18 17:35:32

hardran3
#! Junkie
From: forest town, lake land
Registered: 2011-02-26
Posts: 360

Re: Laptop power saving script for #! & Debian

Offline

#32 2011-05-18 23:42:18

philthy
Member
Registered: 2009-10-21
Posts: 22

Re: Laptop power saving script for #! & Debian

I'm very new to this. How would I be able to run the powersave script in terminal? Would like just have to go to that directory and do a 'sudo powersave'?

Offline

#33 2011-05-19 19:22:33

hardran3
#! Junkie
From: forest town, lake land
Registered: 2011-02-26
Posts: 360

Re: Laptop power saving script for #! & Debian

sudo /etc/pm/power.d/powersave

Last edited by hardran3 (2011-05-19 19:30:54)

Offline

#34 2011-05-20 23:32:54

philthy
Member
Registered: 2009-10-21
Posts: 22

Re: Laptop power saving script for #! & Debian

sudo /etc/pm/power.d/powersave

Offline

#35 2011-05-21 04:22:49

hardran3
#! Junkie
From: forest town, lake land
Registered: 2011-02-26
Posts: 360

Re: Laptop power saving script for #! & Debian

sudo pm-powersave false

Offline

#36 2011-05-21 17:12:01

philthy
Member
Registered: 2009-10-21
Posts: 22

Re: Laptop power saving script for #! & Debian

After doing sudo pm-powersave false and checking the log file.

/usr/lib/pm-utils/power.d/anacron false:success.
/etc/pm/power.d/powersave false:/etc/pm/power.d/powersave: 66: cannot create /sys/class/scsi_host/host*/link_power_management_policy: Directory nonexistent
/etc/pm/power.d/powersave: 66: cannot create /sys/bus/pci/devices/*/power/control: Directory nonexistent
/etc/pm/power.d/powersave: 66: cannot create /sys/bus/spi/devices/*/power/control: Directory nonexistent
/etc/pm/power.d/powersave: 66: cannot create /sys/bus/i2c/devices/*/power/control: Directory nonexistent
success.
/usr/lib/pm-utils/power.d/sched-powersave false:**sched policy powersave OFF
success.

After doing sudo pm-powersave true and checking the log file.

/usr/lib/pm-utils/power.d/anacron false:success.
/etc/pm/power.d/powersave false:/etc/pm/power.d/powersave: 66: cannot create /sys/class/scsi_host/host*/link_power_management_policy: Directory nonexistent
/etc/pm/power.d/powersave: 66: cannot create /sys/bus/pci/devices/*/power/control: Directory nonexistent
/etc/pm/power.d/powersave: 66: cannot create /sys/bus/spi/devices/*/power/control: Directory nonexistent
/etc/pm/power.d/powersave: 66: cannot create /sys/bus/i2c/devices/*/power/control: Directory nonexistent
success.
/usr/lib/pm-utils/power.d/sched-powersave false:**sched policy powersave OFF
success.
/usr/lib/pm-utils/power.d/anacron true:success.
/etc/pm/power.d/powersave true:/etc/pm/power.d/powersave: 66: cannot create /sys/class/scsi_host/host*/link_power_management_policy: Directory nonexistent
/etc/pm/power.d/powersave: 66: cannot create /sys/bus/pci/devices/*/power/control: Directory nonexistent
/etc/pm/power.d/powersave: 66: cannot create /sys/bus/spi/devices/*/power/control: Directory nonexistent
/etc/pm/power.d/powersave: 66: cannot create /sys/bus/i2c/devices/*/power/control: Directory nonexistent
success.
/usr/lib/pm-utils/power.d/sched-powersave true:**sched policy powersave ON
success.

Here's the output after doing ls /etc/pm/power.d

powersave

That is the script I copied from here and made executable by doing a chmod +x.

Offline

#37 2011-05-21 18:25:27

hardran3
#! Junkie
From: forest town, lake land
Registered: 2011-02-26
Posts: 360

Re: Laptop power saving script for #! & Debian

/etc/pm/power.d/powersave true:/etc/pm/power.d/powersave: 66: cannot create /sys/class/scsi_host/host*/link_power_management_policy: Directory nonexistent

Offline

#38 2011-05-22 16:33:33

albacore
Member
Registered: 2011-05-22
Posts: 12

Re: Laptop power saving script for #! & Debian

Nice script, this worked well for me with some tweaking.  Just posting to show an example of how one might modify depending on your hardware.  This was new to me, as I didn't realize before that all of these settings were in text files. 

Most of them worked for me but screen brightness wasn't changing.  On my eeepc I just had to locate the file that controlled the screen brightness as it was in a different place:

root@crunchbang:/# find /sys -iname brightness
/sys/devices/platform/eeepc/backlight/eeepc/brightness

Then in the script change the lines:

echo 5 > /sys/devices/virtual/backlight/acpi_video0/brightness
echo 10 > /sys/devices/virtual/backlight/acpi_video0/brightness

with

echo 5 > /sys/devices/platform/eeepc/backlight/eeepc/brightness
echo 10 > /sys/devices/platform/eeepc/backlight/eeepc/brightness

Offline

#39 2011-05-22 17:00:40

hardran3
#! Junkie
From: forest town, lake land
Registered: 2011-02-26
Posts: 360

Re: Laptop power saving script for #! & Debian

Thanks albacore, nice info for eee owners.

Offline

#40 2011-05-22 21:21:50

fox
#! Junkie
From: Peterborough, Ontario, Canada
Registered: 2009-05-10
Posts: 362

Re: Laptop power saving script for #! & Debian

I had previously tried hardran3's script on my Acer CULV, but didn't see any obvious battery savings.  However, I had previously placed another script there that was similar, but specific to Acer (and possibly Acer CULV's).  When I searched /etc/pm/power.d, I found both scripts there.  When I removed hardran3's, and substituted gnome-power-manager for xfce4-power-manager, I noticed better battery performance immediately.  The two scripts have a lot of similar elements, but I thought it best to stick with the one related to Acer, and it had some reference to gnome-power-manager in the instructions.  The point of my message is NOT that hardran3's script doesn't work, but rather if it doesn't, look for conflicting software or scripts either installed by default or by you.

I'm really glad I have this sorted out, as I couldn't understand why CrunchBang was so battery-intensive relative to Ubuntu and Bodhi Linux (a lightweight distro based on Ubuntu that uses Enlightenment).  Now they're all in the same ballpark with regard to battery life. smile

Last edited by fox (2011-05-22 21:30:27)


Mac user with Linux tendencies
#!CrunchBang Waldorf & Ubuntu 13.04 on Acer 1810TZ (OCZ Vertex 2 128gb SSD)
Various linux virtual machines on a Mac mini, an iMac and a MacBook Air

Offline

#41 2011-05-28 02:13:39

hardran3
#! Junkie
From: forest town, lake land
Registered: 2011-02-26
Posts: 360

Re: Laptop power saving script for #! & Debian

@fox
Most laptops take a little tweaking, but linux power management has gotten a lot better.

fox also has a god point about other scrips, daemons etc, and my script. If you are going to use it, you should know what else is changing settings on your system, in addition to finding the right settings for your system.

Offline

#42 2011-05-28 06:44:18

danirockabilly
New Member
Registered: 2011-05-28
Posts: 1

Re: Laptop power saving script for #! & Debian

Works great on a Asus Eee 1005px. Thank you very much.

Last edited by danirockabilly (2011-05-28 06:45:07)

Offline

#43 2011-05-28 21:18:26

arsanonymus
New Member
Registered: 2011-05-28
Posts: 6

Re: Laptop power saving script for #! & Debian

For the laptop power saving script, I tried to see if it was running and get no such file or directory.

I am new to this so good chance I did something wrong, what should I check?

Offline

#44 2011-06-09 02:27:18

philthy
Member
Registered: 2009-10-21
Posts: 22

Re: Laptop power saving script for #! & Debian

sudo pm-powersave false

Offline

#45 2011-06-09 03:09:46

hardran3
#! Junkie
From: forest town, lake land
Registered: 2011-02-26
Posts: 360

Re: Laptop power saving script for #! & Debian

Offline

#46 2011-06-27 03:43:37

Macka
#! Member
From: Sydney, Australia
Registered: 2011-06-04
Posts: 61

Re: Laptop power saving script for #! & Debian

On my netbook at the moment, how do i install this script?

Offline

#47 2011-06-27 04:11:21

anonymous
The Mystery Member
From: Arch Linux Forums
Registered: 2008-11-29
Posts: 9,419

Re: Laptop power saving script for #! & Debian

Read the OP, you place the script in /etc/pm/power.d/

Offline

#48 2011-07-02 08:52:18

Milozzy
#! Die Hard
Registered: 2011-02-22
Posts: 633
Website

Re: Laptop power saving script for #! & Debian

# Disable NMI wathcdog. Suggested by powertop http://www.mjmwired.net/kernel/Documentation/nmi_watchdog.txt
        echo 0 > /proc/sys/kernel/nmi_watchdog

Offline

#49 2011-07-11 20:05:48

AndreAPL
Member
Registered: 2010-04-05
Posts: 18

Re: Laptop power saving script for #! & Debian

This is a great tip!
Got my Asus M2400N from 4h to 5h with this smile

but is used almost all from pm-source, except the ones i won't apply such as pci-ex, sata...
thanks also for the tips, for watchdog and how to get the right setup for brightness.

Offline

Help fund CrunchBang, donate to the project!

#50 2011-07-19 20:54:24

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

Re: Laptop power saving script for #! & Debian

I installed the script and it seems to resetting my display brightness every time my machine idles for a minute or two.  I tend to like my display on the lowest brightness whenever I'm using my laptop on battery power.  Is there a way to have the script not overwrite my brightness setting?

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: bleh

Debian Logo