Summary: | Logarithmic brightness scaling | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Eric Edlund <ericedlund2017> |
Component: | Power management & brightness | Assignee: | Plasma Bugs List <plasma-bugs-null> |
Status: | ASSIGNED --- | ||
Severity: | task | CC: | ericedlund2017, info, kritomasx, natalie_clarius, nate, petenewcomb, zzrakic |
Priority: | NOR | Keywords: | usability |
Version First Reported In: | 6.2.4 | ||
Target Milestone: | 1.0 | ||
Platform: | Neon | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | nacent but functional logarithmic brightness hack |
Description
Eric Edlund
2022-01-14 13:24:44 UTC
Alright this is my new project this weekend wish me luck! Created attachment 145804 [details]
nacent but functional logarithmic brightness hack
Hi Eric,
It turns out that I just implemented this for myself, though on 5.18.4.1. I thought I had searched for such a thing before, but failed to find this bug before I started coding. I think the code I have does the math and implements the functionality properly (at least for my X13 Yoga OLED), but it's currently an #ifdef hack rather than a proper configuration or heuristic switch.
The tricky thing turned out to be the need to segment the function into a linear (identity) portion on the low-end and a logarithmic/exponential portion on the high end, with a bit of interpolation to calculate percentages in between.
Anyway, I've attached my patch as-is in case it's helpful, happy to discuss if you're interested. I'm also happy to help bring it up to snuff for a proper contribution, but I recognize that you probably have your own implementation well in hand already. Either way, I'm looking forward to having the functionality mainlined so I won't have to keep patching forever. :-)
Thanks for taking this on!
I'll be honest Peter, I haven't been able to get PowerDevil to compile on my machine, the dev chat has been no help and I'm ready to throw in the towel. If you could get your patch pushed in and I can stop blinding myself in dark environments I'll be happy. :) Thank you! Sounds good. I'll start looking into fully fleshing out the feature. Hi Peter, has there been any improvement on this? I'm linking this article that might help with development: https://konradstrack.ninja/blog/changing-screen-brightness-in-accordance-with-human-perception/ Oops, probably should have said this, but I started working on it again and am basically done. https://invent.kde.org/plasma/powerdevil/-/merge_requests/102?diff_id=428455&start_sha=c526286525109a81c29eac8c04359831f9e61e69#d7c9d73080a4c9f53a724d270836b260b5d9db26 Awesome news Eric! I think this is a very significant feature that laptop users will appreciate. Can't wait for it to be implemented. Great job. Yes, great news, Eric! I've been using the patch I posted above since I posted it, but got bogged down trying to set up a proper KDE build so that I could submit a complete contribution. Then I got too busy with other things. A possibly relevant merge request was started @ https://invent.kde.org/plasma/powerdevil/-/merge_requests/134 Thanks. This is indeed an issue. A field service laptop (for police / military / emergency service / construction etc.) uses displays with 1000 - 1400 nits. Due to their multiple times brighter displays compared to ordinary laptops, the lowest jumps (e.g. 5% to 10%) has tremendous impact on the brightness, often making it impossible to adjust to a comfortable brightness level for indoor use. Ordinary business and consumer laptops are also currently increasing their display brightness, and will therefore face the same issue, making this fix even more important. Fieldservice4, can you clarify whether you *do* or *do not* want logarithmic brightness changes? Right now we do linear changes. (In reply to Nate Graham from comment #11) > Fieldservice4, can you clarify whether you *do* or *do not* want logarithmic > brightness changes? Right now we do linear changes. Do want logarithmic. The author is correct. Linear changes does not work well with laptops with high brightness display (linked below), since the eye is sensitive to changes in low light environments but not high lights environment. So for an example, the 1400 nits display in the link below, a 10% change in brightness would be a 140 nits change. To illustrate this, it means 280 nits at only 20% brightness, which is almost equal to the maximum brightness of a normal consumer/business laptop (350 nits). The issue is that it becomes difficult to find a comfortable setting working in a low light environment, or if you have the laptop mounted in the vehicle (e.g. law enforcement) and driving in night time, it is easily either too dark or too bright with a linear setting with these kind of laptops. So it should be logarithmic. https://www.dell.com/en-us/shop/dell-laptops-and-notebooks/sf/rugged-laptops Got it, thanks. |