Running Power Scripts at Startup

Forum rules
Before you post please read this

Running Power Scripts at Startup

Postby AlurianNighthawk on Fri Feb 04, 2011 9:38 pm

Hey, I just installed fluxbox mint on my laptop and was trying to enable a number of power options. I found that although I could run commands to enable power management on various parts of my system they won't stick. So, I figured I could throw them in a script and just have them run every boot. Problem is, every example for starting scripts @ boot I can find on the internet seems to use a startup manager of some sort (which I don't have!) And, to make it a little more fun, sudo will NOT work without a password. Any ideas would be much appreciated.

Edit: I am specifically trying to enable

Sata power management
hd audio power save
extend filesystem writeback to 30 seconds
increase wlan power timeout

They were the couple of optimizations that powertop quoted me
Last edited by AlurianNighthawk on Mon Feb 07, 2011 2:45 am, edited 1 time in total.
AlurianNighthawk
Level 1
Level 1
 
Posts: 2
Joined: Fri Feb 04, 2011 9:25 pm

Linux Mint is funded by ads and donations.
 

Re: Running Power Scripts at Startup

Postby AlurianNighthawk on Mon Feb 07, 2011 2:42 am

Solution:

First many hours of head + desk & frustration

then (insecure) sudo visudo where you add your shell script as executable as root without a password.

then add sudo sh (scriptlocation)(yourscript) & to .fluxbox/startup

pray a little and then it hopefully works. If not, you may just want to disable the password on sudo, that's what ended up working for me. Hopefully that helps someone. Applying tweaks to my power consumption dropped me from using around 20 watts on idle to around 8 watts on idle. Using USB-suspend, sata power management, iwconfig @ 750ms, audio power options, etc. Somewhat useful on a laptop as I now get 9+ hours of battery life.

If anyone knows a better way of doing this, let me know!
AlurianNighthawk
Level 1
Level 1
 
Posts: 2
Joined: Fri Feb 04, 2011 9:25 pm


Return to Others

Who is online

Users browsing this forum: No registered users and 2 guests