You are not logged in.

#451 2013-03-27 13:06:07

mityukov
Member
Registered: 2010-10-10
Posts: 66

Re: 3x+ battery life

taylorchu wrote:

3. how do you suspend in detail?

There's an option in KDE's Power management configuration: When the lid closed: < Suspend mode |V>

Offline

#452 2013-03-27 22:54:41

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

Re: 3x+ battery life

@mityukov
does this always happen?
if yes:
    this is likely a bug in linux kernel. (likely to be "driver" related) please tell me the driver (wifi and pci) you are using.
if no:
    this is likely a bug in networkmanager. (likely to be "race condition" related). the program is not written in suspend-aware way.

(why it is not likely to be a bug for powerdown? powerdown just triggers kernel suspend-to-mem with lock.)
you can test this with "sudo suspend-to-mem".


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

Offline

#453 2013-03-28 04:25:15

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: 3x+ battery life

I have not installed this, but was looking over the sources.  I noticed in the Makefile that powerdown.rules is in /etc/udev/rules.d.  Since this is the default rules file being installed by you (upstream), shouldn't it go in /usr/lib/udev/rules.d?  That way, it can be overridden by /etc/udev/rules.d while any updates do not overwrite it?

Offline

#454 2013-03-28 10:47:14

mityukov
Member
Registered: 2010-10-10
Posts: 66

Re: 3x+ battery life

does this always happen?

I thought it did. But now I'm trying to reproduce, and it's working Ok.

Probably, because in "real life", I always resume at another location, with different wifi networks available (I only suspend the book when I'm on my way from one place to another).

Resuming at the same place where it was suspended looks to work without problems.

this is likely a bug in networkmanager. (likely to be "race condition" related). the program is not written in suspend-aware way.

Could you send any reference on where to read about this issue in more detail?


(why it is not likely to be a bug for powerdown? powerdown just triggers kernel suspend-to-mem with lock.)
you can test this with "sudo suspend-to-mem".

Wow, it seems that "sudo suspend-to-mem" command works faster (then KDE's suspend) and there are no weird screen blinking when resuming. Do you know how can I teach KDE to use this command instead of {whatever it uses}?

Offline

#455 2013-03-28 11:49:52

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

Re: 3x+ battery life

WonderWoofy wrote:

I have not installed this, but was looking over the sources.  I noticed in the Makefile that powerdown.rules is in /etc/udev/rules.d.  Since this is the default rules file being installed by you (upstream), shouldn't it go in /usr/lib/udev/rules.d?  That way, it can be overridden by /etc/udev/rules.d while any updates do not overwrite it?

That is correct.


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

#456 2013-03-28 23:39:52

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

Re: 3x+ battery life

that might because i thought it might have less interference when i first test powerdown with udev.
now it is ready, and the rule is moved to the right place. cheers.


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

Offline

#457 2013-04-02 17:04:49

adam777
Member
Registered: 2012-05-28
Posts: 158

Re: 3x+ battery life

Hi taylorchu,
Can you please clarify the latest change in Powerdown, both in the aspect of removing the pkgbuild from the git repo and in the aspect of changing the AUR package (currently reads as "powerdown +%Y%m%d%H%M-1").
So far, whenever an interesting update was applied to the git, I simply upgraded the AUR package for getting the latest version.
Thanks.

* EDIT *
And now package is completely gone from AUR.
Should I switch to powerdown-git?

Last edited by adam777 (2013-04-03 13:35:40)

Offline

#458 2013-04-03 17:13:04

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

Re: 3x+ battery life

@adam777
yes. all my git packages are renamed to *-git. I have made a program to dump github PKGBUILD automatically.
makepkg 4.1 is a mess now...


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

Offline

#459 2013-04-03 19:09:51

adam777
Member
Registered: 2012-05-28
Posts: 158

Re: 3x+ battery life

Thanks, taylorchu, but I'm still having some issues.
Currently, the AUR package of "powerdown-git" is listed as version "2013040221-1".
However, whenever I update the package I end up with version "20130403-1".
My update monitor isn't happy about it and keeps popping up update notification.
Adam.

PS.
Update is done using this very simple script, which works perfectly for all my other AUR packages.

#!/bin/sh
for ARG in "$@"
do
  wget https://aur.archlinux.org/packages/${ARG:0:2}/$ARG/$ARG.tar.gz
  tar zxvf $ARG.tar.gz
  cd $ARG
  makepkg -si
  cd ..
  rm -rf $ARG
  rm -f $ARG.tar.gz
done

Offline

#460 2013-04-04 18:08:01

grine
Member
Registered: 2010-02-09
Posts: 38

Re: 3x+ battery life

So, is it really necessary to conflict with pm-utils? It means I can't have xfce4 installed on my computer along with powerdown.

Also, what's the best way to set powerdown to always be in low power mode, I don't want to switch when I connect the AC-adapter.

Thanks!

Offline

#461 2013-04-04 23:22:23

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

Re: 3x+ battery life

@grine
1. powerdown contains "every" possible way you can save energy in linux. it provides pm-utils, so after you install xfce4, you can replace pm-utils with powerdown.
2. always? you can just run "powerdown", or modify the udev hook to run powerdown even if you dont connect to ac.
3. you dont config powerdown. it has the optimal and reasonable values. when you are already in powerdown mode, your system has the maximum power-saving available.


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

Offline

#462 2013-04-05 07:11:48

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

Re: 3x+ battery life

taylorchu wrote:

@grine
3. you dont config powerdown. it has the optimal and reasonable values. when you are already in powerdown mode, your system has the maximum power-saving available.

This definitely is the wrong attitude. Definitely.
Everyone will want to tweak his/her setup based on his/her computer and his/her preferences. For example I do want to disable the webcam module when on powersave mode but not the SD module, as I use it very often and it makes little differences.

Another example is SSD drives. All the HD tweaks are utterly useless on an SSD, and just reduce system responsiveness and/or increase system load and/or increase SSD wear.

Or someone may be wanting to use conservative instead of powersave or ondemand because he tweaked the values and found better powersave/responsiveness ratio in that setup.

So you DO WANT to config powerdown to your likings. Nothing and nobody's perfect, there is no perfect system. This is Apple-like thinking.


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

#463 2013-04-05 08:15:49

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

Re: 3x+ battery life

@OdinEidolon: but YOU can tweak these settings: go to /usr/bin/powerdown and tweak it the way you like. Obviously he can't provide an interface to tweak all the values, because normal users wouldn't know how to tweak. So he uses SANE default values.
It is not Apple-like thinking. It is "not-everyone-is-a-pro-thinking".

Last edited by nierro (2013-04-05 08:16:01)

Online

#464 2013-04-05 08:26:32

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

Re: 3x+ battery life

nierro wrote:

@OdinEidolon: but YOU can tweak these settings: go to /usr/bin/powerdown and tweak it the way you like. Obviously he can't provide an interface to tweak all the values, because normal users wouldn't know how to tweak. So he uses SANE default values.
It is not Apple-like thinking. It is "not-everyone-is-a-pro-thinking".

He said that powerdown doesn't have to be configured. He said the standard settings offer the "maximum power-saving available".

This is simply not true at all. As I said, for example, for SSD users the HD settings are simply bad.

He refused to admit configuration may lead to better result and refused to suggest how to config the script.

We use Archlinux, an Archlinux user should know how to tweak a basic file like that, or at least he should be able to learn to do so, if there is a proper documentation.
But if the mantainer of the software says the software is already perfect as it is, instead of providing proper documentation or at least advice (yes I know of the wiki page), then it is Apple-like behaviour. ("it's magic, it works best as it is, leave it alone doing it's magic")


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

#465 2013-04-05 09:08:37

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

Re: 3x+ battery life

i really dont think users would want to open up a config files and decide what the value will be. they are comfortable to do so if they read a lot documentation. given that it is still time consuming.
if you see some bad behavior or unwanted behavior, do not edit powerdown yourself. because if you report them to me, i will improve powerdown and all users can benefit from it. in long run, powerdown's default value will improve and less people will need to change it.


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

Offline

#466 2013-04-05 09:10:42

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

Re: 3x+ battery life

Ok, now i understand what did you mean.
Btw, an arch user, as you defined him, should know how to tweak a bash script. He should also know how to find right documentation online (and about power management there are plenty of it).
EDIT : i know read taylorchu response, and i agree with him

Last edited by nierro (2013-04-05 09:11:03)

Online

#467 2013-04-05 10:22:00

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

Re: 3x+ battery life

taylorchu wrote:

i really dont think users would want to open up a config files and decide what the value will be. they are comfortable to do so if they read a lot documentation. given that it is still time consuming.
if you see some bad behavior or unwanted behavior, do not edit powerdown yourself. because if you report them to me, i will improve powerdown and all users can benefit from it. in long run, powerdown's default value will improve and less people will need to change it.

taylorchu, the software is very good, but if you don't implement some automatic hardware recognition method and/or a simple editable config file (like LMT, which has simple config scripts, well documented, even though they are somehow cluttered) you will never be able to offer a program which, out of the box, provides the perfect setup for anyone.

IMHO writing down a simple config file with explanations for what every setting does is pretty fast to do.

The SSD example is good: right now, powerdown standard setup is bad for SSDs because it offers no improvement and reduces system responsiveness by a small margin. In case you use an SSD there are other tricks to be used to maximize performance, but I'm afraid there's nothing you can do to decrease power consumption of an SSD, AFAIK.


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

#468 2013-04-05 15:00:51

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 664

Re: 3x+ battery life

adam777 wrote:

Thanks, taylorchu, but I'm still having some issues.
Currently, the AUR package of "powerdown-git" is listed as version "2013040221-1".
However, whenever I update the package I end up with version "20130403-1".
My update monitor isn't happy about it and keeps popping up update notification.
Adam.

makepkg bumps pkgver automatically, but provides a switch to avoid that if wanted: '--holdver'.

So if wanting to retain the pkgbuild's pkgver as the installed version, you could change 'makepkg -si' to 'makepkg -si --holdver', in your aur-install/update shell-function/script.

Edit: Btw, I optimized your script a tiny little bit(and which is what I've used for along time):

aurget() {
	for pkg in "$@"; do
		curl -sf "https://aur.archlinux.org/packages/${pkg:0:2}/$pkg/$pkg.tar.gz" | tar xzC /tmp
		(cd /tmp/$pkg && makepkg -si)
		rm -rf /tmp/$pkg
	done
}

Last edited by mhertz (2013-04-05 15:33:41)

Offline

#469 2013-04-05 19:47:49

JoKo
Member
Registered: 2010-04-09
Posts: 37

Re: 3x+ battery life

OdinEidolon wrote:

The SSD example is good: right now, powerdown standard setup is bad for SSDs because it offers no improvement and reduces system responsiveness by a small margin. In case you use an SSD there are other tricks to be used to maximize performance, but I'm afraid there's nothing you can do to decrease power consumption of an SSD, AFAIK.

Could you post what needs to be changed in the powerdown script to handle better SSD's and what else can be done?

Offline

#470 2013-04-06 09:28:09

adam777
Member
Registered: 2012-05-28
Posts: 158

Re: 3x+ battery life

mhertz wrote:
adam777 wrote:

Thanks, taylorchu, but I'm still having some issues.
Currently, the AUR package of "powerdown-git" is listed as version "2013040221-1".
However, whenever I update the package I end up with version "20130403-1".
My update monitor isn't happy about it and keeps popping up update notification.
Adam.

makepkg bumps pkgver automatically, but provides a switch to avoid that if wanted: '--holdver'.

So if wanting to retain the pkgbuild's pkgver as the installed version, you could change 'makepkg -si' to 'makepkg -si --holdver', in your aur-install/update shell-function/script.

Edit: Btw, I optimized your script a tiny little bit(and which is what I've used for along time):

aurget() {
	for pkg in "$@"; do
		curl -sf "https://aur.archlinux.org/packages/${pkg:0:2}/$pkg/$pkg.tar.gz" | tar xzC /tmp
		(cd /tmp/$pkg && makepkg -si)
		rm -rf /tmp/$pkg
	done
}

Thanks for the suggestions, but "holdver" wasn't helpful.
Now I get version "113.cb70a5c-1" when using makepkg, with or without "--holdver".

Offline

#471 2013-04-06 10:27:37

Earnestly
Member
Registered: 2011-08-18
Posts: 798

Re: 3x+ battery life

Please add $EDITOR * or vim -p * to that aur script. It is very easy for someone to add $(rm -rf ~/) to any of the install scripts and PKGBUILDs.

PS: (It may also be inadvisable to build in /tmp (which is a tmpfs on Arch) unless you have quite a large chunk of memory available (and remount the tmpfs to use more than 50% of it))

Last edited by Earnestly (2013-04-06 10:30:14)

Offline

#472 2013-04-06 13:13:00

mhertz
Member
From: Denmark
Registered: 2010-06-19
Posts: 664

Re: 3x+ battery life

@adam777

Oh, sorry, then smile

@Kaustic

Hmm,  yeah I see your point, allthough tmpfs is "swap backed" and that pkgbuilds are run by fakeroot if not using --asroot; of course the install-script could be an issue, as you stated...

Offline

#473 2013-04-07 09:17:54

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

Re: 3x+ battery life

JoKo wrote:
OdinEidolon wrote:

The SSD example is good: right now, powerdown standard setup is bad for SSDs because it offers no improvement and reduces system responsiveness by a small margin. In case you use an SSD there are other tricks to be used to maximize performance, but I'm afraid there's nothing you can do to decrease power consumption of an SSD, AFAIK.

Could you post what needs to be changed in the powerdown script to handle better SSD's and what else can be done?

I fear nothing can be done to improve power usage on SSDs, they already use very little power.
I just comment the "disk" lines in powerdown, I keep only the link_power_management_policy one.
I was also thinking of commenting the lines regarding kernel writeback, right now I use
5 - 60 - 5 - 6000  -  6000
instead of the powerdown default
5 - 90 - 1 - 60000 - 60000

just because starting us an SSD is not power consuming as doing so with an HDD. There are some tricks to be used with SSDs (see wiki pages), but none of them AFAIK is something you want to activate on battery and deactivate on AC, or viceversa, so nothing that should be handled via powerdown.


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

#474 2013-04-08 09:16:36

adam777
Member
Registered: 2012-05-28
Posts: 158

Re: 3x+ battery life

Latest update to the aur package solved the versioning issue for me.
Installing the package now result in the same version as the AUR states.
Thanks, taylorchu, hopefully it won't get messed up again on next update smile

Offline

#475 2013-04-11 21:30:09

adam777
Member
Registered: 2012-05-28
Posts: 158

Re: 3x+ battery life

Well, it did.
Now AUR lists version 113.cb70a5c-1, update yields version 116.86cecb3-1 hmm

Last edited by adam777 (2013-04-11 21:31:54)

Offline

Board footer

Powered by FluxBB