Active Topics

 


Reply
Thread Tools
Posts: 875 | Thanked: 918 times | Joined on Sep 2010
#11
Originally Posted by Addison View Post
Do you have Advanced Backlight?

I thought that came with the SSU because it best supports the whole screen rotation thing?
No it doesn't come with SSU. I had adv-backlight installed until I wrote advanced-systemui which replaces all the features in adv-backlight. Couple weeks ago I was forced to format and now have a clean gconf database so I wasn't able to lookup the key for you but knew it was there.

Originally Posted by Addison View Post
It looks like I can't see the entire address because it's grayed out.
The full key name is in the right pane above the dialog.

Replace XXX with /apps/adv-backlight/brightness
 

The Following User Says Thank You to auouymous For This Useful Post:
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#12
Replace XXX with /apps/adv-backlight/brightness
Hey!

Yeah, that actually works!

Only for one second though and then it immediately reverts back to the Control Panel -> Display -> Brightness setting it seems like.

I've tried it 5 times now.

Poops.

Okay. If you were to run this from Xterm:
/etc/init.d/mce stop
sudo /etc/init.d/mce start

I just would like the Brightness, Brightness period and Switch off display numbers to be the exact same and functioning as they were before entering those two command lines.

I hope that makes sense and thank you so much for sticking with me on this.

You rock dude!
 
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#13
Eep!

I added this at the end of my script:
gconftool-2 -s "/system/osso/dsm/display/display_dim_timeout" 30 -t INT
gconftool-2 -s "/system/osso/dsm/display/display_blank_timeout" 30 -t INT

Now after I've restarted MCE again, the dim and blank times remain the same like they were before (30 seconds each).

Is there a way to catch what these two values are at the beginning of the script and then enter them back in afterward?

Like using variables or whatever?

All that's left is to get a better handle on the brightness setting, which goes weird after MCE restart, and then I'm gold.
 
Posts: 875 | Thanked: 918 times | Joined on Sep 2010
#14
Originally Posted by Addison View Post
Eep!

I added this at the end of my script:
gconftool-2 -s "/system/osso/dsm/display/display_dim_timeout" 30 -t INT
gconftool-2 -s "/system/osso/dsm/display/display_blank_timeout" 30 -t INT

Now after I've restarted MCE again, the dim and blank times remain the same like they were before (30 seconds each).

Is there a way to catch what these two values are at the beginning of the script and then enter them back in afterward?

Like using variables or whatever?

All that's left is to get a better handle on the brightness setting, which goes weird after MCE restart, and then I'm gold.

The restore_value code should have worked, try changing the function to:

Code:
restore_value()
{
  value=`gconftool-2 --get "$2"`
  gconftool-2 --type $1 --set "$2" $value
}
And then put the lines that call it after.

Oops! I forgot about DSME when setting the brightness, you can change the value with that file but DSME restores it. The /etc/mce.conf file has a line that loads a filter-brightness-als module, should only work on n810 but maybe if you remove it by commenting out the line and making a copy without that module it might stop reseting brightness. I'll try to write some real code to set DSME brightness when I wake up, poke me if I forget.
 

The Following User Says Thank You to auouymous For This Useful Post:
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#15
Okay, here's the poke you wanted. *lol*

Is there just a simple way to read all of these values before the script and then return them back afterward?


gconftool-2 --type int --set /apps/osso/applet/osso-applet-display/turn_off_display ?
gconftool-2 --type int --set /apps/osso/applet/osso-applet-display/brightness_period ?
gconftool-2 --type int --set /system/osso/dsm/display/display_dim_timeout ?
gconftool-2 --type int --set /system/osso/dsm/display/display_blank_timeout ?
 
Posts: 875 | Thanked: 918 times | Joined on Sep 2010
#16
Originally Posted by Addison View Post
Is there just a simple way to read all of these values before the script and then return them back afterward?
gconftool-2 --type int --set /apps/osso/applet/osso-applet-display/turn_off_display ?
gconftool-2 --type int --set /apps/osso/applet/osso-applet-display/brightness_period ?
gconftool-2 --type int --set /system/osso/dsm/display/display_dim_timeout ?
gconftool-2 --type int --set /system/osso/dsm/display/display_blank_timeout ?
I thought the values were correct and just need to be OK'd to restore them? You should have to read and write them to get MCE's attention.

