Bug 502122 - Automatic Display Brightness on hardware with a light sensor
Summary: Automatic Display Brightness on hardware with a light sensor
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Power management & brightness (other bugs)
Version First Reported In: 6.3.3
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-28 11:32 UTC by Tobias G.
Modified: 2025-12-18 05:04 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.6.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias G. 2025-03-28 11:32:00 UTC
SUMMARY
I own a Framework 13 AMD and on GNOME, automatic display brightness worked oob. It would be great if KDE supported it as well. There are 3rd-party tools like https://github.com/mikhail-m1/illuminanced that might work (manually writing to /sys/class/backlight/amdgpu_bl1/brightness works), but I haven't tested it yet.
It would be great if KDE could detect the sensor and adapt screen brightness automatically.

STEPS TO REPRODUCE
1. own laptop with light sensor
2. change environemnt
3. observe

OBSERVED RESULT
screen brightness doesn't change

EXPECTED RESULT
screen brightness changes based on illumination of the environment

SOFTWARE/OS VERSIONS
Operating System: Yuga Linux 20250326
KDE Plasma Version: 6.3.3
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2
Kernel Version: 6.13.7-1-yuga (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 7840U w/ Radeon  780M Graphics
Memory: 30.7 GiB of RAM
Graphics Processor: AMD Radeon 780M
Manufacturer: Framework
Product Name: Laptop 13 (AMD Ryzen 7040Series)
System Version: A7

ADDITIONAL INFORMATION
While this is Yuga Linux, it uses openSUSE Tumbleweed repos and packages
Comment 1 Nate Graham 2025-03-28 23:36:13 UTC
I'm surprised not to find an existing bug report for this!
Comment 2 Melanie Scheirer 2025-11-26 14:55:39 UTC
I also got a FW13 and ran into this. I think a general ability to do dynamic display brightness would be cool so over the holidays when I have some free time I'll dig into how night color is doing it and try to wire this up.

My first pass idea would be to rework the kcm and plasmoid to show slider bars for brightness and color temperature and have toggles for automatic brightness and color temp.  In the config menu you would have separated picker for doing dynamic brightness and color temperature with off, by location (auto or manual), or by light sensor (when available) and each has a bar for setting the night and day brightness and color temp.

If a user has auto on and manually sets the brightness or color temp in the widget it toggles off auto until they toggle it back on, at which point the brightness auto-adjusts again. Is there color language in the design guide to indicate a tweakable bar setting is in "automatic" by its color? The other option is to require auto be turned off by the toggle before being able to change the settings but that seems obtuse.

Maybe add a button to do unified brightness vs per-display brightness / color temp, right now color temp is all screens but brightness is per screen. Unified brightness is harder because not all screens support DDC and different models have different brightness ranges but that already happens with color temp and nobodys really complained from what I've seen about it being unified.

Likewise re: setting manual brightness / color temp, maybe a timeout setting in the settings for resuming automatic mode that could be like in an hour or next day. Seems really niche to add a timer event just for that though.
Comment 3 Zamundaaa 2025-12-17 15:53:29 UTC
Git commit 0570b3329a5d37852106adc710146c7d5a84bfe7 by Xaver Hugl.
Committed on 17/12/2025 at 15:11.
Pushed by zamundaaa into branch 'master'.

workspace: add support for automatic brightness adjustments

The brightness setting of each output with auto brightness enabled is adjusted
automatically based on light sensor measurements.
The curve that decides which setting the display should be configured towards
is relatively simple: It's just 6 lux values, each for a 20% brightness step.

When the user adjusts the brightness manually, with either slider or brightness
keys, the curve is adjusted automatically to match. That adjustment is super
basic right now, but it seems to be good enough for the feature to be usable,
and can be improved later on.

M  +15   -0    src/backends/drm/drm_output.cpp
M  +2    -0    src/backends/drm/drm_output.h
M  +11   -1    src/compositor.cpp
M  +105  -0    src/core/backendoutput.cpp
M  +41   -0    src/core/backendoutput.h
M  +17   -0    src/core/outputconfiguration.h
M  +30   -0    src/outputconfigurationstore.cpp
M  +3    -0    src/outputconfigurationstore.h
M  +1    -0    src/utils/CMakeLists.txt
A  +70   -0    src/utils/lightsensor.cpp     [License: GPL(v2.0+)]
A  +41   -0    src/utils/lightsensor.h     [License: GPL(v2.0+)]
M  +28   -1    src/wayland/outputdevice_v2.cpp
M  +1    -0    src/wayland/outputdevice_v2.h
M  +14   -1    src/wayland/outputmanagement_v2.cpp
M  +51   -14   src/workspace.cpp
M  +3    -0    src/workspace.h

https://invent.kde.org/plasma/kwin/-/commit/0570b3329a5d37852106adc710146c7d5a84bfe7