Fix brightness not restoring when an inhibition is active
ClosedPublic

Authored by aleksejshilin on Oct 26 2017, 4:03 PM.

Details

Summary

BUG: 352497

An active inhibition with ChangeScreenSettings policy won't
allow to restore dimmed screen brightness normally. In this
case the user will be left with a barely visible screen,
requiring him/her to manually adjust the brightness back to
normal.

This commit enforces dimmed screen brightness restoration
even if ChangeScreenSettings policy is unavailable.

Diff Detail

Repository
R122 Powerdevil
Branch
fix_restore_brightness
Lint
No Linters Available
Unit
No Unit Test Coverage
aleksejshilin created this revision.Oct 26 2017, 4:03 PM
Restricted Application added a project: Plasma. · View Herald TranscriptOct 26 2017, 4:03 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript

I've created a script to demonstrate the issue (attached). It uses VLC to acquire inhibition after the screen is dimmed.

Usage: ./test_restore_brightness.sh <video file>

broulik accepted this revision.Oct 26 2017, 9:31 PM
broulik added a subscriber: broulik.

Wow. Good observation! I bet there's a bug report on Bugzilla about this.

Do you have commit access?

This revision is now accepted and ready to land.Oct 26 2017, 9:31 PM

I bet there's a bug report on Bugzilla about this.

Yeah, 352497 looks like it.

There are also a few suspects: 351693 and 358588 (but they say 'Reproducible: Always'), 357621 (not sure how suspend/resume helps).

Do you have commit access?

No, I don't.

(I should've mentioned this. My bad.)

ngraham edited the summary of this revision. (Show Details)Oct 27 2017, 1:14 PM

Lovely work. I can land this for you.

This revision was automatically updated to reflect the committed changes.

Thanks for taking care of this!