Skip to content

WIP: backlight: Add smooth brightness transition

Currently brightness changes in steps or immediately when set. Sudden changes to brightness might not be desired, instead a smooth transition between brightness levels provides a nicer experience.

Overview of changes:

Changes have only been made for the logind codepath.

Moved the logind proxy call to gsd_backlight_run_set_helper. So that we can use the task queue for both logind and pkexec cases.

Creating a timeout source everytime a brightness change is required.

Next brightness value is calculated based on time difference.

Closes: #82

While the smooth transition works The following parts need to be changed/fixed/tested:

  • Glitch in brightness slider knob in status UI where on clicking it jumps back for the actual smooth transition.

The above is just a visual glitch in the slider, the back and forth jumping between brightness has been fixed.

  • Pop-up for changed brightness displayed after reaching the target value

Can reduce the pop-up delay by decreasing transition time.

  • Figure out a way to get the display connector. (Passed to show_osd call in do_brightness_action function )

  • Haven't tested it out on systems other than my laptop.


Edited by Nishal Kulkarni

Merge request reports