Bug 470106

Summary: brightness-control slider shows different percentage than OSD
Product: [Plasma] Powerdevil Reporter: slartibart70
Component: generalAssignee: ratijas <me>
Status: ASSIGNED ---    
Severity: normal CC: jpetso, kde, me, natalie_clarius, nate
Priority: NOR    
Version: 5.27.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description slartibart70 2023-05-22 06:43:39 UTC
Laptop screen and connected 4K (DP) monitor

Problem:
"Battery and Brightness" in systemtray shows a different brightness-percentage than set on laptop screen.
Modifying the brightness-slider then 'suddenly jumps' to a way too dark setting
I need to use the hardware-keys (Fn-*) to set the brightness up again to a usable state.
Still, the brightness-slider is not in sync with the OSD (OSD ~65%, brightness-slider ~45%)

This was working properly already but seems to be a regression?

Operating System: Fedora Linux 37
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9
Kernel Version: 6.3.3-100.fc37.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-7820HQ CPU @ 2.90GHz
Memory: 31,1 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 630
Manufacturer: LENOVO
System Version: ThinkPad T470p
Comment 1 ratijas 2023-05-23 16:23:28 UTC
I also noticed that moving slider fast can get it out of sync or revert (sync) to an intermediate state. So I trust your bug report even without screenshots (:

Probably backend needs some job buffering and proper ordering. I've done something like that in my personal DDC/CI brightness control app, so I should take a look at it in Plasma powerdevil too.
Comment 2 Bug Janitor Service 2023-08-13 18:38:52 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3178
Comment 3 Jakob Petsovits 2024-03-19 05:49:11 UTC
New merge request @ https://invent.kde.org/plasma/powerdevil/-/merge_requests/342.
It fixes the brightness slider lagginess and makes the slider jump way less, still possible but negligible in practice.

I have deeply pondered what this means for the slider going out of sync with the OSD. Quick testing now seems fine in terms of showing the right OSD values after quickly dragging the brightness slider. It may just all be a question of "how much time do you give powerdevil to apply the new brightness slider value before pressing the brightness key". In which case, the answer is "it needs a lot less time to apply the new brightness than it did before (but there is still a little delay theoretically)".
Comment 4 Bug Janitor Service 2024-05-08 21:26:31 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4294
Comment 5 Zamundaaa 2024-05-08 21:53:59 UTC
Git commit 2f7649edc535c68e1906c2dd3b14152e0ed9f0b9 by Xaver Hugl.
Committed on 08/05/2024 at 21:41.
Pushed by zamundaaa into branch 'master'.

applets/brightness: fix max brightness change notification

The wrong signal name was used, which meant the maximum brightness value of the
slider and the actual maximum powerdevil uses could get out of sync

M  +1    -1    applets/brightness/plugin/screenbrightnesscontrol.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/2f7649edc535c68e1906c2dd3b14152e0ed9f0b9