You are not logged in.

#226 2012-09-14 06:13:06

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

Re: 3x+ battery life

@Uranium
Please show more info on the hardware. Asus motherboard?

@OdinEidolon
1. for kde users:
you are using powerdown without any need to run any script.
it works with kde builtin power management.

2. for other users:
Kde is really awesome, but if you still want to use your "hacky" desktop, you can run

sudo powerd

.
It is a polling daemon added in powerdown. It simply detects your battery, and run "powerup/powerdown" accordingly.

 sudo powerd &

to run in bg.


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

Offline

#227 2012-09-14 06:57:32

OdinEidolon
Member
From: Belluno - Italy
Registered: 2011-01-31
Posts: 377

Re: 3x+ battery life

taylorchu wrote:

@OdinEidolon
1. for kde users:
you are using powerdown without any need to run any script.
it works with kde builtin power management.

Thanks for the info.


Hardware: 2016 Dell XPS15 - FullHD - i5-6300HQ - 8GB DDR4 - Nvidia GTX960M - Samsung 840EVO 250GB SSD - 56Wh
Software: Plasma 5 - rEFInd - linux-ck - preload - prelink - verynice - psd - bumblebee

Offline

#228 2012-09-14 13:49:19

Uranium
Member
From: Belgium
Registered: 2011-12-25
Posts: 4

Re: 3x+ battery life

taylorchu wrote:

@Uranium
Please show more info on the hardware. Asus motherboard?

Motherboard =
Pegatron Corporation A25
Chipset: Intel Sandy Bridge
Southbridge: Intel HM65

CPU = Intel i3 2310M

Offline

#229 2012-09-14 16:49:37

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

Re: 3x+ battery life

Uranium, after your run powerdown, could you run

sudo turn-off

?

If it shuts down, then I can say that your bios has similar problem as Asus's.


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

Offline

#230 2012-09-14 18:32:08

Uranium
Member
From: Belgium
Registered: 2011-12-25
Posts: 4

Re: 3x+ battery life

zenlord wrote:

Welcome. Greets from Erembodegem (BE).

Thanks and hi to you zenlord! I'm from 'Sint-Truiden' (BE). smile


taylorchu wrote:

Uranium, after your run powerdown, could you run

sudo turn-off

?

If it shuts down, then I can say that your bios has similar problem as Asus's.

Thanks for the reply taylorchu.

After running

sudo turn-off

it shuts down just fine.

The parent company of Pegatron is ASUS so yeah...

What do you recommend? Keep the bus power saving disabled or is there a workaround? (I'm using Xfce if it matters.)

Last edited by Uranium (2012-09-14 18:36:52)

Offline

#231 2012-09-14 20:36:32

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

Re: 3x+ battery life

@Uranium
please update to the latest powerdown.
Use powerd "sudo powerd &".


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

Offline

#232 2012-09-15 05:36:11

Uranium
Member
From: Belgium
Registered: 2011-12-25
Posts: 4

Re: 3x+ battery life

Updated but it still won't shutdown properly.

Offline

#233 2012-09-17 10:19:27

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: 3x+ battery life

thank you for sharing this information

interesting project


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#234 2012-09-17 14:33:35

OhneHerren
Member
Registered: 2012-07-09
Posts: 32

Re: 3x+ battery life

Well this is certainly coming along. Good luck with its wider adoption in the ArchLinux community looks like a sure bet. I have a few questions about the new pm-utils replacements though.

1. Are these usb-unbind errors an issue?

[powerdown] cannot write 0000:07:00.0 to /sys/bus/pci/drivers/xhci_hcd/unbind
[powerdown] cannot write 0000:07:00.0 to /sys/bus/pci/drivers/xhci_hcd/bind

2. For that matter, is unbinding and binding usb devices necessary at all? When this happens my onboard keyboard is registered as a new device and my xmodmap settings are lost. Putting the xmodmap command to restore them at the end of the resume script doesn't seem to work, even if I run it like this (su - andrew -c "env DISPLAY=':0.0' xmodmap /home/andrew/.Xmodmap"). I imagine that's out of the scope of powerdown though. Also, what's the advantage of unbinding usb devices before powering off as opposed to the usual poweroff command?

3. The transition from pm-utils to this new business has been mostly painless, only I miss the pm-hybrid-suspend ability (the code for which can be seen at this end of this source file. Now I have to remember to suspend to disk rather than ram if I'm going to be away for more than half an hour, whereas with pm-utils hibernation happened automatically after being suspended for thirty minutes.

4. Is there any issue with running suspend-to-disk with a swap partition rather than file? I've been doing that and it seems to work fine. Just 'cause I already had a partition and didn't want to waste space on a swap file.

I'm not using powerd or anything like that just running things manually with /etc/acpid/handler.sh and Fluxbox on a Macbook Air 5,2.

~  » uname -a
Linux archbook 3.5.3-1-ARCH #1 SMP PREEMPT Sun Aug 26 09:14:51 CEST 2012 x86_64 GNU/Linux

Thanks for the scripts.

Offline

#235 2012-09-17 18:37:22

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

Re: 3x+ battery life

@Uranium
I am also using asus related laptop. it works ok, so please make sure you updated to the latest version.

@OhneHerren
1. That means it has already unbound.
2. It is a fix for asus bios. Without it, asus computer wont completely shutdown.
https://patchwork.kernel.org/patch/1173871/
our friends are doing their best to fix this; however, this patch is in 3.6.
Please wait until 3.6 hits arch core repo.

3. ok. I will do it.
4. it is just more convenient. If you dont have a partition for it, the suspend-to-disk still works. And there is no performance issue with it.


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

Offline

#236 2012-09-18 00:46:29

OhneHerren
Member
Registered: 2012-07-09
Posts: 32

Re: 3x+ battery life

taylorchu wrote:

3. ok. I will do it.

Cheers fantastic.

Offline

#237 2012-09-18 04:04:55

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

Re: 3x+ battery life

*update
1. kernel 3.6rc6 and 3.5.4 fixes asus bios bugs. All workarounds related to that are cleaned up. Got to be UP-TO-DATE.

2. suspend-hybrid is finished when you see this post. So basically, it will suspend-to-mem first. you can quickly resume your machine(because it is in mem). After 10minutes, powerdown will think you probably will not use your machine for a while. It wakes the machine up, and right after it goes to suspend-to-disk mode to save battery.

NOTE: to use this feature, you have to run "suspend-to-disk" once, and test that it actually works.


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

Offline

#238 2012-09-18 07:11:10

OdinEidolon
Member
From: Belluno - Italy
Registered: 2011-01-31
Posts: 377

Re: 3x+ battery life

taylorchu wrote:

*update
1. kernel 3.6rc6 and 3.5.4 fixes asus bios bugs. All workarounds related to that are cleaned up. Got to be UP-TO-DATE.

2. suspend-hybrid is finished when you see this post. So basically, it will suspend-to-mem first. you can quickly resume your machine(because it is in mem). After 10minutes, powerdown will think you probably will not use your machine for a while. It wakes the machine up, and right after it goes to suspend-to-disk mode to save battery.

NOTE: to use this feature, you have to run "suspend-to-disk" once, and test that it actually works.

What if I don't have a swap partition and a swap file, as I don't use suspend to disk? What will powerdown do?


Hardware: 2016 Dell XPS15 - FullHD - i5-6300HQ - 8GB DDR4 - Nvidia GTX960M - Samsung 840EVO 250GB SSD - 56Wh
Software: Plasma 5 - rEFInd - linux-ck - preload - prelink - verynice - psd - bumblebee

Offline

#239 2012-09-18 10:01:31

Unia
Member
From: The Netherlands
Registered: 2010-03-30
Posts: 2,474
Website

Re: 3x+ battery life

OdinEidolon wrote:
taylorchu wrote:

*update
1. kernel 3.6rc6 and 3.5.4 fixes asus bios bugs. All workarounds related to that are cleaned up. Got to be UP-TO-DATE.

2. suspend-hybrid is finished when you see this post. So basically, it will suspend-to-mem first. you can quickly resume your machine(because it is in mem). After 10minutes, powerdown will think you probably will not use your machine for a while. It wakes the machine up, and right after it goes to suspend-to-disk mode to save battery.

NOTE: to use this feature, you have to run "suspend-to-disk" once, and test that it actually works.

What if I don't have a swap partition and a swap file, as I don't use suspend to disk? What will powerdown do?

Check the source; it creates a swap file instead of partition.


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#240 2012-09-18 10:14:33

OdinEidolon
Member
From: Belluno - Italy
Registered: 2011-01-31
Posts: 377

Re: 3x+ battery life

Unia wrote:
OdinEidolon wrote:
taylorchu wrote:

*update
1. kernel 3.6rc6 and 3.5.4 fixes asus bios bugs. All workarounds related to that are cleaned up. Got to be UP-TO-DATE.

2. suspend-hybrid is finished when you see this post. So basically, it will suspend-to-mem first. you can quickly resume your machine(because it is in mem). After 10minutes, powerdown will think you probably will not use your machine for a while. It wakes the machine up, and right after it goes to suspend-to-disk mode to save battery.

NOTE: to use this feature, you have to run "suspend-to-disk" once, and test that it actually works.

What if I don't have a swap partition and a swap file, as I don't use suspend to disk? What will powerdown do?

Check the source; it creates a swap file instead of partition.

And what if I don't want it to do so?
The point of these scripts is to let the use control the behaviour unlike LMT for example, this seems like a unnecessary complication to me TBH.


Hardware: 2016 Dell XPS15 - FullHD - i5-6300HQ - 8GB DDR4 - Nvidia GTX960M - Samsung 840EVO 250GB SSD - 56Wh
Software: Plasma 5 - rEFInd - linux-ck - preload - prelink - verynice - psd - bumblebee

Offline

#241 2012-09-18 10:19:56

Unia
Member
From: The Netherlands
Registered: 2010-03-30
Posts: 2,474
Website

Re: 3x+ battery life

What limits you to edit the code yourself? I have done so too, see my script here: https://github.com/Unia/powersave


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#242 2012-09-18 10:27:07

OdinEidolon
Member
From: Belluno - Italy
Registered: 2011-01-31
Posts: 377

Re: 3x+ battery life

Unia wrote:

What limits you to edit the code yourself? I have done so too, see my script here: https://github.com/Unia/powersave

Yeah sure I can, just wondering if it's in the spirit of this little script to take actions and make changes without warning the user. The documentation on powerdown is very small and there is no warning upon install that such a big change is made. After all not all of us may want a swap file to be created.


Hardware: 2016 Dell XPS15 - FullHD - i5-6300HQ - 8GB DDR4 - Nvidia GTX960M - Samsung 840EVO 250GB SSD - 56Wh
Software: Plasma 5 - rEFInd - linux-ck - preload - prelink - verynice - psd - bumblebee

Offline

#243 2012-09-18 10:40:19

Unia
Member
From: The Netherlands
Registered: 2010-03-30
Posts: 2,474
Website

Re: 3x+ battery life

OdinEidolon wrote:
Unia wrote:

What limits you to edit the code yourself? I have done so too, see my script here: https://github.com/Unia/powersave

Yeah sure I can, just wondering if it's in the spirit of this little script to take actions and make changes without warning the user. The documentation on powerdown is very small and there is no warning upon install that such a big change is made. After all not all of us may want a swap file to be created.

Swap files get removed after being used, AFAIK. There's no changes made to your system.

EDIT: You're right though, Powerdown evolved from a simple script to something complicated, overtaking functions from many other applications. That's the reason I made my own script.

Last edited by Unia (2012-09-18 10:41:09)


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#244 2012-09-18 10:43:17

OdinEidolon
Member
From: Belluno - Italy
Registered: 2011-01-31
Posts: 377

Re: 3x+ battery life

Unia wrote:
OdinEidolon wrote:
Unia wrote:

What limits you to edit the code yourself? I have done so too, see my script here: https://github.com/Unia/powersave

Yeah sure I can, just wondering if it's in the spirit of this little script to take actions and make changes without warning the user. The documentation on powerdown is very small and there is no warning upon install that such a big change is made. After all not all of us may want a swap file to be created.

Swap files get removed after being used, AFAIK. There's no changes made to your system.

EDIT: You're right though, Powerdown evolved from a simple script to something complicated, overtaking functions from many other applications. That's the reason I made my own script.

For example I have a very small SSD in my system. Wonder what may happen if powerdown tries to suspend to disk when there is not enough space. Risk of losing the current work?
Maybe.
I think such an important change should not go unmentioned.


Hardware: 2016 Dell XPS15 - FullHD - i5-6300HQ - 8GB DDR4 - Nvidia GTX960M - Samsung 840EVO 250GB SSD - 56Wh
Software: Plasma 5 - rEFInd - linux-ck - preload - prelink - verynice - psd - bumblebee

Offline

#245 2012-09-18 19:18:31

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

Re: 3x+ battery life

I think powerdown allows you to the max you can do for powersaving in linux.
@unia
i adopted the udev rules. it certainly works better than powerd, which is polling all the time. it also allows powerdown to be run in a really early time. whoever comes up with that idea is brilliant!!

@everyone who concerns suspend-to-disk
it creates 2G /hiberate swapfile in the first time to run. powerdown wont remove it later. i think it is the least intrusive way to do it, as you can just remove it at anytime.

@odin
all suspend-* will do the following:

sync
drop_cache 3

sync will push all dirty stuff in mem back to disk. it also allows kernel to drop cache better.
drop_cache 3 will drop as much as possible to minimize the snapshot size to fit in the swap or mem.

Last edited by taylorchu (2012-09-18 19:34:12)


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

Offline

#246 2012-09-18 19:31:00

Unia
Member
From: The Netherlands
Registered: 2010-03-30
Posts: 2,474
Website

Re: 3x+ battery life

taylorchu wrote:

@unia
i adopted the udev rules. it certainly works better than powerd, which is polling all the time. it also allows powerdown to be run in a really early time. whoever comes up with that idea is brilliant!!

The idea was mine, the creater of the two rules is Nierro wink Feel free to use them!


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#247 2012-09-18 19:53:00

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

Re: 3x+ battery life

All credits go to Unia, he came up with that idea. I never thought about that udev rule!
@taylorchu: I'm really happy you appreciate this udev rule. And i don't know why i didn't tell you before, I should have guessed this could be important for your project. I have been following this thread for long time, but then i forgot to tell you wink

Offline

#248 2012-09-18 20:05:24

OdinEidolon
Member
From: Belluno - Italy
Registered: 2011-01-31
Posts: 377

Re: 3x+ battery life

taylorchu wrote:

@everyone who concerns suspend-to-disk
it creates 2G /hiberate swapfile in the first time to run. powerdown wont remove it later. i think it is the least intrusive way to do it, as you can just remove it at anytime.

@odin
all suspend-* will do the following:

sync
drop_cache 3

sync will push all dirty stuff in mem back to disk. it also allows kernel to drop cache better.
drop_cache 3 will drop as much as possible to minimize the snapshot size to fit in the swap or mem.

Thanks for the info, my question is this:
if the hibernate file does not exist, what will powerdown do after the PC has been sleeping for long enough? Shutdown?


Hardware: 2016 Dell XPS15 - FullHD - i5-6300HQ - 8GB DDR4 - Nvidia GTX960M - Samsung 840EVO 250GB SSD - 56Wh
Software: Plasma 5 - rEFInd - linux-ck - preload - prelink - verynice - psd - bumblebee

Offline

#249 2012-09-18 20:24:41

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

Re: 3x+ battery life

you mean hybrid mode?
It wont allow sleeping in the beginning!


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

Offline

#250 2012-09-19 02:24:29

DoctorSamulus
Member
Registered: 2010-11-04
Posts: 53

Re: 3x+ battery life

taylorchu wrote:

it creates 2G /hiberate swapfile in the first time to run. powerdown wont remove it later. i think it is the least intrusive way to do it, as you can just remove it at anytime.

Speaking of how do you remove it? I keep getting operation not permitted even as root when I try to, I wasn't aware it was going to create a 2GB file in my already tiny root partition (10GB).

Offline

Board footer

Powered by FluxBB