Bug 6537

Summary: KDE Night Color broken due to Nvidia autostart command
Product: Fedora Reporter: Elias <supgesu>
Component: nvidia-settingsAssignee: Nicolas Chauvet <kwizart>
Status: RESOLVED UPSTREAM    
Severity: normal CC: leigh123linux
Priority: P1    
Version: f37   
Hardware: x86_64   
OS: GNU/Linux   
namespace:

Description Elias 2022-12-20 21:11:49 CET
Hi, currently the `nvidia-settings` package does ship an autostart file, which runs after login for every user.
Source: https://github.com/rpmfusion/nvidia-settings/blob/87dc56711e031f98a6360f9ec3b22864c1b45a81/nvidia-settings-user.desktop

This executes the command: `nvidia-settings -l`
which (re)loads the nvidia configuration file.

The problem is that also resets custom color profiles.
If you use Night Color on KDE (should lower blue light at night) this applies a color profile to make everything more red-ish.
However when executing `nvidia-settings -l` the colors are reset to default, making Night Color not work.

What currently happens:
After login on KDE, Night Color works for about a second. After that, the autostart entry from `nvidia-settings` is executed, resetting the colors again.

As a fix I removed `/etc/xdg/autostart/nvidia-settings-user.desktop` from my system and it makes Night Color work (most of the time).

Night Color still sometimes doesn't work after the first login after (re)boot, so there seems to be yet another problem, but removing the autostart entry makes it at least able to work sometimes and from second login on.
Comment 1 Nicolas Chauvet 2022-12-20 21:16:33 CET
It works as appropriate with gnome "night mode" with me.
(unless I run nvidia-settings directly).


You might need to report this issue to nvidia. (and/or KDE desktop team).
Comment 2 Elias 2022-12-20 21:37:31 CET
Just tested on my Gnome install. The load config command does also break Night Light on Gnome.

However for some reason when leaving Night Light enabled in Gnome and re-login it stays on and working. Maybe the autostart entry doesn't run, or runs too early to have an effect on Night Light on Gnome? Not sure.

But manually running `nvidia-settings -l` does reset the colors every time, also on Gnome.

Independent of DEs, just questioning:
Is this autostart command even still needed? Since I removed it I didn't notice any downsides. But maybe this is just on my setup.
Comment 3 leigh scott 2022-12-20 23:44:04 CET
(In reply to Elias from comment #2)

> Independent of DEs, just questioning:
> Is this autostart command even still needed? Since I removed it I didn't
> notice any downsides. But maybe this is just on my setup.


Without autostart nvidia-settings wont apply Xorg settings.
Comment 4 Nicolas Chauvet 2023-01-06 09:43:23 CET
@Elias,

Do you have a KDE report for the issue. KDE dev will have better insight to talk to nvidia than we do. It's not possible for us to disable this settings 


Closing the bug, please report any KDE/nvidia reports here for reference.
Comment 5 Elias 2023-01-08 16:21:39 CET
(In reply to Nicolas Chauvet from comment #4)
> @Elias,
> 
> Do you have a KDE report for the issue. KDE dev will have better insight to
> talk to nvidia than we do. It's not possible for us to disable this settings 
> 
> 
> Closing the bug, please report any KDE/nvidia reports here for reference.

Hi, I found this KDE bug report:
https://bugs.kde.org/show_bug.cgi?id=450288

I'm not 100% sure yet if this is the exact problem I'm seeing since I never experienced this on any other machines, only the one which is on Fedora + Nvidia currently. Not sure yet what the exact full cause is. But the bug report seems similar enough, so I also posted over there and shared a workaround for now.