Bug 487308 - [wish] gamma and brightness ruled by ambient light
Summary: [wish] gamma and brightness ruled by ambient light
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: night color (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-21 07:29 UTC by Philippe ROUBACH
Modified: 2025-01-20 20:32 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe ROUBACH 2024-05-21 07:29:45 UTC
Add the following functions :

Using the webcam
- adapt the gamma to the ambient light
- adapt the brightness to the ambient light

see the Clight project

https://github.com/FedeDP/Clight

Thanks
Comment 1 Nate Graham 2024-05-22 20:05:11 UTC
The right to do this would be with the device's ambient light sensor, if it has one.

Using a camera instead would be problematic for several reasons that I can foresee:
1. Only one app can use the camera at a time, so this would block the camera for all other apps with more legitimate use cases for it.
2. On devices with a little light that gets activated while the camera is recording, the light would always be on, habituating users to see that light as normal, which defeats the purpose of it.

So I don't think we can do this, sorry.
Comment 2 Philippe ROUBACH 2024-05-23 07:35:09 UTC
I use clight for many years.

>> 1. Only one app can use the camera at a time, so this would block the camera for all other apps with more legitimate use cases for it.

With clight the camera is not used permanently.
With clight, I never experiment any camera sharing problem with Skype for example.

>> On devices with a little light that gets activated while the camera is recording, the light would always be on, habituating users to see that light as normal, which defeats the purpose of it.

With clight the camera is not used permanently.

Please you must explore the tech used by clight before saying it's impossible.

* clight also can use light sensor, but few PC monitors get a light sensor.
Comment 3 Zamundaaa 2024-05-23 14:27:22 UTC
Adjusting the backlight brightness and whitepoint of the screen is something I plan to implement with sensors meant for that purpose (like on the Framework laptops, the Steam Deck and most phones); once that's done, we could try doing it with the camera as well.

> Only one app can use the camera at a time, so this would block the camera for all other apps with more legitimate use cases for it.
Pipewire is fixing that problem afaik, so it shouldn't be a problem, at least not in the long term.

I agree that the privacy light thing is an issue though, so this would have to be opt-in, at least on laptops. Power usage might also be an issue, we'll just have to test it.