Bug 491719

Summary: Brightness is reduced unintentionally when monitor does Pixel Refresh or is reconnected
Product: [Plasma] kwin Reporter: Lukas Frank <lukasfrank03>
Component: output configurationAssignee: KWin default assignee <kwin-bugs-null>
Status: REPORTED ---    
Severity: normal CC: aoeui, jpetso, markg85, natalie_clarius, nate, samu.tagliacozzo, xaver.hugl
Priority: NOR    
Version First Reported In: 6.2.5   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: kwinoutput and UI in original 100% brightness and after reconnecting the display cable
Manual Pixel Refresh

Description Lukas Frank 2024-08-14 14:10:22 UTC
SUMMARY
The software brightness is reduced when my OLED Monitor comes out of a Pixel-Refresh or is reconnected.
This is an issue for OLED Monitors that automatically do Pixel Refresh and other Monitors that get regularly reconnected.

STEPS TO REPRODUCE
0. Set brightness to 100%
1. Unplug display cable
2. Reconnect display cable
3. Observe changed brightness

OBSERVED RESULT
Brightness changes unexpectedly

EXPECTED RESULT
Preferably brightness stays the same or alternatively brightness is set to full 100%.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Comment 1 Jakob Petsovits 2024-08-27 09:07:55 UTC
Moved to KWin which is responsible for storing and applying software brightness.
Comment 2 samu.tagliacozzo 2024-08-27 21:05:44 UTC
Idk if can help, but on my old screens of my pc if I log out KDE try to lower the brightness and never restore the 100% brightness
Comment 3 Zamundaaa 2024-09-05 13:02:12 UTC
Please attach ~/.config/kwinoutputconfig.json with the brightness at a 100%, and then again after triggering the issue
Comment 4 Lukas Frank 2024-09-05 15:28:23 UTC
Created attachment 173348 [details]
kwinoutput and UI in original 100% brightness and after reconnecting the display cable

kwinoutput and UI in original 100% brightness and after reconnecting the display cable
Comment 5 Lukas Frank 2024-09-05 15:32:01 UTC
The kwinoutputconfig.json file shows no difference after reconnecting. The actual screen brightness stays the same, but the UI brightness got set from 100% to 1% by reconnecting (see attachment AFTER.png in Archiv.tar.gz). After reboot the brightness was back to 100% again, but in other cases it was permanently decreased. I do not know why it did not happen this time.
Comment 6 Lukas Frank 2024-09-05 15:52:12 UTC
Created attachment 173349 [details]
Manual Pixel Refresh

If instead I do a manual pixel refresh with the monitor, I do get the same brightness, but the refresh rate changed from 165 to 100 Hz in kwinoutputconfig.json and the UI.
Comment 7 Bug Janitor Service 2024-09-20 03:47:01 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 8 Jakob Petsovits 2024-09-20 09:50:39 UTC
Back to REPORTED status as kwinoutputconfig.json before and after have been provided.
Comment 9 Mark 2025-01-15 14:23:34 UTC
I "think" i suffer from the same issue but with the opposite effect.
My monitor, when plugged in, goes to full brightness. Also when powered off/on.

Debugging should be easy. Grab a laptop, latest KDE/Plasma with Wayland session (this problem doesn't occur under X11) and an external monitor. Put your external monitor as primary (laptop monitor off, external monitor on). Change your monitor brightness on the monitor itself to something that isn't 100%. Turn off the monitor and back on, now it's at 100% again.

I'm running 6.2.5 (and took the liberty to update that in this bug too). 

I'm guessing the cause of this issue is the same as what Lukas reported so the fix probably fixes both issues.
I vaguely remember there to be a fix recently where brightness settings were not exclusive to laptops anymore but i can't quite find where i read that. I'll report back when i find it.
Comment 10 Zamundaaa 2025-01-15 14:29:39 UTC
(In reply to Mark from comment #9)
> Debugging should be easy. Grab a laptop, latest KDE/Plasma with Wayland
> session (this problem doesn't occur under X11) and an external monitor. Put
> your external monitor as primary (laptop monitor off, external monitor on).
> Change your monitor brightness on the monitor itself to something that isn't
> 100%. Turn off the monitor and back on, now it's at 100% again.
You need to set the brightness in Plasma, not on the monitor. In your case it's bug 494497.

In this case though the output config already contains the desired value, but it doesn't get applied somehow.
Comment 11 Mark 2025-01-15 14:38:50 UTC
Ahh, here it is! For reference :)
https://blogs.kde.org/2024/09/04/brightness-controls-for-all-your-displays/

Thank you Zamundaaa for the pointer, will reply there instead.