You are not logged in.

#176 2012-07-15 16:10:03

uastasi
Member
From: Salento - Italy
Registered: 2007-11-27
Posts: 247

Re: 3x+ battery life

I've setup KDE's powerdevil in order to load powerup on AC and powerdown on Battery. But there's one thing missing: how to make KDE run /usr/bin/suspend-to-mem instead of pm-hibernate ?


Till the last battle, till the last bottle.
aur - twitter

Offline

#177 2012-07-16 15:20:12

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

Re: 3x+ battery life

@everyone
a very exciting news: powerdown now "replaces pm-utils"
as a new kde user, I am really happy that "suspend to mem" just works. If you plug or unplug ac, you are running powerdown and powerup automatically.
(and you save 0.23 mb of disk space from redhat tongue)

I also add a new experimental functionality to "use only 1 core in battery mode"; of course you get all cores if you plug ac back on.
Cheers!


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

Offline

#178 2012-07-16 15:43:51

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: 3x+ battery life

If you want to implement a suspend to disk, then echo "disk" to /sys/power/state, instead of "mem".

As per the wiki, people may need to add the resume module, and set the resume parameter in in their boot system. It might be worth adding that to the install instructions (I haven't upgraded yet, so apologies if you have). I know that's the pm-utils page, but I needed to do that and I don't use pm-utils, I use the echo method.


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#179 2012-07-16 16:14:24

hesse
Member
Registered: 2011-12-08
Posts: 88

Re: 3x+ battery life

What exactly do you mean by "replaces pm-utils"? Is it going to be put in [Extra]? Sounds good anyway.

Offline

#180 2012-07-16 16:55:34

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

Re: 3x+ battery life

sounds nice big_smile can I resume form hibernation without a initramfs HOOK? I dont have initramfs

Offline

#181 2012-07-16 18:56:39

nc
Member
From: Braga, Portugal
Registered: 2009-04-08
Posts: 20

Re: 3x+ battery life

Removed lmt today and started to use these scripts with pm-utils and upower. Thanks a lot smile
Btw, anyone knows why i only get ~2h with nouveau and 3h+ with nvidia?

Offline

#182 2012-07-17 03:52:13

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

Re: 3x+ battery life

@skanky,
hibernate might be harder than suspend for some users. It needs additional disk setup. Like me, I forgot to setup swap partition.... But yeah, it is really easy to do.

@el mariachi
right now it only supports suspend-to-mem. But it requires no setup.

@hesse
If you build one, you will see what i mean.

@nc
did you enable pcie_aspm in grub, syslinux? It gives you 1 more hours.


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

Offline

#183 2012-07-17 08:54:42

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: 3x+ battery life

taylorchu wrote:

@skanky,
hibernate might be harder than suspend for some users. It needs additional disk setup. Like me, I forgot to setup swap partition.... But yeah, it is really easy to do.

Fair enough, that makes sense. smile


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#184 2012-07-17 10:08:10

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

Re: 3x+ battery life

supposedly one can use a swap file, although I've never been successful with it

Offline

#185 2012-07-17 13:33:49

nc
Member
From: Braga, Portugal
Registered: 2009-04-08
Posts: 20

Re: 3x+ battery life

taylorchu wrote:

@nc
did you enable pcie_aspm in grub, syslinux? It gives you 1 more hours.

Ye it's enabled with both nouveau and nvidia. I guess i'll continue with nvidia for now smile

Last edited by nc (2012-07-17 13:33:59)

Offline

#186 2012-07-17 13:56:29

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,223
Website

Re: 3x+ battery life

taylorchu wrote:

did you enable pcie_aspm in grub, syslinux? It gives you 1 more hours.

Just checking - I thought this measure wasn't needed anymore since the patches for the infamous power regression made it into the kernel since v3.3?

Offline

#187 2012-07-18 05:50:23

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

Re: 3x+ battery life

@everyone

so hibernate has arrived!

Why is this better than all the rest of alternatives? easy to set up. It does not require any partition; no compilation; no need to mess around with tuxonice kernel.
It just works.

HOWTO:
1. after installing the latest powerdown, you need to run "suspend-to-disk". in the first time, it might take about 1-2 minutes to setup. just let it run.
2. in the end of setup, you will need to paste a line to your boot menu configuration like syslinux or grub. And you will also need to add "resume" hook to mkinitcpio.conf and regenerate the image.

3. bookmark this post in your browser, so you can come back later. reboot


You now have a hibernate-enabled archlinux. good job.
try "suspend-to-disk" to test it in the first round. for kde user, you just select the hibernate in "start>leave>hibernate"

if you love this, help me create a page about powerdown in the Archwiki. Spread the love of powerdown!


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

Offline

#188 2012-07-19 13:26:23

ne
Member
Registered: 2012-03-25
Posts: 15

Re: 3x+ battery life

Why conflict with pm-utils?

Offline

#189 2012-07-19 15:04:18

Patatuelas
Member
Registered: 2012-05-30
Posts: 14

Re: 3x+ battery life

I have powerdown now. When I installed it was in conflict with pm-utils, so I uninstall pm-utils. I'm charging the HP Pavilion's battery now, when I test it I will report my results here.

Thank you for your work, I hope it will be good for me.

Last edited by Patatuelas (2012-07-19 15:05:08)


English is not my primary language, so I'm sorry for possible mistakes.

Offline

#190 2012-07-21 00:38:08

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

Re: 3x+ battery life

@ne
it provides what pm-utils does.
And I have no idea how to let kde run "suspend-to-mem" without replacing pm-utils.
In my case, I have asus laptop, only powerdown can let me shutdown, suspend without problem.


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

Offline

#191 2012-07-21 04:31:03

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

Re: 3x+ battery life

taylorchu wrote:

<snip>
In my case, I have asus laptop, only powerdown can let me shutdown, suspend without problem.

Have you tried the

reboot=pci

option in grub? I was having the same issues as you for shutting down and your script did improve it, but have not update to you recent changes. But removing your script with the option above solved all reboot and shutdown issues for me. Might be worth a shot.

Last edited by vwyodajl (2012-07-21 04:31:35)

Offline

#192 2012-07-26 18:01:06

niklaas
Member
From: Vienna
Registered: 2012-07-24
Posts: 26

Re: 3x+ battery life

taylorchu, thanks for your script; I'm now using it as well. Unfortunately, I get the following errors:

1 niklaas@len-t420 ~ % sudo powerdown --help
Password: 
[powerdown] cannot write 0 to /sys/devices/system/cpu/cpu1/online
[powerdown] cannot write 0 to /sys/devices/system/cpu/cpu2/online
[powerdown] cannot write 0 to /sys/devices/system/cpu/cpu3/online
[powerdown] cannot write 1 to /sys/module/i915/parameters/i915_enable_rc6

I also just installed the suspend-to-disk feature. I'm going to test the script and would like to help you with setting up a archwiki page.

Offline

#193 2012-07-27 16:55:07

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

Re: 3x+ battery life

@niklaas
1. powerdown has no --help option
2.

[powerdown] cannot write 0 to /sys/devices/system/cpu/cpu1/online

This results from kernel option. Basically it means that you already have turn off cpu and you cannot turn it off again.
3.

/sys/module/i915/parameters/i915_enable_rc6

You dont have rc6 support for your hardware.


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

Offline

#194 2012-07-28 06:38:52

niklaas
Member
From: Vienna
Registered: 2012-07-24
Posts: 26

Re: 3x+ battery life

taylorchu wrote:

@niklaas
1. powerdown has no --help option

Well, yes, I was just trying things... smile

2.

[powerdown] cannot write 0 to /sys/devices/system/cpu/cpu1/online

This results from kernel option. Basically it means that you already have turn off cpu and you cannot turn it off again.

OK.

3.

/sys/module/i915/parameters/i915_enable_rc6

You dont have rc6 support for your hardware.

I wouldn't be sure about that:

niklaas@len-t420 ~ % grep name /proc/cpuinfo
model name	: Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz
model name	: Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz
model name	: Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz
model name	: Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz

As you can see, it's a Sandy Bridge CPU -- and should support rc6?

I also set the flag in /boot/grub/menu.lst and as I can see there's no error prompted at boot.

Could it be that I missed some configuration? Additionally, with your script I just get round about 6 hours of battery life. (It's a Thinkpad T420 with a 9 cell battery.) Could it be that some daemons are necessary to be loaded to successfully use your script?

Something more off-topic: When I initially installed Arch I could accomplished a battery life of about 9 hours. Just with configuring bumblebee and setting the tweaks of http://www.phoronix.com/scan.php?page=a … ower&num=1 . I think I messed something up with my bumblebee installation: Since the last kernel update, I get a longer battery life if I deactivate the discrete graphics card in BIOS; but actually there shouldn't be a difference when using bumblebee, should there?

Offline

#195 2012-08-05 18:57:28

Zucca
Member
From: KUUSANKOSKI, Finland
Registered: 2009-02-26
Posts: 135

Re: 3x+ battery life

So I finally got this thing installed.
And... It's awesome (like my WM ;P), but also my CPU runs so cool that I believe that my laptop turned the CPU fan completely off. And it stays off while doing something not-so-heavy work, like surfing the web.

Thanks for this great utility.

Last edited by Zucca (2012-08-05 19:37:13)


K.i.s.s. <3

Offline

#196 2012-08-09 01:59:57

domac
Member
Registered: 2012-08-06
Posts: 102

Re: 3x+ battery life

This barely works for me! sad Anyone else with Asus (u53jc) experience the same? sad
I'd like to reach the 10h again on 100%. Idk maybe I didn't turned the nvidia properly off…
At least powerdown stops my pc heating up! smile

Edit: Best stats I've reached so far was 10.2W with screen dimmed at total and chromium closed. (no use of powerdown)

Edit2: I copied some of powerdown's information and will release (like Unia, thx btw!) a pm-utils alternative… a "cluster" of scripts for /etc/pm/power.d/ smile My stats so far for now are: 8-11W. Not finished tweaking yet! smile

@taylorchu: Feel free to look at my scripts, got also influenced by you. smile
tZjJteg

Last edited by domac (2012-08-11 21:48:03)


domac [ git ]

Offline

#197 2012-08-17 12:06:13

pogeymanz
Member
Registered: 2008-03-11
Posts: 1,020

Re: 3x+ battery life

Hi all. I'm quite excited about using this script as it allows me to dump two daemons (LMT, acpid), but I'm having an issue that is very strange to me.

The part of the script that changes scsi_host/host*/link_power_management_policy only changes host0's policy when I unplug my laptop. If I actually execute the script from the command line, it correctly changes all of them.

Has anybody else had this?

I also went ahead and unfolded to for-loop so that I just list all five of my scsi hosts and it still doesn't work.

opt /sys/class/scsi_host/host0/link_power_management_policy min_power 
opt /sys/class/scsi_host/host1/link_power_management_policy min_power 
opt /sys/class/scsi_host/host2/link_power_management_policy min_power 
opt /sys/class/scsi_host/host3/link_power_management_policy min_power 
opt /sys/class/scsi_host/host4/link_power_management_policy min_power 

Offline

#198 2012-08-25 09:29:52

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,223
Website

Re: 3x+ battery life

Wiki page created: https://wiki.archlinux.org/index.php/Powerdown

It is rough around the edges: I have only yesterday installed it and wanted to know how to use it. I had to browse through all the pages of the thread to get some information, but now you can just visit the wiki and read through the most important information. Treat it as a starting point and add sections (f.e. about all the different scripts, or about suspending to mem/disk).

It might be useful to add the link to the wiki in the startpost.

Last edited by zenlord (2012-08-25 09:30:38)

Offline

#199 2012-08-25 11:34:14

webspider
Member
Registered: 2012-07-19
Posts: 27

Re: 3x+ battery life

Thank you very much, I've expanded the wiki entry a little bit more now that I know more about powerdown.

Offline

#200 2012-08-25 15:28:31

Lockheed
Member
Registered: 2010-03-16
Posts: 1,527

Re: 3x+ battery life

1. All those i915-related options, including grub line and script settings - they work only on laptops with i915 chipset, right? If so, then why not mention it somethere? Even Powerdown Wiki does not say anything about it.

2. Does this work if power cable was un/plugged while the laptop was off/suspended/hibernated?

if grep -Fxq "0" /sys/class/power_supply/AC0/online; then
    powerdown
else
    powerup
fi

EDIT: In fact, running it through rc.local doesn't work at all. Unplugging power does not make it run.

3. I already removed pm-utils and lmt but when I unplug power, there is something else dimming my screen. What can it be? I know it's not powerdown because dim is much lighter

4. Does this hibernation method provide compression, or is the image size as big as RAM usage?

Last edited by Lockheed (2012-08-25 17:44:07)

Offline

Board footer

Powered by FluxBB