You are not logged in.
Quick question: hdparm doesn't need partition labels, does it? I have only one disk, /dev/sda, so could I also give that as an argument? E.g.
run hdparm -S 6 -B 254 -a 2048 /dev/sda
instead of
for dev in $(awk '/^\/dev\/sd/ {print $1}' /etc/mtab); do run hdparm -S 6 -B 254 -a 2048 $dev; done
EDIT: Also, does setting a new hdparm value overwrite a previous one? I already have an entry in /etc/rc.local:
# Control HDD
hdparm -B 254 -a 2048 /dev/sda > /dev/null
Powerdown runs hdparm too, so my question is if I have to add those settings to the entry in powerdown if I want to keep these values? I think I do, but just checking here to be sure!
Last edited by Unia (2012-05-30 19:45:23)
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
If you use rc.local to have your hard disk power management set, you can comment the lines doing that in the powerdown script, to be sure they're not executed.
And yes,
for dev in $(awk '/^\/dev\/sd/ {print $1}' /etc/mtab); do run hdparm -S 6 -B 254 -a 2048 $dev; done
is only useful if you have more than one hd!
Last edited by nierro (2012-05-30 20:03:43)
Offline
I meant that for example, if I have -B254 set in rc.local and I then run -S6 from powerdown, would the -B254 still apply or would it have been overwritten?
And thanks for the tip on the hdd!
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
yes it remains applied!
Offline
yes it remains applied!
Awesome, thanks!
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
The real difference between this package and lmt is that :
1) lmt is a daemon + lots of config files, powerdown and powerup are 2 scripts.
2) You won't know what works and what doesn't with laptop-mode-tools, while with this script you can see any error in the log.
3) this package is easily extensible.
4)laptop-mode-tools is slowly developed.
5) you know what powerdown does. You won't know what laptop-mode-tools does (or, at least, with powerdown, you can check easily the code and understand it. Lmt is a series of script performed by the daemon.
6) lmt requires acpid. With this script you can use pm-utils and its powersaving features (plus upowerd, even if i'm having troubles with upowerd + DE + pm-utils, and i have to rely acpid anyway).
BTW i do not use this script but i created my own powersaving script, using the one from crunchbang forum and this, plus other things i needed.
So the key-feature is that it is highly extensible and easily adjustable (at least, for me).
Thank you so much Nierro.
I want to read carefully the thread on #!'s forum and study a bit deeper taylorchu's work. I want to learn more about this subject.
Laptop: Acer Aspire S3 | Linux Mint Cinnamon 64-bit
Offline
Another question.
When I run the default powerdown script, I get an error about the pcie_aspm setting. At first I thought that would be because I can't set this setting, so I checked whether or not I had this path and it turns out that I do. However, the file powerdown wants to write to, contains different stuff than what powerdown wants to write to it:
[root@lappy parameters]# cat /sys/module/pcie_aspm/parameters/policy
[default] performance powersave
That seems to be the default so I guess I could just remove the line from powerdown, but I want to know why I have different contents of this file and how I could edit powerdown to make it work (and thus be able to choose between the settings)
Thanks!
EDIT: Should add that powerdown wants to write the following:
opt /sys/module/pcie_aspm/parameters/policy powersave
Last edited by Unia (2012-05-31 18:44:40)
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
By the way, Gianluca, here's a nice link on this topic:
http://www.thinkwiki.org/wiki/How_to_re … onsumption
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
I've got that error too, my dear unia
I solved commenting that line in my script!
Offline
I've got that error too, my dear unia
I solved commenting that line in my script!
I have too, for now. I just wondered why my file seems to be of and how I can enable powermanagement on this.
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
@Unia: isn't there a more uptodate doc? it seems that some areas of Linux have perpetually out-of-date documentation and "tips"
Offline
By the way, Gianluca, here's a nice link on this topic:
http://www.thinkwiki.org/wiki/How_to_re … onsumption
Thank you Unia. ASAP I will read it carefully.
I hope to contribute more in the next few weeks, unfortunately in this weekend I'm busy.
By the way, I'll continue to catch up with the thread. I desperately need to maximize my battery life.
More it can lasts, better it is.
Laptop: Acer Aspire S3 | Linux Mint Cinnamon 64-bit
Offline
I added the description about aspm. do not comment out that in powerdown because it saves a lot battery.
I also remove the code to spin down the disk, so there is less dependency.
"After you do enough distro research, you will choose Arch."
Offline
opt /sys/module/pcie_aspm/parameters/policy powersave
In order to do this, you have to pass pcie_aspm=force to the kernel line!
Offline
supposedely you don't need to force it anymore? I can't find the source to back this, but i recall there was a commit to 3.x that made that useless
please correct me if I'm wrong, I may be mixing things..
Offline
Well, i thought it too.
But it seems i can't echo powersave > /sys/module/pcie_aspm/parameters/policy even if i'm root, without that option. Don't ask me why I think that parameter is read only without pcie_aspm=force in the kernel line!
Offline
It indeed works only with pcie_aspm=force in the kernel line. Thanks nierro
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
happy to help
Offline
Thanks!
Offline
That aspm powersave feature really does improve things! Estimated time left when idling before: 1.30 hours.
Now? 2.11!
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
So I just finished adapting this script for my specific setup and am ready to implement it. Now I am wondering what the best place to put this script is. I have acpid installed, as well as pm-utils.
Here and there I read that people use it with pm-utils, but I can also call it from the acpid handler.sh. What do you think is the best option to use?
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
As i said, using pm-utils + upower seems to create some problems (at least, for me), after suspend/hibernate.
So i use acpid, and put "pm-powersave" in rc.local (well i now created a service for systemd), and pm-powersave false/true in the right place in handler.sh .
If you don't want one more daemon running, you can use pm-utils and upower; may be you're not going to have troubles i had with them
Good luck!
Offline
Great topic!! My temperatures now are about 50 °C against 70°C before ... But my battery is completely fried (acpi -V tells me that it uses 34 % of its capacity) and it lasts almost 30 minutes....Is there a way to avoid that current is directed to battery when it's fully charged? (Apart removing it phisically of course )
Last edited by TheImmortalPhoenix (2012-06-04 12:11:40)
Offline
Using pm-utils + upower works for me, at least after one test it did.
However, I didn't have upower installed so I'd have to install an extra package to get it to work. Since I initially had acpi already running, I decided to go that way. This is the more cleaner solution for me, as I
1) won't have to install another extra package
2) I already control most of the stuff by handler.sh, and use pm-utils solely for its suspend (quick question: can I substitute another package for this? Do note that I use Catalyst)
Thanks for all the help in this topic! I now finally have a robust powermanagement in place!
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
Hm, here's a disadvantage of using handler.sh: it will only switch power states when you (un)plug the power. When you boot with power unplugged, it will not automatically trigger powerdown.
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