Bug 460902 - The screen flickers while dimming when turning off the screen.
Summary: The screen flickers while dimming when turning off the screen.
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.26.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-23 19:23 UTC by Andrej Halveland
Modified: 2022-11-21 23:54 UTC (History)
2 users (show)

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


Attachments
Video demonstration. (3.15 MB, video/mp4)
2022-10-23 19:25 UTC, Andrej Halveland
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrej Halveland 2022-10-23 19:23:25 UTC
There is like 70% chance when turning the screen off by either using the "Turn off screen" shortcut or when using 
> kscreen-doctor --dpms off
(and probably also when letting the screen turn itself off after some time) causes the screen to flicker while the screen is dimming.

STEPS TO REPRODUCE
1.  Use "kscreen-doctor --dpms off" to turn the screen off.

OBSERVED RESULT
While dimming the screen flickers.

EXPECTED RESULT
Smooth transition from the screen being on to completely turning off.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.26.1
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6
Kernel Version: 6.0.2-zen1-1-zen
Graphics Platform: Wayland
Processors: AMD Ryzen 9 4900HS 8-Core Processor
Memory:  16GB of RAM
Graphics Processor: Integrated: Vega 8     Dedicated: NVIDIA GeForce RTX 2060 Max-Q
Manufacturer: ASUS (Zephyrus G15 GA502IV)

ADDITIONAL INFORMATION
This is not a new regression, this is at least a few releases old.
Comment 1 Andrej Halveland 2022-10-23 19:25:30 UTC
Created attachment 153150 [details]
Video demonstration.
Comment 2 Zamundaaa 2022-10-25 14:38:39 UTC
Can confirm
Comment 3 Bug Janitor Service 2022-10-25 15:35:48 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/3115
Comment 4 Zamundaaa 2022-10-26 10:16:24 UTC
Git commit f6d14f1b44024af910718c6d5b4e29939914e871 by Xaver Hugl.
Committed on 26/10/2022 at 09:52.
Pushed by zamundaaa into branch 'master'.

effects/kscreen: don't stop effect when fade out animation is done

The screen needs to stay black until it gets enabled again, otherwise
slight timing differences can cause the screen to turn on full brightness
again immediately before turning off.

M  +2    -2    src/backends/drm/drm_output.cpp
M  +3    -1    src/effects/kscreen/kscreen.cpp

https://invent.kde.org/plasma/kwin/commit/f6d14f1b44024af910718c6d5b4e29939914e871
Comment 5 Andrej Halveland 2022-11-19 21:45:09 UTC
I believe this wasn't pushed into the "Plasma/5.26" branch?
Comment 6 Zamundaaa 2022-11-21 16:24:59 UTC
Git commit b7f286f12b8e759449858bfa0ead7e2a9714bdf9 by Xaver Hugl.
Committed on 21/11/2022 at 16:24.
Pushed by zamundaaa into branch 'cherry-pick-f6d14f1b'.

effects/kscreen: don't stop effect when fade out animation is done

The screen needs to stay black until it gets enabled again, otherwise
slight timing differences can cause the screen to turn on full brightness
again immediately before turning off.


(cherry picked from commit f6d14f1b44024af910718c6d5b4e29939914e871)

M  +2    -2    src/backends/drm/drm_output.cpp
M  +3    -1    src/effects/kscreen/kscreen.cpp

https://invent.kde.org/plasma/kwin/commit/b7f286f12b8e759449858bfa0ead7e2a9714bdf9
Comment 7 Zamundaaa 2022-11-21 23:54:25 UTC
Git commit 45c2530565c209ccbbeeb20b33a8cdc14a48703c by Xaver Hugl.
Committed on 21/11/2022 at 17:52.
Pushed by zamundaaa into branch 'Plasma/5.26'.

effects/kscreen: don't stop effect when fade out animation is done

The screen needs to stay black until it gets enabled again, otherwise
slight timing differences can cause the screen to turn on full brightness
again immediately before turning off.
(cherry picked from commit f6d14f1b44024af910718c6d5b4e29939914e871)

M  +2    -2    src/backends/drm/drm_output.cpp
M  +3    -1    src/effects/kscreen/kscreen.cpp

https://invent.kde.org/plasma/kwin/commit/45c2530565c209ccbbeeb20b33a8cdc14a48703c