Bug 511740 - Panel and applets do not change theme automatically when session is ended before day/night transition completes
Summary: Panel and applets do not change theme automatically when session is ended bef...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Day/night schedule (other bugs)
Version First Reported In: 6.5.1
Platform: Arch Linux Linux
: HI normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
: 517598 519292 520550 521500 521730 521918 522274 523823 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-11-07 00:20 UTC by Braelin Michelus
Modified: 2026-08-04 16:01 UTC (History)
13 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.7.4
Sentry Crash Report:


Attachments
Example of broken ui, half breeze dark half breeze light (173.96 KB, image/png)
2026-02-12 10:09 UTC, Domenico
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Braelin Michelus 2025-11-07 00:20:19 UTC
SUMMARY

Automatic theme switching mostly does work, but the panel and its associated widgets will get stuck in the opposite color scheme when the session is ended (via shutdown, restart, or logout) before the transition is completed. Windows are set to the proper color scheme. The effect basically looks like Breeze Twilight, but my color schemes are Breeze Light and Breeze Dark, respectively. Restarting plasma-kded6 temporarily fixes the problem, until the cycle restarts.

STEPS TO REPRODUCE
1. Enable automatic day-night theme switching
2. Wait until theme transition begins
3. End the session before the transition completes

OBSERVED RESULT

Upon login, windows are the proper color scheme, the panel and its widgets are not

EXPECTED RESULT

Both the windows and the panel and its widgets should be the same, proper color scheme based on the day/night cycle

SOFTWARE/OS VERSIONS
Operating System: EmilicOS Linux
KDE Plasma Version: 6.5.1
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0
Graphics Platform: Wayland
Graphics Processor: AMD Radeon Graphics
Comment 1 Vlad Zahorodnii 2025-11-07 07:36:28 UTC
Can you please clarify steps to reproduce? So, say the transition starts at 6:00PM and ends at 6:30PM, if you reboot somewhere between 6:00-6:30PM, your computer is stuck with the wrong theme until the next transition?
Comment 2 Braelin Michelus 2025-11-10 04:03:57 UTC
(In reply to Vlad Zahorodnii from comment #1)
> Can you please clarify steps to reproduce? So, say the transition starts at
> 6:00PM and ends at 6:30PM, if you reboot somewhere between 6:00-6:30PM, your
> computer is stuck with the wrong theme until the next transition?

Sorry for the miscommunication, this is a bit of a difficult one to explain.
Anyway, you are correct.

If the transition begins at 6:00PM and ends at 6:30PM, if I reboot at any point
before the transition is complete, the panel and its applets will remain in the
light theme, while windows will correctly use the dark theme.

Let's say the day-night transition begins at 6:00PM. I shut down my computer at 6:28PM.
I boot my computer again at 7:00PM, the panel and its applets will have the light theme, while windows will have the dark theme.
Comment 3 Domenico 2026-02-12 10:09:45 UTC
Created attachment 189485 [details]
Example of broken ui, half breeze dark half breeze light
Comment 4 Domenico 2026-02-12 10:14:10 UTC
I'm experiencing the same behavior. It occurs when I suspend the laptop at night and then wake it up in the morning.

STEPS TO REPRODUCE:
1) Suspend the system while the dark theme is active.
2) Wake up the system after the scheduled hours when the light theme should be applied.

