Bug 495167 - Frame rate drops with Night Light and changing brightness
Summary: Frame rate drops with Night Light and changing brightness
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: platform-drm (show other bugs)
Version: 6.2.1
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-22 02:56 UTC by player one
Modified: 2024-11-05 22:10 UTC (History)
4 users (show)

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


Attachments
Video with frame rate drops with Night Light (1.89 MB, video/mp4)
2024-10-22 02:56 UTC, player one
Details

Note You need to log in before you can comment on or make changes to this bug.
Description player one 2024-10-22 02:56:26 UTC
Created attachment 175099 [details]
Video with frame rate drops with Night Light

After update to plasma 6.2.1.1 and with night light I have frame rate drops.With plasma 6.2.0 no issue. 


STEPS TO REPRODUCE
1. Turn on  "Night light" 
2. Change the brightness

OBSERVED RESULT

The frame rate drops from 60 to 30 or from 120 to 40-50.


EXPECTED RESULT

No frame rate drops


SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 40
KDE Plasma Version: 6.2.1 (6.2.1.1)
KDE Frameworks Version: 6.7.0
Qt Version: 6.7.2
Kernel Version: 6.11.3-200.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 8 × 11th Gen Intel® Core™ i5-1135G7 @ 2.40GHz
Memory: 38.9 GiB of RAM
Graphics Processor: Mesa Intel® Xe Graphics
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: ASUS EXPERTBOOK B1400CEAEY_B1400CEAE
System Version: 1.0


ADDITIONAL INFORMATION
1. Connected to external monitor and have same issue
2. Used other ICC and have same issue
3. Created new user and have same issue
Comment 1 Zamundaaa 2024-10-26 01:29:49 UTC

*** This bug has been marked as a duplicate of bug 480799 ***
Comment 2 Zamundaaa 2024-10-26 01:32:40 UTC
oops, that was the wrong one. I didn't see the one I was actually thinking about, let's just track it here then.
Comment 3 Zamundaaa 2024-10-26 01:32:54 UTC
When the brightness stays constant, is performance okay?

> Used other ICC and have same issue
Does it also happen without an ICC profile?
Comment 4 player one 2024-10-26 06:15:52 UTC
Intresting(In reply to Zamundaaa from comment #3)
> When the brightness stays constant, is performance okay?
> 
> > Used other ICC and have same issue
> Does it also happen without an ICC profile?

I have no issues with the ICC profile. I had previously only tried the built-in one. I upgraded to Plasma 6.2.2 and still see the same problem. There is no frame drop if you don't change the brightness. Here are the results with the ICC profile:

So I have the following behavior:

1. Without ICC - No night mode - Brightness change - no frame drop
2. Without ICC - With night mode - Brightness change - frame drop

3. With built-in ICC - No night mode - Brightness change - No frame drop
4. With built-in ICC - With night mode - brightness change - frame drop


5. With any ICC - No night mode - Brightness change - No drop

6. With ICC sRGB - With night mode - Brightness change - no frame drop

7. With ICC AdobeRGB1998 - With night mode - Brightness change - no frame drop

8. With ICC Bluish - With night mode - Brightness change - no frame drop

9. With ICC Rec709 - With night mode - Brightness change - No frame drop

10. With ICC SMPTE-C-RGB - With night mode - Brightness change - no frame drop

!!! 11. With ICC x11-colors.icc - With night mode - Brightness change - frame drop
Comment 5 Zamundaaa 2024-10-29 23:25:19 UTC
Okay, I can confirm that there are some frame drops. It's not very pronounced here, but still measurable.
It's almost certainly caused by calculating or by programming lookup tables - if you set an ICC profile that KWin successfully loads, then a shader is used instead, so it doesn't happen there.
Comment 6 Nate Graham 2024-11-05 22:10:44 UTC
I can also reproduce this issue on my device:

Processors: 16 × AMD Ryzen 7 7840U w/ Radeon™ 780M Graphics
Memory: 14.9 GB of RAM
Graphics Processor: AMD Radeon 780M

When I change the brightness via keyboard button during the night light transition period, it does not respond smoothly.