PDA

View Full Version : acmonitor and OS2007HE - Workaround


johnpad
2008-01-11, 06:04
Hi,
I tried both the 2006 and 2007 versions of acmonitor, but neither work correctly on the current HE.

I did a bit of searching around and came up with the following script which is good enough for me.
Note: My charger is at home so this is untested as yet. I will update this post later.
Update: Working now as expected following a quick update of the strings.
Update2: Ok ... You have to keep the dim value less than or equal to the blank value otherwise it refuses to blank. Updated now with a fix.

Does anyone know if using the dbus-monitor command in this way will have any impact on battery life?
Been running now for a couple of hours with no obvious impact to the battery life.


Note this can be run as user, no root needed. Just save this shell script and put it somewhere which will run on startup.


#!/bin/sh
CHARGER_CONNECTED="signal sender=:1.7 -> dest=(null destination) interface=com.nokia.bme.signal; member=charger_connected"
CHARGER_DISCONNECTED="signal sender=:1.7 -> dest=(null destination) interface=com.nokia.bme.signal; member=charger_disconnected"
ORIG_DIM_TIMEOUT=`gconftool -g /system/osso/dsm/display/display_dim_timeout`
ORIG_BLANK_TIMEOUT=`gconftool -g /system/osso/dsm/display/display_blank_timeout`
dbus-monitor --system | while read LINE
do
if [ "$LINE" = "$CHARGER_CONNECTED" ]; then
gconftool -s /system/osso/dsm/display/display_blank_timeout 99999 --type int
gconftool -s /system/osso/dsm/display/display_dim_timeout 99999 --type int
fi
if [ "$LINE" = "$CHARGER_DISCONNECTED" ]; then
gconftool -s /system/osso/dsm/display/display_dim_timeout $ORIG_DIM_TIMEOUT --type int
gconftool -s /system/osso/dsm/display/display_blank_timeout $ORIG_BLANK_TIMEOUT --type int
fi
done


Cheers
-John

Note: If you end up rebooting whilst the power is still connected the backlight time will stay at 99999. Just reset the time through the control panel to continue.