View Single Post
Posts: 1,680 | Thanked: 3,685 times | Joined on Jan 2011
#1329
Originally Posted by karam View Post
The 'lock' signal


Code:
#!/bin/sh

echo 100 > /proc/sys/vm/vfs_cache_pressure
brightness=$(cat /sys/class/backlight/acx565akm/brightness)
keyboard=$(cat /sys/devices/platform/gpio-switch/slide/state)
#charger=$(cat /sys/devices/platform/musb_hdrc/charger)

if [ "$brightness" == "0" ]; then
        if [ "$keyboard" == "closed" ]; then
                #load cpu profile, i.e. underclock
                #Do other stuff to save power i.e. vfs cache pressure etc.

                #maybe even stop bme for total max bro sleep.
                #start/stop bme on charger connected
                #       if [ "$charger" = "0" ]; then
                #               stop bme
                #       echo $(date +"%d-%m %T") "bme stopped" >> /root/log
                #fi
fi
fi


The 'unlock' signal

Code:
#!/bin/sh


echo 0 > /sys/power/sr_vdd1_autocomp
echo 0 > /sys/power/sr_vdd2_autocomp
kernel load overclock
echo 10 > /proc/sys/vm/vfs_cache_pressure
will test it with those edits
Noooo! Read the script and comments bro! This is not ready to roll strait out...

It's dangerous to go alone. Take this:


Sleep:
Code:
#!/bin/sh

brightness=$(cat /sys/class/backlight/acx565akm/brightness)
keyboard=$(cat /sys/devices/platform/gpio-switch/slide/state)

if [ "$brightness" == "0" ]; then
        if [ "$keyboard" == "closed" ]; then
                echo 100 > /proc/sys/vm/vfs_cache_pressure

fi
fi
Awake:
Code:
#!/bin/sh
echo 10 > /proc/sys/vm/vfs_cache_pressure
__________________
N900: One of God's own prototypes. A high-powered mutant of some kind never even considered for mass production. Too weird to live, and too rare to die.

Last edited by vi_; 2011-07-25 at 15:47.
 

The Following User Says Thank You to vi_ For This Useful Post: