Bug 509885 - Day/night theme switching doesn't work
Summary: Day/night theme switching doesn't work
Status: REPORTED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_lookandfeel (other bugs)
Version First Reported In: 6.4.90
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-24 19:34 UTC by aronkvh
Modified: 2025-09-30 19:24 UTC (History)
2 users (show)

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


Attachments
kdeglobals (4.27 KB, text/plain)
2025-09-30 14:46 UTC, aronkvh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aronkvh 2025-09-24 19:34:04 UTC
SUMMARY
Setting the global theme to automatically switch doesn't cause the theme to switch.
Happens both with custom times or location based day/night cycle settings. Night light responds to the day-night settings.

Operating System: KDE Linux 2025-09-17
KDE Plasma Version: 6.4.80
KDE Frameworks Version: 6.19.0
Qt Version: 6.9.2
Kernel Version: 6.16.7-arch1-1 (64-bit)
Wayland
Comment 1 aronkvh 2025-09-24 19:42:14 UTC
I don't know if these are relevant, but:
Switching to dark mode and then to automatic sets it to Breeze Light.
Comment 2 Nate Graham 2025-09-24 20:09:20 UTC
Works for me; I've been using it for a month or so.

How are you setting this up? From Quick settings, or the Global Themes KCM?

What's your time zone, and have you changed it recently?

Are you making sure to wait 5 seconds after the configured switching time is reached? BY default, it requires 5 seconds of inactivity before switching (this is configurable).

If you restart KDED with `systemctl restart --user plasma-kded6.service`, does it start switching at the correct times?
Comment 3 aronkvh 2025-09-24 20:55:23 UTC
(In reply to Nate Graham from comment #2)
> Works for me; I've been using it for a month or so.
> 
> How are you setting this up? From Quick settings, or the Global Themes KCM?
> 
> What's your time zone, and have you changed it recently?
> 
> Are you making sure to wait 5 seconds after the configured switching time is
> reached? BY default, it requires 5 seconds of inactivity before switching
> (this is configurable).
> 
> If you restart KDED with `systemctl restart --user plasma-kded6.service`,
> does it start switching at the correct times?

I tried setting it up from both pages.
The timezone hasn't ever changed on this device: CET.
I forgot and didn't wait, but if I wait or uncheck the inactivity checkbox, it still doesn't change.
Restarting kded solves it.
Comment 4 Nate Graham 2025-09-24 21:04:16 UTC
Now that it's working, if you reboot the machine, does it stay working?
Comment 5 aronkvh 2025-09-25 19:21:54 UTC
(In reply to Nate Graham from comment #4)
> Now that it's working, if you reboot the machine, does it stay working?

No, and apparently restarting kded6 doesn't always solve it
Comment 6 Nate Graham 2025-09-26 15:37:28 UTC
Gross, bugs like this are just the worst!
Comment 7 Vlad Zahorodnii 2025-09-29 12:20:49 UTC
Can you try running

 plasma-apply-lookandfeel --keep-auto --apply org.kde.breeze.desktop

and

  plasma-apply-lookandfeel --keep-auto --apply org.kde.breezedark.desktop

do they change anything?
Comment 8 aronkvh 2025-09-29 18:19:05 UTC
(In reply to Vlad Zahorodnii from comment #7)
> Can you try running
> 
>  plasma-apply-lookandfeel --keep-auto --apply org.kde.breeze.desktop
> 
> and
> 
>   plasma-apply-lookandfeel --keep-auto --apply org.kde.breezedark.desktop
> 
> do they change anything?

I turned on the day-night theme during the day, and it changed correctly to light.
However, setting the sunset time to earlier than the current system system didn't cause it to change, and plasmashell crashed: https://crash-reports.kde.org/organizations/kde/issues/260506/events/9817dc44dcbe4c7a9dddfd28aa382f1f/
Running `plasma-apply-lookandfeel --keep-auto --apply org.kde.breezedark.desktop`  caused the theme to change as expected :)
Comment 9 aronkvh 2025-09-29 18:19:28 UTC
(In reply to aronkvh from comment #8)
> (In reply to Vlad Zahorodnii from comment #7)
> > Can you try running
> > 
> >  plasma-apply-lookandfeel --keep-auto --apply org.kde.breeze.desktop
> > 
> > and
> > 
> >   plasma-apply-lookandfeel --keep-auto --apply org.kde.breezedark.desktop
> > 
> > do they change anything?
> 
> I turned on the day-night theme during the day, and it changed correctly to
> light.
> However, setting the sunset time to earlier than the current system system
> didn't cause it to change, and plasmashell crashed:
> https://crash-reports.kde.org/organizations/kde/issues/260506/events/
> 9817dc44dcbe4c7a9dddfd28aa382f1f/
> Running `plasma-apply-lookandfeel --keep-auto --apply
> org.kde.breezedark.desktop`  caused the theme to change as expected :)

*earlier than the current system time
Comment 10 Bug Janitor Service 2025-09-30 08:34:51 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5875
Comment 11 Vlad Zahorodnii 2025-09-30 08:37:31 UTC
Can you share your timezone and ~/.config/knighttimerc? also, did you change any global theme related options or can you attach your kdeglobals file to this bug report too?
Comment 12 Vlad Zahorodnii 2025-09-30 08:38:32 UTC
timezone info can be collected by running `timedatectl` command? if you feel uncomfortable posting this information in public here, can you send an email to me?
Comment 13 Vlad Zahorodnii 2025-09-30 08:38:52 UTC
s/command?/command./
Comment 14 Vlad Zahorodnii 2025-09-30 13:09:37 UTC
Git commit cca20d8287e433160468be40fab4a28494b22bb3 by Vlad Zahorodnii.
Committed on 30/09/2025 at 12:44.
Pushed by vladz into branch 'master'.

kcms/lookandfeel: Add some debug messages

M  +8    -0    kcms/lookandfeel/kded/CMakeLists.txt
M  +9    -0    kcms/lookandfeel/kded/lookandfeelautoswitcher.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/cca20d8287e433160468be40fab4a28494b22bb3
Comment 15 Bug Janitor Service 2025-09-30 14:31:54 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5877
Comment 16 aronkvh 2025-09-30 14:46:15 UTC
Created attachment 185400 [details]
kdeglobals
Comment 17 aronkvh 2025-09-30 14:48:29 UTC
(In reply to Vlad Zahorodnii from comment #11)
> Can you share your timezone and ~/.config/knighttimerc? also, did you change
> any global theme related options or can you attach your kdeglobals file to
> this bug report too?

knighttimerc:
[ManualLocation]
Latitude=45.154058011549154
Longitude=21.010521873235774

[Times]
SunsetStart=20:04:00
TransitionDuration=2400

I set sunset to 20:04 after 20:04 has passed on that day.

timezones:
               Local time: k 2025-09-30 16:46:27 CEST
           Universal time: k 2025-09-30 14:46:27 UTC
                 RTC time: k 2025-09-30 14:46:27
                Time zone: Europe/Budapest (CEST, +0200)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no
Comment 18 Vlad Zahorodnii 2025-09-30 14:55:01 UTC
Git commit 83e5fb1a0510b5cc7418715d17bbfdc74d689aff by Vlad Zahorodnii.
Committed on 30/09/2025 at 14:31.
Pushed by vladz into branch 'Plasma/6.5'.

kcms/lookandfeel: Add some debug messages


(cherry picked from commit cca20d8287e433160468be40fab4a28494b22bb3)

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

M  +8    -0    kcms/lookandfeel/kded/CMakeLists.txt
M  +9    -0    kcms/lookandfeel/kded/lookandfeelautoswitcher.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/83e5fb1a0510b5cc7418715d17bbfdc74d689aff
Comment 19 Vlad Zahorodnii 2025-09-30 15:06:28 UTC
(In reply to aronkvh from comment #17)
> (In reply to Vlad Zahorodnii from comment #11)
> > Can you share your timezone and ~/.config/knighttimerc? also, did you change
> > any global theme related options or can you attach your kdeglobals file to
> > this bug report too?
> 
> knighttimerc:
> [ManualLocation]
> Latitude=45.154058011549154
> Longitude=21.010521873235774
> 
> [Times]
> SunsetStart=20:04:00
> TransitionDuration=2400
> 
> I set sunset to 20:04 after 20:04 has passed on that day.
> 
> timezones:
>                Local time: k 2025-09-30 16:46:27 CEST
>            Universal time: k 2025-09-30 14:46:27 UTC
>                  RTC time: k 2025-09-30 14:46:27
>                 Time zone: Europe/Budapest (CEST, +0200)
> System clock synchronized: yes
>               NTP service: active
>           RTC in local TZ: no

Huh, [ManualLocation] is odd. According to knighttimerc, you're using automatic location mode, so changing the sunset time won't have any effect. I wonder whether KDE Linux has corrupted/outdated knighttime or plasma-workspace packages.
Comment 20 aronkvh 2025-09-30 19:05:21 UTC
The problem is only with custom times, automatic location seems to work.

(But when it's automatic you can't set a transition duration for night light, is that intended? Since the transition is only for night light, I think that KCM would be a better place for it)
Comment 21 Nate Graham 2025-09-30 19:16:25 UTC
(In reply to Vlad Zahorodnii from comment #19)
> I wonder whether KDE Linux has corrupted/outdated knighttime or plasma-workspace packages.

KDE Linux hadn't gotten any newer builds of KDE software since 2025-09-25 due to https://invent.kde.org/kde-linux/kde-linux/-/issues/371. So if there was a change that might have fixed this since then, KDE Linux users don't have it yet.
Comment 22 Vlad Zahorodnii 2025-09-30 19:24:55 UTC
(In reply to aronkvh from comment #20)
> The problem is only with custom times, automatic location seems to work.
> 
> (But when it's automatic you can't set a transition duration for night
> light, is that intended? Since the transition is only for night light, I
> think that KCM would be a better place for it)

Transition duration affects automatic theme switching too.