-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dim in a more intelligent way #122
Comments
Also, why not hooking into KCAL, or using a driver like CF.lumen? |
See #20 |
Currently thinking it might make sense to replace
|
Here's another one. It's more clever than the others. Maybe too clever.
A simpler version is to do the same as the above, but not try to change the automatic (adaptive) backlight setting -- leave that for users to toggle manually. This would sacrifice some functionality, but might be worth it in simplicity and usefulness. |
If any, it should be natural to just stick to it if user had it enabled. ... In other news I found https://github.com/fython/Blackbulb
I'd say 1/4 imo. Or at least because on my phone minimum brightness is already pretty low. |
Right now, *ie, adaptive brightness. I use the names I do because that's what they're called in the code.
Thank you for reminding me of this. I'd been meaning to look into how it's able to work without overlay permission (turns out, the filter is masquerading as a temporary notification). I really like how simple their interface is, although they don't have separate controls for color/intensity/dim, profiles, a timer, or the ability to automatically pause in secure apps. It looks like they proxy all their calls to the filtering service through a call to a tile receiver. Not sure why that is, but maybe related to #142.
1/2 was just an example; If I end up going this route, I'll play around with it to see what value feels good. |
Stray thought: Would it make sense to combine this with the button backlight setting? It would be nice if that setting had some effect on all devices, as I don't really like a useless setting sitting around. |
I updated the top comment with a proposal. |
Copying the reply from @wavexx in #191 so I don't forget it:
I do agree that this would be ideal. Unfortunately, it is impossible to change the behavior of the system brightness control. I also don't know of any way for an app to be notified when the user changes the brightness, although we can periodically check what the brightness is and react accordingly -- this might have an impact on battery usage, but we can minimize that if When I came up with the proposal, I was thinking, "What are the options with the controls we have? Which of those is the best?" This comment got me thinking, "What's the ideal? How close can we get to that?" It was a very useful change of mindset and has given me some new ideas -- thanks :) |
On Thu, Sep 28 2017, smichel17 wrote:
I do agree that this would be ideal. Unfortunately, it is impossible
to change the behavior of the system brightness control. I also don't
know of any way for an app to be notified when the user changes the
brightness, although we can periodically check what the brightness is
and react accordingly -- this might have an impact on battery usage,
but we can minimize that if `Pause in excluded apps` is enabled.
Could you get at least increase/decrease brightness events? (as opposed
to sliding the brightness control, which I assume generates absolute
values).
When I came up with the proposal, I was thinking, "What are the
options with the controls we have? Which of those is the best?" This
comment got me thinking, "What's the ideal? How close can we get to
that?" It was a very useful change of mindset and has given me some
new ideas -- thanks :)
But if you *did* include the backlight level in the filter settings, as
opposed to just "lower to 0", it would be just a setting like the other.
When changing the backlight, just update the preset value as well.
I never had more than one filter, but if I had more in addition, I
_wouldn't_ want the current brightness to influence my "dark reading"
preset where I want the backlight to be always zero.
|
Nope, there's no interface at all for apps to interact with the backlight brightness that I'm aware of, aside from getting and setting the backlight values (which is done the same way you'd change any other system setting, like toggling the wifi).
If possible I'd like to integrate backlight controls without increasing the number of settings. At its core, Red Moon has a pretty simple function and its design should reflect that. There are ways to do what you want without adding settings, though (for example, making the
Noted. I think the current proposal is better than any previous version, but not good enough to build, yet. |
That sounds something the kernel would care\handle |
I haven't read 100% of the android documentation so it's possible there's a callback I missed somewhere, but it seems unlikely. It's probably possible with root -- almost anything is. However, such things are typically undocumented and might be a ton of work to implement. |
On Fri, Sep 29 2017, mirh wrote:
That sounds something the kernel would care/handle
https://github.com/torvalds/linux/blob/master/include/linux/backlight.h any idea?
Under vanilla linux, yes. Unified leds and backlight control is
available on KMS drivers (and some others) via /proc/. Events (user and
system driven) are also emitted via ACPI.
However, this might tell very little on what android actually does/has
under the hood.
|
ARM certainly gives no fucks to ACPI... Again, I guess this is yet another time one of those "perfect with root - horrible pretension to be even working without" situations |
I know Lux manages to do it; the system brightness slider is entirely disabled when Lux is enabled, and one can control the system brightness and overlay opacity from the notification or the slider within the app. It targets android 5, but it's worked on 4.x in the past as well. Maybe that'll help narrow down the search or give a reversal target. I'm pretty sure the core mechanism of action doesn't require any additional permissions, either. It asks for usage access for some unrelated features. |
I'm not sure what you actually meant with "entirely disabled" (always stuck on the same setting, is not technically "disabled"), but yes there is this stupid thing since the first version of android. It's not what dev was talking about, if you just proceeded reading the reminder of the following sentence. |
This issue has gotten long enough that I think it's pretty unfocused. I'm traveling this week but when I get back, I'll close this and make a new issue with a summary of the parts here that are still relevant, with some screenshots to clarify the problems. |
Copying @decadent's comment from #21 so I don't lose it when I go to summarize this issue
|
Motivation / Premise
There's two ways to dim the screen.
Given the choice, I think I would always rather start with the backlight, and only engage the filter when the backlight reaches 0.
The problem
This is actually a hard problem to solve:
I am not planning on working on this any time soon, butI am interested in feedback. Would you find the proposal below acceptable?What do you find useful or not about Red Moon's current brightness/dim controls? Is there anything you wish Red Moon could do, or that you never want it to do?Proposal
The problem with doing this is that if the user switches to a darker profile, turns up the brightness, and repeats that several times, we could reach a profile at maximum darkness without actually dimming the screen at all. So solve that, we need to:
For example:
There's one final problem: unless the brightness is already at the minimum when the user turns it on, we'll never be able to reach the minimum. So, instead of raising/lowering a fixed amount, we need to scale it by whatever the initial brightness is.
Conclusion
I believe this implementation, while complex, will respect all the user's wishes.
Note: I will keep this comment up to date, but comments below reflect my thoughts at the time, not now.
The text was updated successfully, but these errors were encountered: