You are not logged in.

#1 2014-04-14 15:01:53

sPHERE
Member
From: Москва
Registered: 2008-07-01
Posts: 76
Website

Custom powersaving scripts

Hi all,

I have a Asus Zenbook which I have wrote a couple of custom scripts to enable/disable certain power-saving features whenever the ac-adapter is removed/added.

Powersave.sh

echo "powersave" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor    
echo -n 1 > /sys/devices/system/cpu/intel_pstate/no_turbo
echo -n 0 > /sys/devices/platform/asus-nb-wmi/leds/asus::kbd_backlight/brightness
nvidia-settings -a [gpu:0]/GPUPowerMizerMode=0 > /dev/null
xbacklight -set 20

Performance.sh

echo "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor    
echo -n 0 > /sys/devices/system/cpu/intel_pstate/no_turbo
echo -n 3 > /sys/devices/platform/asus-nb-wmi/leds/asus::kbd_backlight/brightness
nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1 > /dev/null
xbacklight -set 50

I have added these scripts to run from laptop-mode-tools via the exec-commands.conf file.

LMT runs the scripts when it should, but the xbacklight and nvidia-settings commands in the scripts doesnt get run.

Does anyone know why? And how I could fix this?

I assume it has something to do with the commands being ran from LMT as root in a non-terminal setting and not as a regular user. Am I correct?

If I add the mentioned commands separately in LMT they dont get run either, atleast not with an effect.

Offline

#2 2014-04-15 15:39:15

sPHERE
Member
From: Москва
Registered: 2008-07-01
Posts: 76
Website

Re: Custom powersaving scripts

Anyone?

Offline

Board footer

Powered by FluxBB