Bug 482143 - [Wayland] Night Light Doesn't Work
Summary: [Wayland] Night Light Doesn't Work
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: platform-drm (show other bugs)
Version: 6.0.0
Platform: Neon Linux
: NOR major
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6, wayland
Depends on:
Blocks:
 
Reported: 2024-03-01 12:21 UTC by Angel Skyheart
Modified: 2024-03-13 14:43 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Angel Skyheart 2024-03-01 12:21:04 UTC
SUMMARY
***
In System Settings>Colors & Themes, there is a setting called Night Light. It flat out does not work. At all. No matter what settings I've set it to, I do not see a preview of the screen getting warmer/darker or brighter/lighter when I slide the light temperature bars. I've tried every option under 'switching times' and there is no difference between any of them and 'always off'. 
***
STEPS TO REPRODUCE
1. Open System Settings
2. Scroll down to Appearance & Style and select Colors & Themes
3. Under Global Theme, select Night Light
4. Turn on the Night Light

OBSERVED RESULT
Nothing happened.

EXPECTED RESULT
Screen would change and get darker or lighter depending on what the slider is set to and what the time settings were.

SOFTWARE/OS VERSIONS
OS: KDE Neon 6.0
KDE Plasma Version: 6.0.0
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernal Version: 6.5.0-21-generic (64 bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
Processors: 6 x Intel Core i5-8600K CUP @ 3.60 GHz
Memory: 62.7 GiB of RAM
Graphics Processor: NV134
GPU: NVidia GTX 1080
Comment 1 Patrick Silva 2024-03-01 14:28:22 UTC
Night Light is not working on Arch Linux too. Changes in the KCM take no effect.

Operating System: Arch Linux 
KDE Plasma Version: 6.0.0
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Graphics Platform: Wayland
Comment 2 Nate Graham 2024-03-01 21:15:51 UTC
Hmm, all activation modes are working as expected for me.
Comment 3 Harald Sitter 2024-03-01 22:52:53 UTC
Works for me on neon.

Could it be that ddcutil is messing with the color configuration? (I know nothing about how night light works so I am just saying words that sound related XD)
Comment 4 Nate Graham 2024-03-01 23:59:19 UTC
Does everyone affected use an NVIDIA GPU?
Comment 5 Patrick Silva 2024-03-02 00:37:57 UTC
Intel iGPU here.
Comment 6 Angel Skyheart 2024-03-02 12:20:49 UTC
This isn't even the only issue I'm having with this OS, but it's one of only two problems that are consistent. The second one is the fact my restart, shutdown, and log off buttons in the start menu don't work so I had to create shell commands named restart and shutdown on the desktop to bypass it... >.<
Comment 7 Nate Graham 2024-03-02 14:11:20 UTC
(In reply to Angel Skyheart from comment #6)
> This isn't even the only issue I'm having with this OS, but it's one of only
> two problems that are consistent. The second one is the fact my restart,
> shutdown, and log off buttons in the start menu don't work so I had to
> create shell commands named restart and shutdown on the desktop to bypass
> it... >.<
That's Bug 481938, which was fixed in Neon's packaging yesterday. I'd strongly recommend doing a full update and then rebooting, which will fix that issue and many others too. Possibly this one. Can you do that?
Comment 8 Angel Skyheart 2024-03-02 14:55:47 UTC
(In reply to Nate Graham from comment #7)
> (In reply to Angel Skyheart from comment #6)
> That's Bug 481938, which was fixed in Neon's packaging yesterday. I'd
> strongly recommend doing a full update and then rebooting, which will fix
> that issue and many others too. Possibly this one. Can you do that?

Yeah I can do that. If I'm lucky maybe it'll fix the issue I'm having with Discovery occasionally crashing when I use its search function, then when i try to re-open it, it doesn't show up on desktop though it says it's running in System Monitor, too... I'll let you know the verdict.
Comment 9 Angel Skyheart 2024-03-02 15:05:59 UTC
Had to reboot so I could actually open Discover, and... there was no update. It said everything was up to date. So I went into the terminal, but it said the same thing.

angelskyheart@Azalea:~$ sudo apt upgrade
On KDE neon you should use `pkcon update` to install updates.
If you absolutely must use apt you do have to use dist-upgrade or full-upgrade in place of the upgrade command.
  https://neon.kde.org/faq#command-to-update
Abort.
angelskyheart@Azalea:~$ sudo pkcon update
Getting updates                         [=========================]         
Finished                                [=========================]         
No packages require updating to newer versions.
Comment 10 Angel Skyheart 2024-03-02 15:07:48 UTC
Huh. Despite that, the restart button in the start menu is working though. Maybe I picked up the update last night and forgot about it or something?...
Comment 11 guimarcalsilva 2024-03-02 19:40:02 UTC
It works for me on Neon User Edition with an AMD GPU (Wayland). Maybe it's only a problem with Intel/NVIDIA?
Comment 12 Nate Graham 2024-03-02 21:33:09 UTC
I'm on an all-Intel system and it's working for me.
Comment 13 Raphael Riemann 2024-03-02 22:45:06 UTC
I'm on EndevourOS (Arch extra-testing), wayland, amd rx 6600
night color does nothing (quick test in X11: slider changes colortemp)
Via the tray icon i can adjust brightness, but no the color temperature

I noticed that Colorblindness Correction does not do anything, too.

Color Management lists no Devices

night color was working fine in 5.27
Comment 14 Patrick Silva 2024-03-03 10:45:32 UTC
(In reply to Patrick Silva from comment #1)
> Night Light is not working on Arch Linux too. Changes in the KCM take no
> effect.
> 
> Operating System: Arch Linux 
> KDE Plasma Version: 6.0.0
> KDE Frameworks Version: 6.0.0
> Qt Version: 6.6.2
> Graphics Platform: Wayland

Humm, I have tested a live usb with neon-user-20240303-0009.iso on this computer and Night Light works this time.

Also tested tested linux-lts 6.6.20-1 on Arch Linux and Night Light does also not work with it.
Comment 15 Patrick Silva 2024-03-03 11:10:34 UTC
Om my system Night Light works on X11. All affected users are using Wayland.
Comment 16 Raphael Riemann 2024-03-03 12:43:14 UTC
with neon-testing-20240227-0254.iso live usb nigh light is working, so thats an arch thing or my installation

wayland that is. amd rx 6600


> I noticed that Colorblindness Correction does not do anything, too.
Forget this, its working fine
Comment 17 Aaron Wolf 2024-03-04 04:16:14 UTC
On Wayland here, KDE Neon, Night Light is working
Comment 18 Dim 2024-03-05 11:26:12 UTC
Night light doesn't work.
Neon 6.0.0, Qt 6.6.2.  Kernel: 5.15.0-97-generic (64-bit).  Wayland / NV117
Comment 19 Zamundaaa 2024-03-06 19:16:57 UTC
(In reply to Harald Sitter from comment #3)
> Could it be that ddcutil is messing with the color configuration? (I know
> nothing about how night light works so I am just saying words that sound
> related XD)

Night light is done by KWin on the GPU, either in the scanout hardware if available, or in a shader if not. The display isn't involved.

Can anyone where it doesn't work try forcing the shader fallback? You can do that by setting KWIN_DRM_FORCE_COLOR_MANAGEMENT=1 for KWin
Comment 20 Patrick Silva 2024-03-06 19:29:42 UTC
(In reply to Zamundaaa from comment #19)
> Can anyone where it doesn't work try forcing the shader fallback? You can do
> that by setting KWIN_DRM_FORCE_COLOR_MANAGEMENT=1 for KWin

Your env variable fixes night light on my system.


Operating System: Arch Linux 
KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Graphics Platform: Wayland
Comment 21 Patrick Silva 2024-03-06 19:56:43 UTC
I also has this env variable on my system:

KWIN_DRM_NO_AMS=1

After removing it, night light works even without the env variable from comment 19.
Comment 22 Raphael Riemann 2024-03-06 20:05:06 UTC
(In reply to Patrick Silva from comment #21)
> I also has this env variable on my system:
> 
> KWIN_DRM_NO_AMS=1
> 
> After removing it, night light works even without the env variable from
> comment 19.

thx. same for me.

is  KWIN_DRM_NO_AMS=1 still needed to allow tearing?
Comment 23 Zamundaaa 2024-03-06 20:37:40 UTC
Thanks, that helps narrow it down a lot.

> Is KWIN_DRM_NO_AMS=1 still needed to allow tearing?
Yes.
Comment 24 Bug Janitor Service 2024-03-06 21:10:09 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/5373
Comment 25 Raphael Riemann 2024-03-06 23:58:25 UTC
thx for looking into it, and keep up the good work . )
Comment 26 Zamundaaa 2024-03-07 01:05:50 UTC
Git commit 568f9fb666dd0d3b969419ac2b09542b56cf07a0 by Xaver Hugl.
Committed on 07/03/2024 at 00:50.
Pushed by zamundaaa into branch 'master'.

backends/drm: ignore ctm support on legacy

M  +1    -1    src/backends/drm/drm_pipeline.cpp

https://invent.kde.org/plasma/kwin/-/commit/568f9fb666dd0d3b969419ac2b09542b56cf07a0
Comment 27 Zamundaaa 2024-03-07 12:31:00 UTC
Git commit 29838e1e5bf7514718b77ff4e666b846c0f2d320 by Xaver Hugl.
Committed on 07/03/2024 at 12:22.
Pushed by zamundaaa into branch 'Plasma/6.0'.

backends/drm: ignore ctm support on legacy
(cherry picked from commit 568f9fb666dd0d3b969419ac2b09542b56cf07a0)

M  +1    -1    src/backends/drm/drm_pipeline.cpp

https://invent.kde.org/plasma/kwin/-/commit/29838e1e5bf7514718b77ff4e666b846c0f2d320
Comment 28 Raphael Riemann 2024-03-13 14:43:11 UTC
can confirm, 

works for me on 6.0.2 (arch/extra-testing) without KWIN_DRM_FORCE_COLOR_MANAGEMENT=1