View Single Post
Posts: 856 | Thanked: 1,681 times | Joined on Apr 2010 @ Aleppo ,Syria
#1328
The 'lock' signal



Code:
#!/bin/sh

echo 10 > /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 100 > /proc/sys/vm/vfs_cache_pressure
will test it with those edits

Last edited by karam; 2011-07-25 at 15:42.