You are not logged in.

#251 2012-09-19 07:28:28

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

Re: 3x+ battery life

taylorchu wrote:

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

mmmh, on my system without the /hibernate file I can suspend-to-ram (sleep), with the file I can also hibernate (suspend-to-disk). What if I suspend to am with no /hibernate partition?

It shuts down after a given period of time, right?


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

Offline

#252 2012-09-19 09:21:52

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

Re: 3x+ battery life

I also cannor remove /hibernate. Mybe you have to do so from chroot? Or logged out?

I also have some bad arctifacting on my laptop (see sig) when coming back from suspend-to-disk. I think I'll stick with suspend to ram since my laptop is faster at booting from zero than from suspend to disk anyway.


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

Offline

#253 2012-09-19 17:01:35

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

Re: 3x+ battery life

@odin
suspend to ram does not need  the swap file.

@everyone who used suspend-to-disk
please remove the line /hibernate ... in your /etc/fstab.
It was intended to keep the swap file persistent. However, I decided to turn on/off swapfile only "when you are using suspend-to-disk feature".
To remove your swap file: "sudo rm /hibernate"


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

Offline

#254 2012-09-19 19:12:35

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

Re: 3x+ battery life

taylorchu wrote:

To remove your swap file: "sudo rm /hibernate"

sudo rm /hibernate
rm: cannot remove ‘/hibernate’: Operation not permitted

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

Offline

#255 2012-09-21 05:00:17

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

Re: 3x+ battery life

suspend-hybrid is broken for me on a Macbook Air 5,2. The timer seems to be working, but the laptop stays in ram suspend until I lift the lid,  at which point it resumes from ram and then begins the disk hibernation process, at which point I have to bring it out of hibernate. Thanks for working on this so fast regardless.

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

Offline

#256 2012-09-21 05:05:24

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

Re: 3x+ battery life

OdinEidolon wrote:
taylorchu wrote:

To remove your swap file: "sudo rm /hibernate"

sudo rm /hibernate
rm: cannot remove ‘/hibernate’: Operation not permitted

You have to edit /etc/fstab first and remove the hibernate  file entry. Then reboot your computer and try removing it again.

Offline

#257 2012-09-21 07:15:01

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

Re: 3x+ battery life

DoctorSamulus wrote:
OdinEidolon wrote:
taylorchu wrote:

To remove your swap file: "sudo rm /hibernate"

sudo rm /hibernate
rm: cannot remove ‘/hibernate’: Operation not permitted

You have to edit /etc/fstab first and remove the hibernate  file entry. Then reboot your computer and try removing it again.

Got it, thanks!


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

Offline

#258 2012-09-22 00:00:08

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

Re: 3x+ battery life

@everyone
good news. 3.6 will support hybrid suspend natively.

@OdinEidolon
didn't i just say that in my post?
...


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

Offline

#259 2012-09-22 01:06:14

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

Re: 3x+ battery life

As far as I can see the hybrid suspend support in 3.6 is a "suspend to both" style thing rather than a hybrid sleep where the system goes from ram-suspend to disk-hibernate after a delay. Taylorchu, is there a specific reason why the powerdown package need conflict with pm-utils save for the aliases to its functions? Other userspace suspend utilities like uswsusp can co-exist with pm-utils, perhaps powerdown could do the same?

EDIT: suspend-hybrid works fine for me after a reboot so I have no use for pm-utils. Still, perhaps the packages could still both be installed. I'm sure that some users might want to use powerdown but also need to use the video quirk flags et cetera that pm-utils provides.

Last edited by OhneHerren (2012-09-22 04:26:55)

Offline

#260 2012-09-23 23:19:10

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

Re: 3x+ battery life

Actually I'm following this thread but I'm not sure whether someone already asked for a service file for systemd? I'd write my own service file but I'm not sure about handling dependencies. (https://wiki.archlinux.org/index.php/Sy … pendencies) Any help is appreciated.

Offline

#261 2012-09-24 19:58:35

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: 3x+ battery life

I have a question that's been on the TODO for my own script for a while: cd polling. Before when using HAL, we had an option to disable its polling for CDs which would reduce battery life.

Now, with HAL being deprecated, is there any other utility polling CDs and if so, can we disable this too? Or is the whole "disable CD polling" something to forget about?

Thanks in advance!


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

#262 2012-09-24 21:08:29

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

Re: 3x+ battery life

@OhneHerren
both pm-utils and powerdown are trying to detect power source and set kernel param. It might run into a situation that they interfere and make it harder to debug.

@niklass
powerdown uses udev. it does not use rc script, so i dont think it is a problem.

@unia
I believe you can do it with udisks. but it is rather inconvenient and it saves so little power. you can run test yourself but i tried and saw no difference/


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

Offline

#263 2012-09-24 21:42:43

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: 3x+ battery life

taylorchu wrote:

@unia
I believe you can do it with udisks. but it is rather inconvenient and it saves so little power. you can run test yourself but i tried and saw no difference/

Can you elaborate on why it's inconvenient? I see it involves a UDEV rule; a quick Google search comes up with something like this (this one's for a Card Reader, but shouldn't be too hard to adjust for CD drives):

SUBSYSTEM=="block", ENV{ID_VENDOR}=="APPLE*", ENV{ID_MODEL}=="SD Card Reader*", ENV{UDISKS_DISABLE_POLLING}="1"

All it would take for someone to adapt this to their system, is changing the ID_VENDOR and ID_MODEL values. Of course, for your script this isn't an ideal solution but I can do this, because my script is only intended for my own laptop.


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

#264 2012-09-25 04:29:48

bwat47
Member
Registered: 2009-10-07
Posts: 638

Re: 3x+ battery life

taylorchu wrote:

@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.

Glad to see a fix for that asus issue may finally be coming in 3.6, been getting sick of using workarounds!

Offline

#265 2012-09-25 08:06:37

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

Re: 3x+ battery life

taylorchu wrote:

@niklass
powerdown uses udev. it does not use rc script, so i dont think it is a problem.

Yes, but I think he's referring to starting the daemon. It is possible with /etc/rc.local, but maybe a service-file is more convenient?

Offline

#266 2012-09-25 08:15:43

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

Re: 3x+ battery life

@taylorchu: if you do not want your package to conflict with pm-utils, simply provide an /etc/UPower/UPower.conf with your package, with "RunPowersaveCommand=false". And everything should work, as pm-powersave won't be executed.
@niklass: you don't need to start powerdown at bootup, because the udev rule will be executed when systemd-udev.service will start. So no need for this.
@Unia, let us know how much lifetime do you reach with that rule, it can be useful for someone. smile

Offline

#267 2012-09-26 08:17:20

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

Re: 3x+ battery life

zenlord wrote:
taylorchu wrote:

@niklass
powerdown uses udev. it does not use rc script, so i dont think it is a problem.

Yes, but I think he's referring to starting the daemon. It is possible with /etc/rc.local, but maybe a service-file is more convenient?

Yes, I am, but

nierro wrote:

@niklass: you don't need to start powerdown at bootup, because the udev rule will be executed when systemd-udev.service will start. So no need for this.

solved this. :-)

