Bug 481280

Summary: Turning off Night Color mode in Plasma 6 freezes the screen
Product: [Applications] systemsettings Reporter: Henrique <account+kde>
Component: kcm_nightcolorAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: fanzhuyifan, kwin-bugs-null
Priority: NOR Keywords: qt6
Version First Reported In: 5.93.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Henrique 2024-02-12 23:09:58 UTC
SUMMARY
So i installed KDE6 through the [kde-unstable] repo in Arch and as i had Night Color set to turn on after sunset previously, the new session had it activated. Some time after i decided to turn it off when i did so, it froze the session. I tried it a few more times but every single time, it freezes everything and there's no difference if the attempt to turn it off is done through the applet on the panel or the settings.

STEPS TO REPRODUCE
1. Have Night Color mode activated
2. Try to turn it off either through the applet or the System Settings

OBSERVED RESULT
Turning the setting off freezes the session.

EXPECTED RESULT
Color temperature should change to neutral/normal and Night Color should be set as off.

SOFTWARE/OS VERSIONS

Operating System: Arch Linux 
KDE Plasma Version: 5.93.0
KDE Frameworks Version: 5.249.0
Qt Version: 6.7.0
Kernel Version: 6.7.4-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × AMD Ryzen 5 3400G with Radeon Vega Graphics
Memory: 15,5 GiB of RAM
Graphics Processor: AMD Radeon RX 6600 XT

ADDITIONAL INFORMATION
Comment 1 fanzhuyifan 2024-02-13 04:31:07 UTC
Thank you for your bug report!

When your session freezes, would it be possible to switch to a virtual terminal using Ctrl+Alt+F3 and see whether kwin_wayland is still using the CPU? If so, could you attach a gdb instance to it and see where it is stuck at?

