Notice: Trying to access array offset on value of type bool in /srv/www/vhosts/openpandora.org/domains/bugs.openpandora.org/httpdocs/scripts/details.php on line 649 FS#176 : op_power.sh: problematic display brightness restoring and clockrate suggestion

OpenPandora Main OS

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bug Report
  • Category Core
  • Operating System Release 1 (Zaxxon)
  • Severity Medium
  • Reported Version Hotfix 4
Attached to Project: OpenPandora Main OS
Opened by Nils Kneuper - 03.09.2010
Last edited by Michael Mrozek - 23.01.2011

FS#176 - op_power.sh: problematic display brightness restoring and clockrate suggestion

Since hotfix4 it is possible to reduce the value for display brightness below '3'. Thus the script op_power.sh (the one used for low power mode) has to be adjusted accordingly. Currently line 25 in this script looks like this: if [ $oldbright -ge 3 ] && [ $oldbright -le $maxbright ]; then Please change the "-ge 3" part to "-ge 1" so that lower modes are possible, too. Otherwise the screen will be set to max brightness if you have selected a value of '1' when going into powersave mode. Somehow it looks like what is possible to select via the hotkeys and what is possible via the "application" differs. In the script op_lcdsettings.sh in line 11 a minimum brightness of 3 seems to be defined, with the hotkeys it is even possible to go down to 0 (screen off) or values like 1 and 2. This is the relevant line: minbright=3 Brightness restoring appears to be problematic in op_lid.sh, too. Just have a look at line 25 in this script: if [ $oldbright -ge 3 ] && [ $oldbright -le $maxbright ]; then Another issue is that the clockrate of 14MHz is simply too low to be reasonable. Please do adjust it to 125MHz instead, since this seems to be what TI recommends and what makes most sense since starting with hotfix4 this is where the lowest powermode (OPP0) is entered. When clocking down to 14MHz issues like the clock not working correctly come up. Relevant lines in op_power.sh: line 14, restoring old clockrate: if [ $oldspeed -gt 14 ] && [ $oldspeed -le 900 ]; then line 72, setting the clockrate for low power mode: echo 14 > /proc/pandora/cpu_mhz_max
Closed by  Michael Mrozek
23.01.2011 23:46
Reason for closing:  Fixed
Nils Kneuper commented on 03.09.2010 22:28
Okay, can really reproduce the issue now: 1) Use the hotkeys (fn + u) to lower brightness to 0 (aka "display is turned off"). 2) Increase brightness exactly one time by hitting the respective hotkey (fn + i). The hardware brightness value should now be set to '1'. This will be written correctly into the temp file. 3) Toggle any event that turns the display off (there should be enough, right?). When you turn it back on again it will be at maximum value. Suggested solution(s): 1) change all cases of "$oldbright -ge 3" to "$oldbright -gt 0". This way it is just checked that brightness is not 0, which is perfectly enough. 2) To have things "in sync" do also change "minbright=3" in op_lcdsettings.sh to "minbright=1" for consistency reasons (the gui tool should allow the same range as the hotkeys, right?). EDIT: 3) change "minbright=3" in "op_bright.sh" to "minbright=1", too. Though it *might* be that this script is unused. At least the hotkeys do rely on op_bright_[up,down].sh.
Admin
Michael Mrozek commented on 08.09.2010 00:17
A different user reported flickering when going to a very low brightness - maybe we should go directly to 0 from 3 and really skip 1 and 2?
vimacs commented on 08.09.2010 23:47
Setting the brightness below 3 is problematic as it can cause undesired effects like flashing, or will be "equal" to 0. Thats one of the reason the limit is there, the other is that the keyboard buttons wherent mapped before which would render your device "unusable" if the screen turned off, which can happen below a value of 3. This isn't the case now anymore with the mapped buttons, but i still wouldn't recommend a value lower then 3 to be saved as a user may panic if the screen doesn't turn on on boot. I recommend checking the LCD panels specs to see the lowest operational voltage for the backlight and then keeping that as the lowest allowed value with everything lower turning the screen off without saving the value.
Admin
Michael Mrozek commented on 27.09.2010 23:02
Fixed in HF5.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing