X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=openpandora.oe.git;a=blobdiff_plain;f=recipes%2Fpandora-system%2Fpandora-scripts%2Fop_power.sh;h=85843d89693420f711b7f44b269813c39d8030b3;hp=0816a3ba6c2334b5b3aaf4eb467c5c78b968adc2;hb=c196bff8a1a7e51e13b90d62969bc230abd16345;hpb=b61ed9050f151beb6c05a89acb6c3d6244f6e6af;ds=inline diff --git a/recipes/pandora-system/pandora-scripts/op_power.sh b/recipes/pandora-system/pandora-scripts/op_power.sh index 0816a3b..85843d8 100644 --- a/recipes/pandora-system/pandora-scripts/op_power.sh +++ b/recipes/pandora-system/pandora-scripts/op_power.sh @@ -103,12 +103,12 @@ lowPowerOn(){ #switch from normal to lowpower mode suspend_net cat /proc/pandora/cpu_mhz_max > /tmp/oldspeed - /usr/pandora/scripts/op_cpuspeed.sh 125 + /usr/pandora/scripts/op_cpuspeed.sh -n 125 } lowPowerOff(){ # switch from lowpower to normal mode oldspeed=$(cat /tmp/oldspeed) - /usr/pandora/scripts/op_cpuspeed.sh $oldspeed + /usr/pandora/scripts/op_cpuspeed.sh -n $oldspeed display_on resume_net @@ -299,7 +299,18 @@ elif [[ "$2" == "lid" ]]; then esac fi fi - fi +elif [[ "$2" == "screensaver" ]]; then + # warning: don't try to interact with X or do real suspend here - + # will cause various deadlocks + unset DISPLAY + + if [[ "$1" == 0 ]]; then # deactivate screensaver + display_on + elif [[ "$1" == 1 ]]; then # activate screensaver + display_off + fi +fi + debug && echo "powerstate=$powerstate" echo "$powerstate" > /tmp/powerstate