Merge ~peat-new/repowerd:synchronous-unity-dbus-call into repowerd:master
Status: | Merged |
---|---|
Merge reported by: | Alexandros Frantzis |
Merged at revision: | not available |
Proposed branch: | ~peat-new/repowerd:synchronous-unity-dbus-call |
Merge into: | repowerd:master |
Diff against target: |
23 lines (+2/-3) 1 file modified
src/adapters/unity_display.cpp (+2/-3) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alexandros Frantzis | Approve | ||
Review via email:
|
Commit message
adaptors: make the screen-on call to u-s-c synchronous
Normally, repowerd calls the unity-screen-
screen via DBus asynchronously before incrementally increase the
brightness. The problem is that, on some device (such as Fairphone 2),
the brightness is ignored if the screen is blanked. So, there is a race
condition between the brightness is incremented to the max and the
screen being actually unblanked.
This commit makes this call synchronous, making sure that the screen will
be unblanked completely before the brightness is set.
Description of the change
adaptors: make the screen-on call to u-s-c synchronous
Normally, repowerd calls the unity-screen-
screen via DBus asynchronously before incrementally increase the
brightness. The problem is that, on some device (such as Fairphone 2),
the brightness is ignored if the screen is blanked. So, there is a race
condition between the brightness is incremented to the max and the
screen being actually unblanked.
This commit makes this call synchronous, making sure that the screen will
be unblanked completely before the brightness is set.
Thanks for the patch.
Making the call synchronous as you propose has the side effect that if the system compositor blocks for whatever reason, it will also block repowerd for the default dbus timeout which is rather long (25 seconds).
I am considering making the call synchronous with a shorter, 1 second timeout, so even if the compositor has entered a problematic state, it won't block repowerd for more than 1 second.
Unfortunately I don't have a fp2 to try this out. Could you check if a 1 second timeout is enough for the fp2?