Feature: Add an option to adjust screen brightness by quadratic curve instead of linear when using brightness keys
AbandonedPublic

Authored by vishaw on Mar 11 2019, 11:49 AM.

Details

Reviewers
ngraham
Group Reviewers
Plasma
Summary

Add an option to make brightness up / brightness down key increase/decrease brightness along a quadratic curve instead of the usual linear curve.
This allows much finer tuning at low brightness. Very useful in total darkness, when the smallest change in brightness makes huge difference.

Test Plan

Tested on the latest git version of powerdevil.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
vishaw created this revision.Mar 11 2019, 11:49 AM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 11 2019, 11:49 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
vishaw requested review of this revision.Mar 11 2019, 11:49 AM
vishaw removed a reviewer: Plasma.
vishaw added a reviewer: Plasma.
vishaw updated this revision to Diff 53645.Mar 11 2019, 12:18 PM
ngraham requested changes to this revision.Mar 11 2019, 8:56 PM
ngraham added a subscriber: thsurrel.

-1 for making this user-configurable, sorry. The brightness curve is an implementation detail and I don't think exposing it to the user makes sense. With a string like "Use quadratic curve for brightness keys:", that's just gonna confuse users. Most Regular People™ don't even know what the word "quadratic" means.

I would support improving the curve without making it user-configurable. However: the last time someone proposed this in D13095: Scren brightness follow a quatratic progression it ran into a problem where for certain screens (including mine), two keypresses were required to get the backlight to turn on again after reducing the brightness to the lowest level. If you can solve that, then I'll be happy. :) Maybe you and @thsurrel can put your heads together and figure out a solution!

This revision now requires changes to proceed.Mar 11 2019, 8:56 PM

I would love to see something like this getting in somehow, but as Nate described, we run into a problem with literally the first person that tested the patch. That sounds statistically bad.

I did not find a way to ensure that a given minimal step would turn on the screen when starting from 0. My guess is that there are some graphical cards out there that will behave weird and turn on the screen at an arbitrary level. Unless testing this first on a LOT of hardware, it seems difficult to find a value suitable for all.

I would love to see something like this getting in somehow, but as Nate described, we run into a problem with literally the first person that tested the patch. That sounds statistically bad.

I did not find a way to ensure that a given minimal step would turn on the screen when starting from 0. My guess is that there are some graphical cards out there that will behave weird and turn on the screen at an arbitrary level. Unless testing this first on a LOT of hardware, it seems difficult to find a value suitable for all.

Maybe we should look a level deeper and figure out why we're getting nonzero values that still have the backlight off? Could be a kernel bug.

Yeah, that would help if I had a laptop that has this behavior, but I couldn't find any.

Well I've got one! Unfortunately my kernel-fu is non-existent, but I can follow instructions and commands like a trained monkey pretty well. :)

And I could guide you around the kernel except in the graphic area ...

vishaw abandoned this revision.Mar 12 2019, 3:21 AM

abondon because its a duplicate.