Thanks!

Offline

#268 2012-09-27 08:01:23

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

Re: 3x+ battery life

@everyone
the udev rule for "cdrom disable polling" is added. however, i need someone to test it. it seems that it only works with latest udisk.

I also run into kernel semaphore issues with udev rules on 1-2 machines. does anyone have the same problem?


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

Offline

#269 2012-09-27 09:55:20

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: 3x+ battery life

taylorchu wrote:

@everyone
the udev rule for "cdrom disable polling" is added. however, i need someone to test it. it seems that it only works with latest udisk.

I also run into kernel semaphore issues with udev rules on 1-2 machines. does anyone have the same problem?

I have added these two rules to my own Powersave and it seems to work (i.e., dmesg doesn't show any errors). Is there any other way I can check if it works?

Also, what do you mean with kernel semaphore? My system seems to run fine.


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

#270 2012-09-28 08:57:23

ph34rb0t
Member
From: GER
Registered: 2012-09-28
Posts: 14

Re: 3x+ battery life

Thank you for these scripts, they are most useful! After a few optimizations (disable wake-on-LAN, add ATI-specific options), my power consumption went down from ~23W/h to ~14W/h.

I've (certainly) got to reapply my custom tweaks after the next script update though, right?

So what about a, well, polling function for user-added scripts/elements at the beginning of the script?

Offline

#271 2012-09-28 09:09:24

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

Re: 3x+ battery life

taylorchu wrote:

@niklass
powerdown uses udev. it does not use rc script, so i dont think it is a problem.

So the info in the wiki should be updated?

The wiki says:
"To run powerdown on startup add the following to /etc/rc.local:

powerdown &"

Can I change it to:
"powerdown is automatically loaded at startup through udev"
?

Offline

#272 2012-09-28 11:21:58

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: 3x+ battery life

zenlord wrote:

Can I change it to:
"powerdown is automatically loaded at startup through udev"
?

I would say "Powerdown is automatically loaded by a udev rule" and then link them to the Wiki article on udev rules. But yes, something like that's the correct way to edit the Wiki.


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

#273 2012-09-28 11:34:05

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

Re: 3x+ battery life

Unia wrote:
zenlord wrote:

Can I change it to:
"powerdown is automatically loaded at startup through udev"
?

I would say "Powerdown is automatically loaded by a udev rule" and then link them to the Wiki article on udev rules. But yes, something like that's the correct way to edit the Wiki.

Done!

Offline

#274 2012-09-28 12:05:43

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: 3x+ battery life

zenlord wrote:
Unia wrote:
zenlord wrote:

Can I change it to:
"powerdown is automatically loaded at startup through udev"
?

I would say "Powerdown is automatically loaded by a udev rule" and then link them to the Wiki article on udev rules. But yes, something like that's the correct way to edit the Wiki.

Done!

Great! I have also taken a look at the page and updated it where necessary (esp. the table listing all the different parts of Powerdown). I've also added a link to the Udev article and Zenlord, I have edited "no rc-script blabla should be necessary" to "no rc-script blabla is necessary". I think the previous could cause confusion amongst new users. Are you OK with that?

By the way, is it appropriate if I link users to my script in the "See Also" section? I'm asking before adding this bluntly, I don't want you to think I'm using the Wiki for shameless self-promotion tongue


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

#275 2012-09-28 12:15:22

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

Re: 3x+ battery life

OK - great. Dutchies have (in general) always been better in English than Belgians :-)

Unia wrote:

By the way, is it appropriate if I link users to my script in the "See Also" section? I'm asking before adding this bluntly, I don't want you to think I'm using the Wiki for shameless self-promotion tongue

I see no problem in that. If your script is related, then it can be referenced in that section. On top of that: linux is all about choice, so if some wiki-reader prefers your script instead of powerdown, then so be it.

Offline

Board footer

Powered by FluxBB