Operating System: Fedora Linux 43
KDE Plasma Version: 6.5.5
KDE Frameworks Version: 6.22.0
Qt Version: 6.10.1
Kernel Version: 6.18.8-200.fc43.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5700U with Radeon Graphics
Memory: 40 GiB of RAM (37.0 GiB usable)
Graphics Processor: AMD Radeon Graphics
Manufacturer: LENOVO
Product Name: 82KU
System Version: IdeaPad 3 15ALC6
Comment 5 TraceyC 2026-03-24 21:00:31 UTC
*** Bug 517598 has been marked as a duplicate of this bug. ***
Comment 6 TraceyC 2026-04-24 17:01:57 UTC
*** Bug 519292 has been marked as a duplicate of this bug. ***
Comment 7 TraceyC 2026-05-05 22:47:14 UTC
I'm marking this CONFIRMED, since a couple of other users have run into this.
Comment 8 TraceyC 2026-05-26 18:37:58 UTC
*** Bug 520550 has been marked as a duplicate of this bug. ***
Comment 9 Vlad Zahorodnii 2026-06-16 09:33:28 UTC
*** Bug 521500 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2026-06-16 11:16:31 UTC
I can reproduce the issue as described.
Comment 11 Domenico 2026-06-16 11:18:44 UTC
(In reply to Nate Graham from comment #10)
> I can reproduce the issue as described.

Nice
Comment 12 Bug Janitor Service 2026-06-17 06:12:18 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-integration/-/merge_requests/234
Comment 13 greening.felony 2026-06-19 11:31:25 UTC
I don't know if this helps but my workaround is setting up the day/night shift manually by time. By doing so I don't encounter the bug with mixed themes.
Comment 14 Vlad Zahorodnii 2026-06-19 18:04:26 UTC
*** Bug 521730 has been marked as a duplicate of this bug. ***
Comment 15 Vlad Zahorodnii 2026-06-19 18:06:00 UTC
Just in case, I used to see this issue too. But after adding relevant qDebug()s in plasma-integration (I suspect that plasmashell somehow misses global theme changes) and plasma-workspace, I don't encounter it anymore. :/
Comment 16 Vlad Zahorodnii 2026-06-19 18:07:59 UTC
> I suspect that plasmashell somehow misses global theme changes

Because new windows (e.g. config dialogs) of plasmashell still use the dark color scheme, while dolphin and other apps use the light color scheme.
Comment 17 Vlad Zahorodnii 2026-06-22 05:22:11 UTC
*** Bug 521918 has been marked as a duplicate of this bug. ***
Comment 18 ari melody 2026-06-22 17:22:49 UTC
(In reply to greening.felony from comment #13)
> I don't know if this helps but my workaround is setting up the day/night
> shift manually by time. By doing so I don't encounter the bug with mixed
> themes.

Attempted this on my system, unfortunately I still have this issue. Your mileage may vary, though.
Comment 19 Nate Graham 2026-06-27 11:50:37 UTC
*** Bug 522274 has been marked as a duplicate of this bug. ***
Comment 20 Bug Janitor Service 2026-07-02 11:25:59 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/6815
Comment 21 Vlad Zahorodnii 2026-07-02 11:52:42 UTC
Git commit 06098adfb08a051cbe96ff411bf73de15b204382 by Vlad Zahorodnii.
Committed on 02/07/2026 at 11:20.
Pushed by vladz into branch 'master'.

qt6: Skip loading palettes when widget style changes

This is rather to make sense from the current code. The widget style
loads the system palette but it doesn't determine whether the color
scheme is light or dark like other code paths.

When the color scheme changes, we should receive a
org.kde.KGlobalSettings.notifyChange broadcast event with the
PaletteChanged type, so the widget style should be unnecessary.

M  +0    -1    qt6/src/platformtheme/khintssettings.cpp

https://invent.kde.org/plasma/plasma-integration/-/commit/06098adfb08a051cbe96ff411bf73de15b204382
Comment 22 Bug Janitor Service 2026-07-02 12:05:30 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-integration/-/merge_requests/236
Comment 23 Vlad Zahorodnii 2026-07-02 12:17:51 UTC
Git commit f818743d0cb4225b633c487827c23eb74f8e80cd by Vlad Zahorodnii.
Committed on 02/07/2026 at 12:05.
Pushed by vladz into branch 'Plasma/6.7'.

qt6: Skip loading palettes when widget style changes

This is rather to make sense from the current code. The widget style
loads the system palette but it doesn't determine whether the color
scheme is light or dark like other code paths.

When the color scheme changes, we should receive a
org.kde.KGlobalSettings.notifyChange broadcast event with the
PaletteChanged type, so the widget style should be unnecessary.


(cherry picked from commit 06098adfb08a051cbe96ff411bf73de15b204382)

Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>

M  +0    -1    qt6/src/platformtheme/khintssettings.cpp

https://invent.kde.org/plasma/plasma-integration/-/commit/f818743d0cb4225b633c487827c23eb74f8e80cd
Comment 24 Vlad Zahorodnii 2026-07-02 17:45:07 UTC
Git commit 54df28956a5ed4240afcc913b6ad6c3f60f43fd3 by Vlad Zahorodnii.
Committed on 02/07/2026 at 17:04.
Pushed by vladz into branch 'master'.

startkde: Log the global theme that gets applied

This is to help with debugging the issues with automatic global theme
autoswitching.

M  +1    -0    startkde/startplasma.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/54df28956a5ed4240afcc913b6ad6c3f60f43fd3
Comment 25 Bug Janitor Service 2026-07-02 17:48:24 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/6818
Comment 26 Vlad Zahorodnii 2026-07-02 18:13:35 UTC
Git commit 1e181942abcbf96621b0262259bd0404c7d53999 by Vlad Zahorodnii.
Committed on 02/07/2026 at 17:48.
Pushed by vladz into branch 'Plasma/6.7'.

startkde: Log the global theme that gets applied

This is to help with debugging the issues with automatic global theme
autoswitching.


(cherry picked from commit 54df28956a5ed4240afcc913b6ad6c3f60f43fd3)

Co-authored-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>

M  +1    -0    startkde/startplasma.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/1e181942abcbf96621b0262259bd0404c7d53999
Comment 27 Nate Graham 2026-07-09 16:38:21 UTC
I tested this the same way I did before, and can confirm that it's now fixed! Thanks Vlad.
Comment 28 Bug Janitor Service 2026-07-15 06:24:35 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/6842
Comment 29 Vlad Zahorodnii 2026-07-15 06:31:01 UTC
(In reply to Nate Graham from comment #27)
> I tested this the same way I did before, and can confirm that it's now
> fixed! Thanks Vlad.

Unfortunately, I don't think the issue is fully fixed yet. I found a very likely culprit why this bug happened.
Comment 30 Bug Janitor Service 2026-07-15 07:08:58 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/6844
Comment 31 Vlad Zahorodnii 2026-07-15 10:56:42 UTC
Git commit 4a2bf4d8369a265fa00048ab7973a8e0ef1485ea by Vlad Zahorodnii.
Committed on 15/07/2026 at 10:20.
Pushed by vladz into branch 'master'.

kcms/color: Update ColorSchemeHash

startplasma attempts to apply the color scheme in the global theme. It
avoids applying the color scheme again by saving the hash of the current
color scheme.

This creates an issue with automatic global theme switching. For
example, consider the following case:

- the user starts their computer during daylight (the hash of the
  corresponding color scheme is A)
- the user continues using their computer without rebooting until the
  global theme is changed to the dark flavor. This will apply the dark
  color scheme (its hash is B, but it's not written to ColorSchemeHash)
- the user turns off their computer at night
- then the user starts the computer in the morning. startplasma sees
  that the light global theme needs to be applied. It then attempts to
  apply the color scheme. startplasma looks at the hashes and they match
  (A == A). However, that is wrong, the effective applied color scheme
  has hash B.

This change fixes the issue by making the applyScheme() function also
write the hash of the currently applied color scheme.

Our long term goal is to stop updating kdeglobals, but we are not there
yet.

M  +11   -0    kcms/colors/colorsapplicator.cpp
M  +1    -0    startkde/startplasma.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/4a2bf4d8369a265fa00048ab7973a8e0ef1485ea
Comment 32 Vlad Zahorodnii 2026-07-15 11:52:21 UTC
Git commit 47342d073878125dfbd4c27bd9768dffeeb48f0c by Vlad Zahorodnii.
Committed on 15/07/2026 at 11:29.
Pushed by vladz into branch 'Plasma/6.7'.

kcms/color: Update ColorSchemeHash

startplasma attempts to apply the color scheme in the global theme. It
avoids applying the color scheme again by saving the hash of the current
color scheme.

This creates an issue with automatic global theme switching. For
example, consider the following case:

- the user starts their computer during daylight (the hash of the
  corresponding color scheme is A)
- the user continues using their computer without rebooting until the
  global theme is changed to the dark flavor. This will apply the dark
  color scheme (its hash is B, but it's not written to ColorSchemeHash)
- the user turns off their computer at night
- then the user starts the computer in the morning. startplasma sees
  that the light global theme needs to be applied. It then attempts to
  apply the color scheme. startplasma looks at the hashes and they match
  (A == A). However, that is wrong, the effective applied color scheme
  has hash B.

This change fixes the issue by making the applyScheme() function also
write the hash of the currently applied color scheme.

Our long term goal is to stop updating kdeglobals, but we are not there
yet.
(cherry picked from commit 4a2bf4d8369a265fa00048ab7973a8e0ef1485ea)

M  +11   -0    kcms/colors/colorsapplicator.cpp
M  +1    -0    startkde/startplasma.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/47342d073878125dfbd4c27bd9768dffeeb48f0c
Comment 33 TraceyC 2026-08-04 16:01:03 UTC
*** Bug 523823 has been marked as a duplicate of this bug. ***