Giter VIP home page Giter VIP logo

Comments (19)

mendelmunkis avatar mendelmunkis commented on May 26, 2024

Sorry, i don,t know how to get debug info from clight, but if you tell me how I will try to attach demonstrative logs

from clight.

FedeDP avatar FedeDP commented on May 26, 2024

On laptops with poorly placed webcams the screen and keyboard back-lights can fool clight into believing that the ambient light level is higher than it is.

I was aware of this issue; unfortunately i cannot find any simple way to filter away these light sources.
Have you got any idea?

from clight.

mendelmunkis avatar mendelmunkis commented on May 26, 2024

Have you got any idea?

For a basic workaround maybe a config option to subtract some amount from the detected brightness.
Said amount being an advanced config option or possibly some percentage of screen brightness

from clight.

FedeDP avatar FedeDP commented on May 26, 2024

I'd prefer to find some corrective algorithm to automate it.
Too many configuration options is confusing for end users (and i think Clight already provides lots of configurations).
If i cannot find such an algorithm i will probably think about this twice :)
If you're by any chance a developer and are willing to help, it would be great!

EDIT:

Said amount being an advanced config option or possibly some percentage of screen brightness

Percentage of screen brightness is not that bad though, and should work fine. Btw when screen backlight is low, keyboard backlight is high, thus we should compute it too when doing our correction.

from clight.

mendelmunkis avatar mendelmunkis commented on May 26, 2024

Too many configuration options is confusing for end users

The problem I see is that if this isn't an option it's begging for the inverse bug on computers with a better placed light sensor

If you're by any chance a developer and are willing to help, it would be great!

I will help where I can, but my code tends not to be that great

Said amount being an advanced config option or possibly some percentage of screen brightness

Percentage of screen brightness is not that bad though, and should work fine.

However the influence of the screen increases as the ambient light drops.
Best (but quite obviously impractical) would be to turn of the screen before sampling.

from clight.

FedeDP avatar FedeDP commented on May 26, 2024

The problem I see is that if this isn't an option it's begging for the inverse bug on computers with a better placed light sensor

Yes, obviously.

I will help where I can, but my code tends not to be that great

It would be great! I'll help you whenever you ask :)

However the influence of the screen increases as the ambient light drops.
Best (but quite obviously impractical) would be to turn of the screen before sampling.

Yes. Moreover to correctly compute screen backlight compensations we need to know screen size too. This gets very complex. May be a small config option "backlight_pct_compensation" would help more while being simple (defaults to 0.0).

from clight.

mendelmunkis avatar mendelmunkis commented on May 26, 2024

(defaults to 0.0).

Did you specifically want a float here? Is a percentage not granular enough?

from clight.

FedeDP avatar FedeDP commented on May 26, 2024

Did you specifically want a float here? Is a percentage not granular enough?

It would be a float used as percentage (ie: 0.1 -> 10%), as Clight always does for its config options.

from clight.

mendelmunkis avatar mendelmunkis commented on May 26, 2024

OK. Sorry, I should have read the config files more carefully.

from clight.

FedeDP avatar FedeDP commented on May 26, 2024

No problem! :)

from clight.

mendelmunkis avatar mendelmunkis commented on May 26, 2024

Btw when screen backlight is low, keyboard backlight is high, thus we should compute it too when doing our correction.

Most cases I have seen either have keyboard light fixed or user adjusted not automatic. Given as it's not directly Clight controlled I think it makes sense to treat it as part of ambient

from clight.

mendelmunkis avatar mendelmunkis commented on May 26, 2024

Is there a particular order to the options in the config file?

from clight.

FedeDP avatar FedeDP commented on May 26, 2024

Most cases I have seen either have keyboard light fixed or user adjusted not automatic. Given as it's not directly Clight controlled I think it makes sense to treat it as part of ambient

Well, indeed Clight does control keyboard backlight where it is supported (through UPower) :)

Is there a particular order to the options in the config file?

Well, order is specified by headers (ie: TIMEOUTS, GAMMA, etc etc); there is no weighted order though.

from clight.

mendelmunkis avatar mendelmunkis commented on May 26, 2024

Btw when screen backlight is low, keyboard backlight is high, thus we should compute it too when doing our correction

Is it better to have it as a separate option or have it calculated into backlight brightness?

from clight.

FedeDP avatar FedeDP commented on May 26, 2024

Btw, sorry if this sounds stupid...

On laptops with poorly placed webcams the screen and keyboard back-lights can fool clight into believing that the ambient light level is higher than it is.

Can't you just change backlight curve to be more "conservative", ie: on higher ambient brightness, set lower backlight levels?

from clight.

mendelmunkis avatar mendelmunkis commented on May 26, 2024

Can't you just change backlight curve to be more "conservative", ie: on higher ambient brightness, set lower backlight levels?

What happens in actual high ambient light?

from clight.

FedeDP avatar FedeDP commented on May 26, 2024

Well you can filter very high ambient light levels setting correct backlight level, something like:
[ 0.0, 0.12, 0.24, 0.37, 0.51, 0.64, 0.70, 0.82, 0.93, 0.97, 1.0 ];
Note how highest values are left unchanged from default values, while lowest values are slightly lowered to take into account screen + keyboard lights.

Btw using a "backlight_pct_compensation" option would have same effect.

from clight.

mendelmunkis avatar mendelmunkis commented on May 26, 2024

While not perfect that does pretty much solve the issue.
It's a good thing that not everyone always sees the most complicated answer.

from clight.

FedeDP avatar FedeDP commented on May 26, 2024

While not perfect that does pretty much solve the issue.
It's a good thing that not everyone always sees the most complicated answer.

I feel pretty stupid that it took nearly a whole week to come up with such a simple solution...lately i've been quite tired :)

from clight.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.