Dimming the display without locking

  • I have configured that my BQ E4.5 locks after 3 minutes of not touching it and some seconds before it dimms. Fine. I would like to have such dimming already after say 15 seconds, but w/o lock. Can this be set somehow from a terminal command? Thanks.

  • @guru
    Hi. You can set the brightness of display from terminal.
    For example if you want 50% brightness you can use the following command:
    echo 50 > /sys/class/leds/lcd-backlights/brightness

  • I found a pointer into the right direction in a posting in https://askubuntu.com/questions/628345/how-to-disable-ubuntu-phone-auto-dim-function

    One can read and write the value with dconf ... and for 3 minutes (=180 secs) the value gets configured to 170 secs, i.e. 10 secs before locking the screen dims:

    $ dconf read /com/ubuntu/touch/system/dim-timeout
    uint32 170

    When I set this to 10 secs, the value is stored, but does not work, i.e. it still uses the old 170 sec value.

    $ dconf write /com/ubuntu/touch/system/dim-timeout "@u 10"
    $ dconf read /com/ubuntu/touch/system/dim-timeout
    uint32 10

    When one sets a new timeout with the system-settings-app, the value gets again overwritten to, for example, 170 secs. So, it seems that the change with 'dconf...' is not sufficient, but must be noted/stored somehow/somewhere else. A strace of the system-settings-app shows, that the value is written to some file /home/phablet/.config/dconf/user. A modified value survives a reboot (normal, as it stored in that file), but as well does not work after boot.

    Here are some more value to read/write/dump:

    $ dconf dump /com/ubuntu/touch/system/
    dim-timeout=uint32 170
    activity-timeout=uint32 180

    To be continued ...

  • @guru
    So I was playing around with dconf and it looks like the value for "activity-timeout" set with dconf does work.
    It allso works after reboot. It is very strange that "dim-timeout" doesnt work.
    I allso noticed that when changing "sleep when idle" in battery settings, that "dim-timeout" is always set 10 sec les than "activity-timeout".

    It looks like "dim-timeout" is allways 10 sec less than "activity-timeout" even if you change "activity-timeout" with dconf.
    If you for example change "activity-timeout" with dconf to 20 sec the display wil be dimmed after 10 seconds regardless what "dconf dump /com/ubuntu/touch/system/" says.

  • The values one sets with dconf can be get or set with gsettings too:

    $ dconf write /com/ubuntu/touch/system/activity-timeout "@u 30"
    $ dconf write /com/ubuntu/touch/system/dim-timeout "@u 5"

    $ gsettings list-recursively | egrep 'dim|activity'
    com.ubuntu.touch.system activity-timeout uint32 30
    com.ubuntu.touch.system dim-timeout uint32 5
    org.gnome.settings-daemon.plugins.power idle-dim true
    org.gnome.settings-daemon.plugins.power idle-dim true

    $ gsettings get com.ubuntu.touch.system dim-timeout
    uint32 5

    While (as Vehi_MV says too) the value for acivity-timeout works fine, the used value for dim is always 10 secs before this and not what was set into dim-timeout. This must be a bug in the powerd, perhaps, because the dimming is announced in /var/log/syslog as:

    $ sudo grep dim /var/log/syslog
    Dec 21 15:49:05 ubuntu-phablet repowerd[917]: DefaultStateMachine: handle_alarm(display_dim)
    Dec 21 16:03:22 ubuntu-phablet repowerd[917]: DefaultStateMachine: handle_alarm(display_dim)
    Dec 21 16:07:51 ubuntu-phablet repowerd[917]: DefaultStateMachine: handle_alarm(display_dim)

    and it would be interesting to get to know from where this alarm-clock gets set...

Log in to reply