View Single Post
carbonjha's Avatar
Posts: 83 | Thanked: 71 times | Joined on Jul 2011 @ Dhaka
#1
Read end of this post.


I have used Sony Ericsson Xperia x1i. its OS was WP 6.1. it has different power profile for display brightness. On charger and on battery display brightness would change like in the laptop. I bought my N900 one & six months before. I have wanted this option in my superb awesome device. There is a enhancement request for Power Management Profiles.
https://bugs.maemo.org/show_bug.cgi?id=1046

I have done something like it with dbus script. To get the power supply information i used "com.nokia.bme.signal" with these triggers
1. charger_connected
2. charger_charging_on
3. charger_disconnected
4. charger_charging_off

dbus-scripts-settings-power-profile
Code:
#:display brightness 255
/opt/scripts/on_AC.sh * * com.nokia.bme.signal charger_connected

#:display brightness 255
/opt/scripts/on_AC.sh * * com.nokia.bme.signal charger_charging_on

#:display brightness 25
/opt/scripts/on_battery.sh * * com.nokia.bme.signal charger_disconnected

#:display brightness 25
/opt/scripts/on_battery.sh * * com.nokia.bme.signal charger_charging_off
I put the "dbus-scripts-settings-power-profile" in /etc/dbus-scripts.d/ and created two sh file in /opt/scripts

on_AC.sh
Code:
echo 255 > /sys/class/backlight/acx565akm/brightness
on_battery.sh
Code:
echo 25 > /sys/class/backlight/acx565akm/brightness
Restarted the phone & everything works just fine. connected the charger display brightness goes high then disconnected the charger and the display gets dimmed. But there is something wrong because while connected to the charger i lock the device and then unlock it but the brightness didnt get increased but gets the value from "display settings". I tried again & again but always the same result.

some useful links
"acmonitor" http://people.xiph.org/~tterribe/pro...html#acmonitor
http://talk.maemo.org/showthread.php?t=19258

The "acmonitor" is very good one but there is no version for N900. The source code is given in the site.

EDIT: The acmonitor works nicely on fremantle. I have tested it myself. Download it and install it.
Attached Files
File Type: deb acmonitor_0.1_armel.deb (7.9 KB, 102 views)

Last edited by carbonjha; 2011-11-18 at 18:22.
 

The Following 2 Users Say Thank You to carbonjha For This Useful Post: