You are not logged in.

#351 2012-11-12 12:19:34

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 915

Re: 3x+ battery life

nierro wrote:

I see you're italian.
I already had this kind of problem with a guy, so, please, read his solution (go on read from there) : http://www.archlinux.it/forum/viewtopic … 07#p130507 .
Hope you find this useful.
But don't ask me the reason why it happens smile

Thanks for your help, but it seems my problem was different, see the solution above in my edited post.


Mortuus in anima, curam gero cutis

Offline

#352 2012-11-12 12:34:22

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

Re: 3x+ battery life

Oh i see !
Sometimes I forget to check for the easiest solution smile

Offline

#353 2012-11-13 22:20:13

djipey
Member
Registered: 2011-07-30
Posts: 158

Re: 3x+ battery life

I'm pretty sure something is wrong. Ok, I agree, running "cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor" gave "performance", but my symptoms are still there. With exactly the same programs running, if I don't run powerdown/up before launching Virtualbox, it chrashes. Are there some more indicators to be sure that powerdown is started automatically ?

Maybe there is a problem with the version that I have ? I installed it directly from AUR, but now I see my version is mor up to date than the version proposed.

1 aur/powerdown 20120927-1 [installed: 20121025-1] (24)

Says yaourt.

Last edited by djipey (2012-11-13 22:21:51)

Offline

#354 2012-11-13 22:50:46

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

Re: 3x+ battery life

You can be sure if powerdown is running, by executing:

cat /proc/sys/vm/laptop_mode
cat /proc/sys/vm/dirty_ratio

They should return 5 and 90, if powerdown is running.
You have 20121025 installed, because that is the date you cloned git, compiled and installed powerdown. But the pgkbuild version is 20120927; so it doesn't matter.

Offline

#355 2012-11-14 08:31:19

djipey
Member
Registered: 2011-07-30
Posts: 158

Re: 3x+ battery life

Ok, so at boot, on AC, I have 0 and 30, without doing anything. On battery, or when I have run powerdown, I have 5 and 90, exactly what you said. when I then run powerup, I go back to 0 and 30. So ok, I think powerdown is running.

But is it normal that on AC at boot, if I don't run powerup, my hard drive doesn't spin down ? What I mean since the beginning, it's that powerup does some optimizations only when I run it manually. Can it be possible ?

Offline

#356 2012-11-14 08:53:07

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

Re: 3x+ battery life

Uhm, looking at the script, it seems powerup does not change hdparm settings. So they stick to default when you boot from ac, until you change power supply.  I guess this can be considered a bug, until taylorchu doesn't explain his choice.
To solve this, open /usr/bin/powerup and add a line with "for dev in $(awk '/^\/dev\/sd/ {print $1}' /etc/mtab); do run hdparm -B 1 -S 12 $dev; done" (the same as in powerdown). If i were you, i'd change these values to higher ones, while on ac (for example "hdparm -B 200 -S 60") because it is established that very low hdparm settings can kill your hard drive in some cases. If your hd clicked very often, even if you're using it, that it would be better to increase the default value.
Your choice, anyway wink

Offline

#357 2012-11-14 09:26:21

djipey
Member
Registered: 2011-07-30
Posts: 158

Re: 3x+ battery life

I'm going to look more deeply to the scripts when I'll have time, because something in powerdown, not inverted by powerup, is really helpfull. Thanks for the advices anyway.

Offline

#358 2012-11-15 10:25:44

djipey
Member
Registered: 2011-07-30
Posts: 158

Re: 3x+ battery life

Ok, I had a look to the scripts. Powerdown does some stuff that powerup doesn't revert:

- opt /proc/sys/kernel/nmi_watchdog 0
- opt /sys/module/pcie_aspm/parameters/policy powersave
- for i in /sys/bus/*/devices/*/power/control; do opt $i auto; done
- Some stuff on diks powersave
- Some stuff on the sound card powersave

One of these things solves a bug with virtualbox on my laptop. I guess I can eliminate the lines about the sound and the disks, but that's all I can do, I know almost nothing about the others instructions. Could you help me a bit please ?

Offline

#359 2012-11-15 10:27:40

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

Re: 3x+ battery life

Why don't you just comment out the relative commands one by one from the cript and try it out?


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

#360 2012-11-15 10:34:30

djipey
Member
Registered: 2011-07-30
Posts: 158

Re: 3x+ battery life

Haha, yeah, that's true, I didn't think about that.

Offline

#361 2012-11-15 23:59:24

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

Re: 3x+ battery life

@everyone
1. the issue that powerdown does not restore all settings when you run powerup will be fixed soon
2. make use of "sudo powernow". it will show you almost everything you should know about current powersave values.

Last edited by taylorchu (2012-11-15 23:59:36)


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

Offline

#362 2012-11-16 23:04:22

djipey
Member
Registered: 2011-07-30
Posts: 158

Re: 3x+ battery life

Got it. This line :

opt /proc/sys/kernel/nmi_watchdog 0

Solves a bug with VirtualBox. By default, the value in this file is 1. With 1, if I run a virtual machine and try for an example to install ubuntu, the install stops, and makes my laptop rebooting.
With the value 0, the install works perfectly. I did the test 3 times, with each time the same result.

So guys, just to learn, what is nmi_watchdog ? And more important, how can I set it to 0 by default ?

Offline