Alternately, you could try ssh'ing into the machine when you encounter the graphical freezes.
Comment 2 Henrique 2024-02-13 12:26:28 UTC
(In reply to fanzhuyifan from comment #1)
> Thank you for your bug report!
> 
> When your session freezes, would it be possible to switch to a virtual
> terminal using Ctrl+Alt+F3 and see whether kwin_wayland is still using the
> CPU? If so, could you attach a gdb instance to it and see where it is stuck
> at?
> 
> Alternately, you could try ssh'ing into the machine when you encounter the
> graphical freezes.

Thank for your response. I couldn't move to another tty nor could i ssh from another device.

I looked into the last boot's journalctl output with journalclt -b-1 and found an error that i thought could be related: 

fev 13 09:05:41 user systemsettings[4005]: Failed to load GeolocationProvider: "/usr/lib/qt6/plugins/plasma5support/geolocationprovider/plasma-geolocation-gps.so" "Could not load plugin from /usr/lib/qt6/plugins/plasma5support/geolocationprovider/plasma-geolocation-gps.so: Cannot load library /usr/lib/qt6/plugins/plasma5support/geolocationprovider/plasma-geolocation-gps.so: (libgps.so.30: não é possível abrir arquivo compartilhado: Arquivo ou diretório inexistente)
fev 13 09:05:41 user systemsettings[4005]: "location"

I then installed gpsd and it's now working properly. Seems like gpsd should be a dependency for plasma6? I checked /var/log/pacman.log and it doesn't seem like that package had been installed or uninstalled before so this must be a new thing.
Comment 3 fanzhuyifan 2024-02-13 16:15:00 UTC
(In reply to Henrique from comment #2)
> (In reply to fanzhuyifan from comment #1)
> > Thank you for your bug report!
> > 
> > When your session freezes, would it be possible to switch to a virtual
> > terminal using Ctrl+Alt+F3 and see whether kwin_wayland is still using the
> > CPU? If so, could you attach a gdb instance to it and see where it is stuck
> > at?
> > 
> > Alternately, you could try ssh'ing into the machine when you encounter the
> > graphical freezes.
> 
> Thank for your response. I couldn't move to another tty nor could i ssh from
> another device.
> 
> I looked into the last boot's journalctl output with journalclt -b-1 and
> found an error that i thought could be related: 
> 
> fev 13 09:05:41 user systemsettings[4005]: Failed to load
> GeolocationProvider:
> "/usr/lib/qt6/plugins/plasma5support/geolocationprovider/plasma-geolocation-
> gps.so" "Could not load plugin from
> /usr/lib/qt6/plugins/plasma5support/geolocationprovider/plasma-geolocation-
> gps.so: Cannot load library
> /usr/lib/qt6/plugins/plasma5support/geolocationprovider/plasma-geolocation-
> gps.so: (libgps.so.30: não é possível abrir arquivo compartilhado: Arquivo
> ou diretório inexistente)
> fev 13 09:05:41 user systemsettings[4005]: "location"
> 
> I then installed gpsd and it's now working properly. Seems like gpsd should
> be a dependency for plasma6? I checked /var/log/pacman.log and it doesn't
> seem like that package had been installed or uninstalled before so this must
> be a new thing.

gpsd is already listed as an optional dependency for arch linux. I cannot reproduce the freeze after uninstalling gpsd on Arch Linux with plasma master build.
Comment 4 Henrique 2024-02-13 16:31:30 UTC
(In reply to fanzhuyifan from comment #3)
> (In reply to Henrique from comment #2)
> > (In reply to fanzhuyifan from comment #1)
> > > Thank you for your bug report!
> > > 
> > > When your session freezes, would it be possible to switch to a virtual
> > > terminal using Ctrl+Alt+F3 and see whether kwin_wayland is still using the
> > > CPU? If so, could you attach a gdb instance to it and see where it is stuck
> > > at?
> > > 
> > > Alternately, you could try ssh'ing into the machine when you encounter the
> > > graphical freezes.
> > 
> > Thank for your response. I couldn't move to another tty nor could i ssh from
> > another device.
> > 
> > I looked into the last boot's journalctl output with journalclt -b-1 and
> > found an error that i thought could be related: 
> > 
> > fev 13 09:05:41 user systemsettings[4005]: Failed to load
> > GeolocationProvider:
> > "/usr/lib/qt6/plugins/plasma5support/geolocationprovider/plasma-geolocation-
> > gps.so" "Could not load plugin from
> > /usr/lib/qt6/plugins/plasma5support/geolocationprovider/plasma-geolocation-
> > gps.so: Cannot load library
> > /usr/lib/qt6/plugins/plasma5support/geolocationprovider/plasma-geolocation-
> > gps.so: (libgps.so.30: não é possível abrir arquivo compartilhado: Arquivo
> > ou diretório inexistente)
> > fev 13 09:05:41 user systemsettings[4005]: "location"
> > 
> > I then installed gpsd and it's now working properly. Seems like gpsd should
> > be a dependency for plasma6? I checked /var/log/pacman.log and it doesn't
> > seem like that package had been installed or uninstalled before so this must
> > be a new thing.
> 
> gpsd is already listed as an optional dependency for arch linux. I cannot
> reproduce the freeze after uninstalling gpsd on Arch Linux with plasma
> master build.

hmm, interesting. Well, that's all the information i got and the issue is solved on my end after installing gpsd. Not sure what could be the difference between your setup and mine to cause. Anyway, as you can't reproduce it and it's solved here, the issue can be marked as resolved. 

Thank you @fanzhuyifan
Comment 5 fanzhuyifan 2024-02-13 16:39:16 UTC
(In reply to Henrique from comment #4)
> hmm, interesting. Well, that's all the information i got and the issue is
> solved on my end after installing gpsd. Not sure what could be the
> difference between your setup and mine to cause. Anyway, as you can't
> reproduce it and it's solved here, the issue can be marked as resolved. 

Thanks! Feel free to reopen if you encounter this issue again.