I put together a small program to set the backlight, download it here http://asui.garage.maemo.org/download.html . You don't need to download the source file.

Code:
# advanced backlight
set-brightness `gconftool-2 --get /apps/adv-backlight/brightness`

# ASUI
set-brightness `gconftool-2 --get /apps/asui_state/brightness_level`
Second command is for anyone wanting to do this with ASUI.
 

The Following User Says Thank You to auouymous For This Useful Post:
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#17
I'm so bad at coding that I'm going to be shameless and ask if you could edit my current script that I'm using with your new backlight app thingy.



#! /bin/sh

gconftool-2 --set -t bool /system/osso/af/keyboard-attached true
/etc/init.d/mce stop
killall xbindkeys
xbindkeys -f /home/user/.xbindkeysrc_adom
xmodmap ~/.Xmodmap_adom
xkbd -geometry +65536+65992 -k /media/mmc2/N800/Keyboards/Flat2.xkbd & xkbd -geometry +725+360 -k /media/mmc2/N800/Keyboards/Keypad.xkbd & ssh -l james ancardius.ath.cx
gconftool-2 --set -t bool /system/osso/af/keyboard-attached false
killall xbindkeys
killall xkbd
setxkbmap
sudo /etc/init.d/mce start
gconftool-2 -s "/system/osso/dsm/display/display_brightness_level_step" 1 -t INT
gconftool-2 -s "/system/osso/dsm/display/max_display_brightness_levels" 127 -t INT
gconftool-2 -s "/system/osso/dsm/display/display_brightness" 16 -t INT
gconftool-2 -s "/system/osso/dsm/display/display_dim_timeout" 30 -t INT
gconftool-2 -s "/system/osso/dsm/display/display_blank_timeout" 30 -t INT
gconftool-2 -s "/system/osso/dsm/display/display_brightness_level_step" 1 -t INT
gconftool-2 -s "/system/osso/dsm/display/max_display_brightness_levels" 5 -t INT
xbindkeys
killall roxterm
 
Posts: 875 | Thanked: 918 times | Joined on Sep 2010
#18
Code:
/FULL/PATH/set-brightness `gconftool-2 --get /apps/adv-backlight/brightness`
Just add that to the bottom and change /FULL/PATH/ to the directory path where you placed the set-brightness binary, /root/bin/ is a good location. And chmod 755 set-brightness so you can execute it.
 

The Following User Says Thank You to auouymous For This Useful Post:
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#19
Awesome!

That works!

Eeeeeeeee!

The correct argument though is
/usr/bin/set-backlight `gconftool-2 --get /apps/adv-backlight/brightness`

I'm still unsure how to use these with variables.

gconftool-2 -s "/system/osso/dsm/display/display_brightness_level_step" 1 -t INT
gconftool-2 -s "/system/osso/dsm/display/max_display_brightness_levels" 127 -t INT
gconftool-2 -s "/system/osso/dsm/display/display_brightness" 16 -t INT
gconftool-2 -s "/system/osso/dsm/display/display_dim_timeout" 30 -t INT
gconftool-2 -s "/system/osso/dsm/display/display_blank_timeout" 30 -t INT

I'd like to use variables to restore the settings back to how they were rather than force something that's always static like how I'm currently doing this.

Thanks chief!
 
JonWW's Avatar
Posts: 623 | Thanked: 289 times | Joined on Jan 2010 @ UK
#20
On the N900 this resets the back light to what ever level it was set to after MCE restarts:
Code:
sleep2
gconftool -s /system/osso/dsm/display/display_brightness \
 `gconftool -g /system/osso/dsm/display/display_brightness` -t int
I have never noticed if the timeout get changed, but in theory the same thing could be done with it
 

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


 
Forum Jump


All times are GMT. The time now is 12:12.