#363 2012-11-16 23:09:22

jakob
Member
From: Berlin
Registered: 2005-10-27
Posts: 419

Re: 3x+ battery life

djipey wrote:

So guys, just to learn, what is nmi_watchdog ?

Who searches shall find… https://duckduckgo.com/?q=nmi_watchdog& … &kad=de_DE

Offline

#364 2012-11-16 23:16:15

djipey
Member
Registered: 2011-07-30
Posts: 158

Re: 3x+ battery life

Yes I already did it. But could you please consider that :
1) I'm french, so my english is not the best of the world
2) I'm not even sure that I could understand it in french

Last edited by djipey (2012-11-16 23:16:36)

Offline

#365 2012-11-17 09:38:57

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

Re: 3x+ battery life

On many x86/x86-64 type hardware there is a feature that enables us to generate 'watchdog NMI interrupts'.  (NMI: Non Maskable Interrupt which get executed even if the system is otherwise locked up hard).
This can be used to debug hard kernel lockups.  By executing periodic NMI interrupts, the kernel can monitor whether any CPU has locked up, and print out debugging messages if so.

It is a debug feature, it is not relevant if you're not using latest kernel (i guess) or if you're not a tester. You should never (*should*) experience those kind of lock up, in a stable kernel.
It probably uses more power because of the Interrupt signals it executes every "x" seconds (minutes?).
So, don't worry, you won't lost any important feature. Don't ask me why vbox won't work with this, but looking for "nmi_watchdog virtualbox" on google, it seems it is a long story...

Last edited by nierro (2012-11-17 09:39:34)

Offline

#366 2012-11-18 15:06:26

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

Re: 3x+ battery life

taylorchu wrote:

I use more aggressive settings. For example /proc/sys/vm/dirty_ratio  is set to 90, it basically almost disable the feature to let program to write dirty data to the disk.

Hi taylorchu and thank you for your script, which i've now replaced laptop-mode-tools with.

I know the above quote from you is old, but I wanted to ask why you have changed that value along time ago from 90 to 60? I've seen many others powersave scripts where they still use 90, so I was wondering why you changed it, I mean if you think it's unsafe to use 90 or what?

Also, I wanted to ask you about that your script dosen't remount the partitions with 'commit=600', but which LMT does. Do you think that is an irrelevant tweak?

Btw, since you only add relatime to the remounts, then you could delete that line since that's the default since a long ago...

Again, thank you for your contribution.

-- EDIT --

Nevermind, I have made my own script to use instead...

Last edited by mhertz (2012-11-20 03:23:51)

Offline

#367 2012-12-17 18:27:51

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: 3x+ battery life

Nevermind, I have made my own script to use instead...

Do you mind showing your script?

Offline

#368 2012-12-28 13:56:29

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

Re: 3x+ battery life

I sometimes get backlight flickering (brightness frequently changes from e.g. 80% to 100% and back and forth...) after manual adjusting of the brightness using Fn+F3. Does powerdown require special configuration for using on KDE (or, maybe, KDE should be configured in some special way to be used with powerdown)?

Offline

#369 2012-12-28 14:42:12

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

Re: 3x+ battery life

mityukov wrote:

I sometimes get backlight flickering (brightness frequently changes from e.g. 80% to 100% and back and forth...) after manual adjusting of the brightness using Fn+F3. Does powerdown require special configuration for using on KDE (or, maybe, KDE should be configured in some special way to be used with powerdown)?

This rarely happens to me too...
Another problem, when sI am hutting down the laptop and meanwhile I close the lid, it goes into suspend (this is not the normal behavour, it does nothing when the lid is closed usually).


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

#370 2012-12-29 07:27:38

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

Re: 3x+ battery life

@everyone
about a week ago, some changes happened:
* powerup 100% reverts changes done by powerdown
* some default value changes to powerup: mostly from performance mode to standard
* powerdown default values are not aggressive anymore
* improve support of backlight saving
* some fixes to suspend-to-disk
* some clean-ups to the library functions


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

Offline

#371 2012-12-29 10:03:10

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

Re: 3x+ battery life

Have you moved the value modifications into a .conf file? I have not updated it since quite some time because every update erases my custom changes.

Offline

#372 2012-12-29 10:30:43

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

Re: 3x+ battery life

Lockheed wrote:

Have you moved the value modifications into a .conf file? I have not updated it since quite some time because every update erases my custom changes.

Agreed, I'm probably not updating till this happens. I know I could run a diff but that's besides the point.

Offline

#373 2013-01-26 11:03:10

dartfira
Member
Registered: 2010-08-23
Posts: 104

Re: 3x+ battery life

Where should I change the rules? I need to set whitelist for an usb mouse.
Also I notice a bad slowness and I'm still at 2 hours of autonomy.

Last edited by dartfira (2013-01-26 11:08:42)

Offline

#374 2013-01-27 05:59:53

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

Re: 3x+ battery life

@everyone
some basic config file is coming. i.e. /etc/powerdown

@dartfira
each laptop has different behavior for usb autosuspend when usb is in auto mode. Sometimes usb mouse can be waked up again just by right-clicking.
I notice this problem now, and I will look into it.


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

Offline

#375 2013-01-27 13:35:03

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

Re: 3x+ battery life

"Powerdown",
a case study in feature-creep. tongue

Offline

Board footer

Powered by FluxBB