Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wallpaper immediately switches back sometimes #800

Closed
ThioJoe opened this issue Nov 28, 2023 · 11 comments
Closed

Wallpaper immediately switches back sometimes #800

ThioJoe opened this issue Nov 28, 2023 · 11 comments
Labels
bug Something isn't working

Comments

@ThioJoe
Copy link

ThioJoe commented Nov 28, 2023

Description

I've come across some odd behavior where under some conditions, the chosen wallpaper for a light/dark mode will immediately switch back after ADM switches between light/dark mode. The system theme correctly sticks, but the wallpaper doesn't. See the attached video at the bottom where I also describe what's going on in the video.

Expected Behavior

When switching between themes, the selected wallpaper will stay after switching.

Log Data

Here are the logs that occur during the video:

2023-11-28 10:11:16 | Info | MessageParser.Parse: signal received: invoke theme switch request 
2023-11-28 10:11:18 | Info | MessageParser.Parse: signal received: invoke theme switch request 
2023-11-28 10:11:20 | Info | HotkeyHandler.RegisterAllHotkeys: hotkey signal received: forcing light theme 
2023-11-28 10:11:20 | Info | ComponentManager.GetComponentsToUpdate: components queued for update: [AppsSwitchThemeFile, WallpaperSwitchThemeFile] 
2023-11-28 10:11:21 | Info | WallpaperSwitch.LogHandleSwitch: update info - previous: Dark/Fill, now: Light/Fill, mode: Fill, type: Global 
2023-11-28 10:11:21 | Info | ThemeFile.SyncWithActiveTheme: theme used for syncing is ADMTheme, path: C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\ADMTheme.theme 
2023-11-28 10:11:21 | Info | AppsSwitchThemeFile.HandleSwitch: update info - previous: Dark, pending: Light, mode: Switch 
2023-11-28 10:11:21 | Info | ThemeManager.UpdateTheme: dwm management: requested standard refresh will be performed by component(s) in queue 
2023-11-28 10:11:22 | Info | Tm2Handler.SetTheme: applied theme ADMTheme, from origin: C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\ADMTheme.theme directly via IThemeManager2 
2023-11-28 10:11:22 | Info | ThemeManager.UpdateTheme: light theme switch performed, source: Manual 
2023-11-28 10:11:25 | Info | HotkeyHandler.RegisterAllHotkeys: hotkey signal received: forcing dark theme 
2023-11-28 10:11:25 | Info | ComponentManager.GetComponentsToUpdate: components queued for update: [AppsSwitchThemeFile, WallpaperSwitchThemeFile] 
2023-11-28 10:11:26 | Info | WallpaperSwitch.LogHandleSwitch: update info - previous: Light/Fill, now: Dark/Fill, mode: Fill, type: Global 
2023-11-28 10:11:26 | Info | ThemeFile.SyncWithActiveTheme: theme used for syncing is ADMTheme, path: C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\ADMTheme.theme 
2023-11-28 10:11:26 | Info | AppsSwitchThemeFile.HandleSwitch: update info - previous: Light, pending: Dark, mode: Switch 
2023-11-28 10:11:26 | Info | ThemeManager.UpdateTheme: dwm management: requested standard refresh will be performed by component(s) in queue 
2023-11-28 10:11:26 | Info | Tm2Handler.SetTheme: applied theme ADMTheme, from origin: C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\ADMTheme.theme directly via IThemeManager2 
2023-11-28 10:11:26 | Info | ThemeManager.UpdateTheme: dark theme switch performed, source: Manual 
2023-11-28 10:11:29 | Info | HotkeyHandler.RegisterAllHotkeys: hotkey signal received: forcing light theme 
2023-11-28 10:11:29 | Info | ComponentManager.GetComponentsToUpdate: components queued for update: [AppsSwitchThemeFile, WallpaperSwitchThemeFile] 
2023-11-28 10:11:31 | Info | WallpaperSwitch.LogHandleSwitch: update info - previous: Dark/Fill, now: Light/Fill, mode: Fill, type: Global 
2023-11-28 10:11:31 | Info | ThemeFile.SyncWithActiveTheme: theme used for syncing is ADMTheme, path: C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\ADMTheme.theme 
2023-11-28 10:11:31 | Info | AppsSwitchThemeFile.HandleSwitch: update info - previous: Dark, pending: Light, mode: Switch 
2023-11-28 10:11:31 | Info | ThemeManager.UpdateTheme: dwm management: requested standard refresh will be performed by component(s) in queue 
2023-11-28 10:11:31 | Info | Tm2Handler.SetTheme: applied theme ADMTheme, from origin: C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\ADMTheme.theme directly via IThemeManager2 
2023-11-28 10:11:31 | Info | ThemeManager.UpdateTheme: light theme switch performed, source: Manual 
2023-11-28 10:11:33 | Info | HotkeyHandler.RegisterAllHotkeys: hotkey signal received: forcing dark theme 
2023-11-28 10:11:33 | Info | ComponentManager.GetComponentsToUpdate: components queued for update: [AppsSwitchThemeFile, WallpaperSwitchThemeFile] 
2023-11-28 10:11:34 | Info | WallpaperSwitch.LogHandleSwitch: update info - previous: Light/Fill, now: Dark/Fill, mode: Fill, type: Global 
2023-11-28 10:11:34 | Info | ThemeFile.SyncWithActiveTheme: theme used for syncing is ADMTheme, path: C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\ADMTheme.theme 
2023-11-28 10:11:34 | Info | AppsSwitchThemeFile.HandleSwitch: update info - previous: Light, pending: Dark, mode: Switch 
2023-11-28 10:11:34 | Info | ThemeManager.UpdateTheme: dwm management: requested standard refresh will be performed by component(s) in queue 
2023-11-28 10:11:34 | Info | Tm2Handler.SetTheme: applied theme ADMTheme, from origin: C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\ADMTheme.theme directly via IThemeManager2 
2023-11-28 10:11:34 | Info | ThemeManager.UpdateTheme: dark theme switch performed, source: Manual 
2023-11-28 10:11:39 | Info | MessageParser.Parse: signal received: invoke theme switch request 
2023-11-28 10:11:47 | Info | MessageParser.Parse: signal received: invoke theme switch request 
2023-11-28 10:11:47 | Info | MessageParser.Parse: signal received: invoke theme switch request 
2023-11-28 10:11:49 | Info | MessageParser.Parse: signal received: invoke theme switch request 
2023-11-28 10:11:49 | Info | MessageParser.Parse: signal received: invoke theme switch request 
2023-11-28 10:11:50 | Info | HotkeyHandler.RegisterAllHotkeys: hotkey signal received: forcing light theme 
2023-11-28 10:11:50 | Info | ComponentManager.GetComponentsToUpdate: components queued for update: [AppsSwitchThemeFile, WallpaperSwitchThemeFile] 
2023-11-28 10:11:51 | Info | WallpaperSwitch.LogHandleSwitch: update info - previous: Dark/Fill, now: Light/Fill, mode: Fill, type: Global 
2023-11-28 10:11:51 | Info | ThemeFile.SyncWithActiveTheme: theme used for syncing is ADMTheme, path: C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\ADMTheme.theme 
2023-11-28 10:11:51 | Info | AppsSwitchThemeFile.HandleSwitch: update info - previous: Dark, pending: Light, mode: Switch 
2023-11-28 10:11:51 | Info | ThemeManager.UpdateTheme: dwm management: requested standard refresh will be performed by component(s) in queue 
2023-11-28 10:11:51 | Info | Tm2Handler.SetTheme: applied theme ADMTheme, from origin: C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\ADMTheme.theme directly via IThemeManager2 
2023-11-28 10:11:51 | Info | ThemeManager.UpdateTheme: light theme switch performed, source: Manual 
2023-11-28 10:11:55 | Info | HotkeyHandler.RegisterAllHotkeys: hotkey signal received: forcing dark theme 
2023-11-28 10:11:55 | Info | ComponentManager.GetComponentsToUpdate: components queued for update: [AppsSwitchThemeFile, WallpaperSwitchThemeFile] 
2023-11-28 10:11:55 | Info | WallpaperSwitch.LogHandleSwitch: update info - previous: Unknown/Fill, now: Dark/Fill, mode: Fill, type: Individual 
2023-11-28 10:11:55 | Info | ThemeFile.SyncWithActiveTheme: theme used for synching is custom theme, path: C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\Custom.theme 
2023-11-28 10:11:55 | Info | AppsSwitchThemeFile.HandleSwitch: update info - previous: Light, pending: Dark, mode: Switch 
2023-11-28 10:11:55 | Info | ThemeManager.UpdateTheme: dwm management: requested standard refresh will be performed by component(s) in queue 
2023-11-28 10:11:56 | Info | Tm2Handler.SetTheme: applied theme ADMTheme, from origin: C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\ADMTheme.theme directly via IThemeManager2 
2023-11-28 10:11:56 | Info | ThemeManager.UpdateTheme: dark theme switch performed, source: Manual 
2023-11-28 10:12:03 | Info | MessageParser.Parse: signal received: invoke theme switch request 
2023-11-28 10:12:03 | Info | MessageParser.Parse: signal received: invoke theme switch request 
2023-11-28 10:12:05 | Info | MessageParser.Parse: signal received: invoke theme switch request 
2023-11-28 10:12:09 | Info | HotkeyHandler.RegisterAllHotkeys: hotkey signal received: forcing light theme 
2023-11-28 10:12:09 | Info | ComponentManager.GetComponentsToUpdate: components queued for update: [AppsSwitchThemeFile, WallpaperSwitchThemeFile] 
2023-11-28 10:12:09 | Info | WallpaperSwitch.LogHandleSwitch: update info - previous: Dark/Fill, now: Light/Fill, mode: Fill, type: Individual 
2023-11-28 10:12:10 | Info | ThemeFile.SyncWithActiveTheme: theme used for synching is custom theme, path: C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\Custom.theme 
2023-11-28 10:12:10 | Info | AppsSwitchThemeFile.HandleSwitch: update info - previous: Dark, pending: Light, mode: Switch 
2023-11-28 10:12:10 | Info | ThemeManager.UpdateTheme: dwm management: requested standard refresh will be performed by component(s) in queue 
2023-11-28 10:12:11 | Info | Tm2Handler.SetTheme: applied theme ADMTheme, from origin: C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\ADMTheme.theme directly via IThemeManager2 
2023-11-28 10:12:11 | Info | ThemeManager.UpdateTheme: light theme switch performed, source: Manual 
2023-11-28 10:12:15 | Info | HotkeyHandler.RegisterAllHotkeys: hotkey signal received: forcing dark theme 
2023-11-28 10:12:16 | Info | ComponentManager.GetComponentsToUpdate: components queued for update: [AppsSwitchThemeFile, WallpaperSwitchThemeFile] 
2023-11-28 10:12:16 | Info | WallpaperSwitch.LogHandleSwitch: update info - previous: Light/Fill, now: Dark/Fill, mode: Fill, type: Individual 
2023-11-28 10:12:16 | Info | ThemeFile.SyncWithActiveTheme: theme used for synching is custom theme, path: C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\Custom.theme 
2023-11-28 10:12:16 | Info | AppsSwitchThemeFile.HandleSwitch: update info - previous: Light, pending: Dark, mode: Switch 
2023-11-28 10:12:16 | Info | ThemeManager.UpdateTheme: dwm management: requested standard refresh will be performed by component(s) in queue 
2023-11-28 10:12:17 | Info | Tm2Handler.SetTheme: applied theme ADMTheme, from origin: C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\ADMTheme.theme directly via IThemeManager2 
2023-11-28 10:12:17 | Info | ThemeManager.UpdateTheme: dark theme switch performed, source: Manual 
2023-11-28 10:12:21 | Info | MessageParser.Parse: signal received: invoke theme switch request 
2023-11-28 10:12:24 | Info | HotkeyHandler.RegisterAllHotkeys: hotkey signal received: forcing light theme 
2023-11-28 10:12:24 | Info | ComponentManager.GetComponentsToUpdate: components queued for update: [AppsSwitchThemeFile, WallpaperSwitchThemeFile] 
2023-11-28 10:12:25 | Info | WallpaperSwitch.LogHandleSwitch: update info - previous: Unknown/Fill, now: Light/Fill, mode: Fill, type: Global 
2023-11-28 10:12:25 | Info | ThemeFile.SyncWithActiveTheme: theme used for synching is custom theme, path: C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\Custom.theme 
2023-11-28 10:12:25 | Info | AppsSwitchThemeFile.HandleSwitch: update info - previous: Dark, pending: Light, mode: Switch 
2023-11-28 10:12:25 | Info | ThemeManager.UpdateTheme: dwm management: requested standard refresh will be performed by component(s) in queue 
2023-11-28 10:12:26 | Info | Tm2Handler.SetTheme: applied theme ADMTheme, from origin: C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\ADMTheme.theme directly via IThemeManager2 
2023-11-28 10:12:26 | Info | ThemeManager.UpdateTheme: light theme switch performed, source: Manual 
2023-11-28 10:12:29 | Info | HotkeyHandler.RegisterAllHotkeys: hotkey signal received: forcing dark theme 
2023-11-28 10:12:29 | Info | ComponentManager.GetComponentsToUpdate: components queued for update: [AppsSwitchThemeFile, WallpaperSwitchThemeFile] 
2023-11-28 10:12:30 | Info | WallpaperSwitch.LogHandleSwitch: update info - previous: Unknown/Fill, now: Dark/Fill, mode: Fill, type: Individual 
2023-11-28 10:12:30 | Info | ThemeFile.SyncWithActiveTheme: theme used for synching is custom theme, path: C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\Custom.theme 
2023-11-28 10:12:30 | Info | AppsSwitchThemeFile.HandleSwitch: update info - previous: Light, pending: Dark, mode: Switch 
2023-11-28 10:12:30 | Info | ThemeManager.UpdateTheme: dwm management: requested standard refresh will be performed by component(s) in queue 
2023-11-28 10:12:31 | Info | Tm2Handler.SetTheme: applied theme ADMTheme, from origin: C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\ADMTheme.theme directly via IThemeManager2 
2023-11-28 10:12:31 | Info | ThemeManager.UpdateTheme: dark theme switch performed, source: Manual 
2023-11-28 10:12:35 | Info | MessageParser.Parse: signal received: invoke theme switch request 
2023-11-28 10:12:35 | Info | MessageParser.Parse: signal received: invoke theme switch request 
2023-11-28 10:12:38 | Info | MessageParser.Parse: signal received: invoke theme switch request 
2023-11-28 10:12:38 | Info | ComponentManager.GetComponentsToUpdate: components queued for update: [WallpaperSwitchThemeFile] 
2023-11-28 10:12:39 | Info | WallpaperSwitch.LogHandleSwitch: update info - previous: Unknown/Fill, now: Dark/Fill, mode: Fill, type: Global 
2023-11-28 10:12:40 | Info | ThemeFile.SyncWithActiveTheme: theme used for synching is custom theme, path: C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\Custom.theme 
2023-11-28 10:12:40 | Info | ThemeManager.UpdateTheme: dwm management: no refresh required 
2023-11-28 10:12:40 | Info | Tm2Handler.SetTheme: applied theme ADMTheme, from origin: C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\ADMTheme.theme directly via IThemeManager2 
2023-11-28 10:12:40 | Info | ThemeManager.UpdateTheme: dark theme switch performed, source: Manual 
2023-11-28 10:12:40 | Info | HotkeyHandler.RegisterAllHotkeys: hotkey signal received: forcing light theme 
2023-11-28 10:12:40 | Info | ComponentManager.GetComponentsToUpdate: components queued for update: [AppsSwitchThemeFile, WallpaperSwitchThemeFile] 
2023-11-28 10:12:41 | Info | WallpaperSwitch.LogHandleSwitch: update info - previous: Dark/Fill, now: Light/Fill, mode: Fill, type: Global 
2023-11-28 10:12:41 | Info | ThemeFile.SyncWithActiveTheme: theme used for syncing is ADMTheme, path: C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\ADMTheme.theme 
2023-11-28 10:12:41 | Info | AppsSwitchThemeFile.HandleSwitch: update info - previous: Dark, pending: Light, mode: Switch 
2023-11-28 10:12:41 | Info | ThemeManager.UpdateTheme: dwm management: requested standard refresh will be performed by component(s) in queue 
2023-11-28 10:12:42 | Info | Tm2Handler.SetTheme: applied theme ADMTheme, from origin: C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\ADMTheme.theme directly via IThemeManager2 
2023-11-28 10:12:42 | Info | ThemeManager.UpdateTheme: light theme switch performed, source: Manual 
2023-11-28 10:12:44 | Info | HotkeyHandler.RegisterAllHotkeys: hotkey signal received: forcing dark theme 
2023-11-28 10:12:44 | Info | ComponentManager.GetComponentsToUpdate: components queued for update: [AppsSwitchThemeFile, WallpaperSwitchThemeFile] 
2023-11-28 10:12:45 | Info | WallpaperSwitch.LogHandleSwitch: update info - previous: Light/Fill, now: Dark/Fill, mode: Fill, type: Global 
2023-11-28 10:12:45 | Info | ThemeFile.SyncWithActiveTheme: theme used for syncing is ADMTheme, path: C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\ADMTheme.theme 
2023-11-28 10:12:45 | Info | AppsSwitchThemeFile.HandleSwitch: update info - previous: Light, pending: Dark, mode: Switch 
2023-11-28 10:12:45 | Info | ThemeManager.UpdateTheme: dwm management: requested standard refresh will be performed by component(s) in queue 
2023-11-28 10:12:45 | Info | Tm2Handler.SetTheme: applied theme ADMTheme, from origin: C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\ADMTheme.theme directly via IThemeManager2 
2023-11-28 10:12:45 | Info | ThemeManager.UpdateTheme: dark theme switch performed, source: Manual 

Config file when both types are set to 'Picture' and problem occurs:

AutoThemeSwitchingEnabled: true
Governor: Default
Autostart:
  Validate: true
WindowsThemeMode:
  Enabled: false
  DarkThemePath: 
  LightThemePath: 
  MonitorActiveTheme: false
  ApplyFlags: []
AppsSwitch:
  Enabled: true
  Component:
    Mode: Switch
SystemSwitch:
  Enabled: true
  Component:
    Mode: DarkOnly
    TaskbarSwitchDelay: 1200
    TaskbarColorOnAdaptive: true
    TaskbarColorWhenNonAdaptive: Light
    DWMPrevalenceSwitch: false
    DWMPrevalenceEnableTheme: Light
TouchKeyboardSwitch:
  Enabled: false
  Component: {}
ColorizationSwitch:
  Enabled: false
  Component:
    LightHex: ''
    DarkHex: ''
    LightAutoColorization: false
    DarkAutoColorization: false
ColorFilterSwitch:
  Enabled: false
  Component: {}
OfficeSwitch:
  Enabled: false
  Component:
    Mode: Switch
    LightTheme: 0
    DarkTheme: 4
CursorSwitch:
  Enabled: false
  Component:
    CursorsLight: 
    CursorsDark: 
Sunrise: 2023-11-28T07:00:00.0000000
Sunset: 2023-11-28T20:00:00.0000000
Location:
  PollingCooldownTimeSpan: 1.00:00:00
  Enabled: true
  UseGeolocatorService: true
  SunsetOffsetMin: -20
  SunriseOffsetMin: 0
  CustomLat: 0
  CustomLon: 0
Tunable:
  BatterySliderDefaultValue: 25
  DisableEnergySaverOnThemeSwitch: false
  UseLogonTask: false
  Debug: false
  Trace: false
  DebugTimerMessage: false
  ShowTrayIcon: true
  AlwaysFullDwmRefresh: false
  UICulture: en
GPUMonitoring:
  Enabled: false
  Threshold: 30
  Samples: 1
ProcessBlockList:
  ProcessNames: []
  Enabled: false
Events:
  DarkThemeOnBattery: false
  Win10AllowLockscreenSwitch: false
Notifications:
  OnAutoThemeSwitching: true
  OnSkipNextSwitch: true
AutoSwitchNotify:
  Enabled: false
  GracePeriodMinutes: 5
Hotkeys:
  Enabled: true
  ForceLight: Ctrl + Shift + F24
  ForceDark: Ctrl + Shift + F23
  NoForce: 
  ToggleTheme: 
  TogglePostpone: 
  ToggleAutoThemeSwitch: 
IdleChecker:
  Enabled: false
  Threshold: 5
WallpaperSwitch:
  Enabled: true
  Component:
    TypeLight: Global
    TypeDark: Global
    Position: Fill
    GlobalWallpaper:
      Light: B:\Dropbox\My Stuff\Pictures\Wallpaper\My Created\Bliss Neue - 4K.jpg
      Dark: B:\Dropbox\My Stuff\Pictures\Wallpaper\My Created\Summer Night On Sigma 957 - 4K.jpg
    SolidColors:
      Light: '#FFFFFF'
      Dark: '#000000'
    Monitors:
    - Id: '\\?\DISPLAY#GSM7707#5&1c29c98c&0&UID4353#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}'
      LightThemeWallpaper: B:\Dropbox\My Stuff\Pictures\Wallpaper\My Created\Bliss Neue - 4K.jpg
      DarkThemeWallpaper: B:\Dropbox\My Stuff\Pictures\Wallpaper\My Created\Summer Night On Sigma 957 - 4K.jpg
    - Id: '\\?\DISPLAY#GSM5BBF#5&1c29c98c&0&UID4355#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}'
      LightThemeWallpaper: B:\Dropbox\My Stuff\Pictures\Wallpaper\My Created\Bliss Neue - 4K.jpg
      DarkThemeWallpaper: B:\Dropbox\My Stuff\Pictures\Wallpaper\My Created\Summer Night On Sigma 957 - 4K.jpg
Updater:
  AutoInstall: false
  Enabled: true
  Silent: false
  DaysBetweenUpdateCheck: 7
  CheckOnStart: false
  VersionQueryUrl: 
  DownloadBaseUrl: 
  ZipCustomUrl: 
  HashCustomUrl: 

Config file when both types are set to "Picture (Multiple Monitors)" and it behaves as expected:

AutoThemeSwitchingEnabled: true
Governor: Default
Autostart:
  Validate: true
WindowsThemeMode:
  Enabled: false
  DarkThemePath: 
  LightThemePath: 
  MonitorActiveTheme: false
  ApplyFlags: []
AppsSwitch:
  Enabled: true
  Component:
    Mode: Switch
SystemSwitch:
  Enabled: true
  Component:
    Mode: DarkOnly
    TaskbarSwitchDelay: 1200
    TaskbarColorOnAdaptive: true
    TaskbarColorWhenNonAdaptive: Light
    DWMPrevalenceSwitch: false
    DWMPrevalenceEnableTheme: Light
TouchKeyboardSwitch:
  Enabled: false
  Component: {}
ColorizationSwitch:
  Enabled: false
  Component:
    LightHex: ''
    DarkHex: ''
    LightAutoColorization: false
    DarkAutoColorization: false
ColorFilterSwitch:
  Enabled: false
  Component: {}
OfficeSwitch:
  Enabled: false
  Component:
    Mode: Switch
    LightTheme: 0
    DarkTheme: 4
CursorSwitch:
  Enabled: false
  Component:
    CursorsLight: 
    CursorsDark: 
Sunrise: 2023-11-28T07:00:00.0000000
Sunset: 2023-11-28T20:00:00.0000000
Location:
  PollingCooldownTimeSpan: 1.00:00:00
  Enabled: true
  UseGeolocatorService: true
  SunsetOffsetMin: -20
  SunriseOffsetMin: 0
  CustomLat: 0
  CustomLon: 0
Tunable:
  BatterySliderDefaultValue: 25
  DisableEnergySaverOnThemeSwitch: false
  UseLogonTask: false
  Debug: false
  Trace: false
  DebugTimerMessage: false
  ShowTrayIcon: true
  AlwaysFullDwmRefresh: false
  UICulture: en
GPUMonitoring:
  Enabled: false
  Threshold: 30
  Samples: 1
ProcessBlockList:
  ProcessNames: []
  Enabled: false
Events:
  DarkThemeOnBattery: false
  Win10AllowLockscreenSwitch: false
Notifications:
  OnAutoThemeSwitching: true
  OnSkipNextSwitch: true
AutoSwitchNotify:
  Enabled: false
  GracePeriodMinutes: 5
Hotkeys:
  Enabled: true
  ForceLight: Ctrl + Shift + F24
  ForceDark: Ctrl + Shift + F23
  NoForce: 
  ToggleTheme: 
  TogglePostpone: 
  ToggleAutoThemeSwitch: 
IdleChecker:
  Enabled: false
  Threshold: 5
WallpaperSwitch:
  Enabled: true
  Component:
    TypeLight: Individual
    TypeDark: Individual
    Position: Fill
    GlobalWallpaper:
      Light: B:\Dropbox\My Stuff\Pictures\Wallpaper\My Created\Bliss Neue - 4K.jpg
      Dark: B:\Dropbox\My Stuff\Pictures\Wallpaper\My Created\Summer Night On Sigma 957 - 4K.jpg
    SolidColors:
      Light: '#FFFFFF'
      Dark: '#000000'
    Monitors:
    - Id: '\\?\DISPLAY#GSM7707#5&1c29c98c&0&UID4353#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}'
      LightThemeWallpaper: B:\Dropbox\My Stuff\Pictures\Wallpaper\My Created\Bliss Neue - 4K.jpg
      DarkThemeWallpaper: B:\Dropbox\My Stuff\Pictures\Wallpaper\My Created\Summer Night On Sigma 957 - 4K.jpg
    - Id: '\\?\DISPLAY#GSM5BBF#5&1c29c98c&0&UID4355#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}'
      LightThemeWallpaper: B:\Dropbox\My Stuff\Pictures\Wallpaper\My Created\Bliss Neue - 4K.jpg
      DarkThemeWallpaper: B:\Dropbox\My Stuff\Pictures\Wallpaper\My Created\Summer Night On Sigma 957 - 4K.jpg
Updater:
  AutoInstall: false
  Enabled: true
  Silent: false
  DaysBetweenUpdateCheck: 7
  CheckOnStart: false
  VersionQueryUrl: 
  DownloadBaseUrl: 
  ZipCustomUrl: 
  HashCustomUrl: 

Commit Hash, Version and Windows Build

  • Commit: cf7a0fe
  • Service/App: 10.4.1.1
  • Updater: 3.1.4
  • Shell: 1.3.3.0
  • .Net: 7.0.5
  • Windows: 22631.2787

Screenshots / Videos

Google drive link to video because it's too big for GitHub: https://drive.google.com/file/d/1zqAvqSFZxeo-hlJq3lwf51lFTdz6hOno/view?usp=sharing

Here is a description of what's going on in the video:
0:00 - Showing wallpaper settings for dark & light themes. The system is currently set to dark mode.
0:07 - I use a hotkey combo to force switch to light mode, but as you can see the wallpaper immediately switches back to my dark wallpaper (I have two monitors, and it does the same for the other monitor which is not visible in the recording). However the overall system theme correctly stays light.
0:13 - I use a hotkey to switch back to dark mode
0:17 - Again I repeat the demo of switching to light mode and once again the wallpaper switches back immediately
0:22 - I switch back to dark mode
0:26 - I change the Dark Theme wallpaper 'type' setting to Picture (Multiple Monitors), and show the image path set for each monitor
0:34 - I show that the Light Theme mode wallpaper type is still set to 'Picture'
0:37 - I use a hotkey to switch system to light mode, and wallpaper continues to switch back
0:43 - I switch back to dark mode
0:49 - I change the Light Theme wallpaper type to Picture (Multiple Monitors), and show the setting for each wallpaper again
0:57 - I use the hotkey to switch to light mode, and the wallpaper now correctly stays on the light one
1:03 - I switch back to dark mode and the wallpaper correctly switches to the dark wallpaper
1:08 - I switch the Light Theme 'type' setting back to Picture, then use the hotkey to switch to light mode, and the wallpaper correctly stays as the light one
1:18 - I switch back to dark mode
1:24 - I switch the Dark Theme type setting to Picture, then use the hotkey to switch to light mode, but the wallpaper immediately switches back to the dark one
1:33 - I switch back to dark mode

Summary:

  • When wallpaper mode type is set to 'Picture' for both light and dark theme, the wallpaper incorrectly switches back
  • After switching both light and dark theme to use "Picture (Multiple Monitors)" mode, the problem seems to disappear

Notes:

  • Switching both light/dark mode types to 'Picture' always seems to cause an issue, and switching both to "Picture (Multiple Monitors)" always seems to fix it. But there seems to be inconsistent behavior when one is set to picture and the other set to multiple monitors.
    • After the problem is triggered, switching one of the 'type' settings will not fix it, both must be set to Multiple Monitors to fix it
    • After the problem is fixed by switching both 'type' settings to Multiple Monitors, both 'type' settings must be switched to 'Picture' to trigger the problem. Only switching one of them to 'Picture' will not trigger the problem.
  • The problem can occur in both "directions", meaning it is also possible for it to keep switching back to the light wallpaper. It seems that whichever wallpaper/mode is active when the problem is triggered is the wallpaper that gets stuck.
@Spiritreader
Copy link
Member

Spiritreader commented Nov 28, 2023

Hey!

Thanks for the super detailed report.
I have a general idea on why this might occur.

Some background info:
When Auto Dark Mode changes wallpapers, it has to call the Windows Wallpaper API to configure the wallpaper.
However, this API is non-blocking and returns immediately. We can't do this directly via the theme file as the monitor ids there are unreliable.

Now back to the issue at hand:
In order for Auto Dark Mode to actually change your themes, it has to modify the Windows theme file and set parameters for the system/app dark and light configuration.
Now since we want all of the user settings to stick, we have to synchronize the current theme state first.
We do that by loading the theme information from the currently active theme file into our own internal managed theme file representation.

Coming back around to the aforementioned background info:
If for some reason the system is not quick enough, it would:

  • make a request to the windows wallpaper API to change the wallpaper
  • load the currently active theme file before the windows API has finished updating the theme file
  • re-applying the theme with the new light/dark configuration but old wallpaper information

This would lead to the exact situation that you've been referring to.

One possible solution is to continously query the theme file after wallpaper changes until it updates and all of the newly set wallpapers are in place.

If you are willing to test this (as I unfortunately can't reproduce this issue on any of the systems that I currently use) I can provide a test build that implements a fix on the "Picture" mode. If that then subsequently works, we can roll out those changes to all of the other variants as well.

Please note that in this potential test build, the changes will only concern the switch from "Picture" to "Picture" and "Picture multiple monitors" to "Picture" mode. It would be expected that switching from "Picture" to "Picture - multiple monitors" should still produce the issue.

Edit: Also if you want to help out confirming this further, you can enable trace mode here
image

Now run your scenario again and upload the relevant section in the logs as .txt file.
That will dump the entire windows theme file when it's being read for theme application.
If the wallpaper paths are wrong there, then it's is guaranteed to be this type of synchronization issue.

@Spiritreader Spiritreader added bug Something isn't working and removed needs triage labels Nov 28, 2023
@ThioJoe
Copy link
Author

ThioJoe commented Dec 1, 2023

Sure I've enabled the trace mode and had it do a switch, I'll put the log below. In this case it was from light to dark mode, and the wallpaper switched back to the light wallpaper. And both wallpaper 'type' settings were set to 'Picture'.

2023-12-01 11:23:03 | Info | HotkeyHandler.RegisterAllHotkeys: hotkey signal received: forcing dark theme 
2023-12-01 11:23:03 | Info | ComponentManager.GetComponentsToUpdate: components queued for update: [AppsSwitchThemeFile, WallpaperSwitchThemeFile] 
2023-12-01 11:23:03 | Trace | BaseComponent`1.Switch: switch invoked for WallpaperSwitchThemeFile (PreSync) 
2023-12-01 11:23:05 | Info | WallpaperSwitch.LogHandleSwitch: update info - previous: Light/Fill, now: Dark/Fill, mode: Fill, type: Global 
2023-12-01 11:23:05 | Info | ThemeFile.SyncWithActiveTheme: theme used for syncing is ADMTheme, path: C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\ADMTheme.theme 
2023-12-01 11:23:05 | Trace | ThemeFile.Parse: theme file dump: ; Copyright © Microsoft Corp.

[Theme]
; Windows - IDS_THEME_DISPLAYNAME_AERO_LIGHT
DisplayName=ADMTheme
ThemeId={27ff3003-8325-4e8f-8723-397a22d0f344}

; Computer - SHIDI_SERVER
[CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\DefaultIcon]
DefaultValue=%SystemRoot%\System32\imageres.dll,-109

; UsersFiles - SHIDI_USERFILES
[CLSID\{59031A47-3F72-44A7-89C5-5595FE6B30EE}\DefaultIcon]
DefaultValue=%SystemRoot%\System32\imageres.dll,-123

; Network - SHIDI_MYNETWORK
[CLSID\{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}\DefaultIcon]
DefaultValue=%SystemRoot%\System32\imageres.dll,-25

; Recycle Bin - SHIDI_RECYCLERFULL SHIDI_RECYCLER
[CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\DefaultIcon]
Full=%SystemRoot%\System32\imageres.dll,-54
Empty=%SystemRoot%\System32\imageres.dll,-55

[Control Panel\Cursors]
Arrow=%SystemRoot%\cursors\aero_arrow.cur
Help=%SystemRoot%\cursors\aero_helpsel.cur
AppStarting=%SystemRoot%\cursors\aero_working.ani
Wait=%SystemRoot%\cursors\aero_busy.ani
Crosshair=
IBeam=
NWPen=%SystemRoot%\cursors\aero_pen.cur
No=%SystemRoot%\cursors\aero_unavail.cur
SizeNS=%SystemRoot%\cursors\aero_ns.cur
SizeWE=%SystemRoot%\cursors\aero_ew.cur
SizeNWSE=%SystemRoot%\cursors\aero_nwse.cur
SizeNESW=%SystemRoot%\cursors\aero_nesw.cur
SizeAll=%SystemRoot%\cursors\aero_move.cur
UpArrow=%SystemRoot%\cursors\aero_up.cur
Hand=%SystemRoot%\cursors\aero_link.cur
Pin=%SystemRoot%\cursors\aero_pin.cur
Person=%SystemRoot%\cursors\aero_person.cur
DefaultValue=Windows Default

[Control Panel\Desktop]
Wallpaper=B:\Dropbox\My Stuff\Pictures\Wallpaper\My Created\Bliss Neue - 4K.jpg
Pattern=
MultimonBackgrounds=0
WindowsSpotlight=0
PicturePosition=4
Wallpaper1=B:\Dropbox\My Stuff\Pictures\Wallpaper\My Created\Bliss Neue - 4K.jpg
Wallpaper2=B:\Dropbox\My Stuff\Pictures\Wallpaper\My Created\Bliss Neue - 4K.jpg

[VisualStyles]
Path=%SystemRoot%\resources\themes\Aero\Aero.msstyles
ColorStyle=NormalColor
Size=NormalSize
AutoColorization=0
ColorizationColor=0XC40078D4
VisualStyleVersion=10
AppMode=Light
SystemMode=Dark

[boot]
SCRNSAVE.EXE=

[MasterThemeSelector]
MTSM=RJSPBS

[Sounds]
; IDS_SCHEME_DEFAULT
SchemeName=Windows Default

[Control Panel\Colors]
Background=0 0 0
InfoText=18 0 0 
2023-12-01 11:23:05 | Debug | ThemeFile.PatchColorsWin11InMemory: patched colors from [18 0 0] to [17 0 0] 
2023-12-01 11:23:05 | Trace | BaseComponent`1.Switch: switch invoked for AppsSwitchThemeFile (PostSync) 
2023-12-01 11:23:05 | Info | AppsSwitchThemeFile.HandleSwitch: update info - previous: Light, pending: Dark, mode: Switch 
2023-12-01 11:23:05 | Info | ThemeManager.UpdateTheme: dwm management: requested standard refresh will be performed by component(s) in queue 
2023-12-01 11:23:05 | Trace | ThemeFile.Save: theme file dump: ; Copyright © Microsoft Corp.

[Theme]
; Windows - IDS_THEME_DISPLAYNAME_AERO_LIGHT
DisplayName=ADMTheme
ThemeId={75dce08c-d770-4fa0-bc47-c7b3946d7d82}

; Computer - SHIDI_SERVER
[CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\DefaultIcon]
DefaultValue=%SystemRoot%\System32\imageres.dll,-109

; UsersFiles - SHIDI_USERFILES
[CLSID\{59031A47-3F72-44A7-89C5-5595FE6B30EE}\DefaultIcon]
DefaultValue=%SystemRoot%\System32\imageres.dll,-123

; Network - SHIDI_MYNETWORK
[CLSID\{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}\DefaultIcon]
DefaultValue=%SystemRoot%\System32\imageres.dll,-25

; Recycle Bin - SHIDI_RECYCLERFULL SHIDI_RECYCLER
[CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\DefaultIcon]
Full=%SystemRoot%\System32\imageres.dll,-54
Empty=%SystemRoot%\System32\imageres.dll,-55

[Control Panel\Cursors]
Arrow=%SystemRoot%\cursors\aero_arrow.cur
Help=%SystemRoot%\cursors\aero_helpsel.cur
AppStarting=%SystemRoot%\cursors\aero_working.ani
Wait=%SystemRoot%\cursors\aero_busy.ani
Crosshair=
IBeam=
NWPen=%SystemRoot%\cursors\aero_pen.cur
No=%SystemRoot%\cursors\aero_unavail.cur
SizeNS=%SystemRoot%\cursors\aero_ns.cur
SizeWE=%SystemRoot%\cursors\aero_ew.cur
SizeNWSE=%SystemRoot%\cursors\aero_nwse.cur
SizeNESW=%SystemRoot%\cursors\aero_nesw.cur
SizeAll=%SystemRoot%\cursors\aero_move.cur
UpArrow=%SystemRoot%\cursors\aero_up.cur
Hand=%SystemRoot%\cursors\aero_link.cur
Pin=%SystemRoot%\cursors\aero_pin.cur
Person=%SystemRoot%\cursors\aero_person.cur
DefaultValue=Windows Default

[Control Panel\Desktop]
Wallpaper=B:\Dropbox\My Stuff\Pictures\Wallpaper\My Created\Bliss Neue - 4K.jpg
Pattern=
MultimonBackgrounds=0
WindowsSpotlight=0
PicturePosition=4
Wallpaper1=B:\Dropbox\My Stuff\Pictures\Wallpaper\My Created\Bliss Neue - 4K.jpg
Wallpaper2=B:\Dropbox\My Stuff\Pictures\Wallpaper\My Created\Bliss Neue - 4K.jpg

[VisualStyles]
Path=%SystemRoot%\resources\themes\Aero\Aero.msstyles
ColorStyle=NormalColor
Size=NormalSize
AutoColorization=0
ColorizationColor=0XC40078D4
VisualStyleVersion=10
AppMode=Dark
SystemMode=Dark

[boot]
SCRNSAVE.EXE=

[MasterThemeSelector]
MTSM=RJSPBS

[Sounds]
; IDS_SCHEME_DEFAULT
SchemeName=Windows Default

[Control Panel\Colors]
Background=0 0 0
InfoText=17 0 0 
2023-12-01 11:23:05 | Trace | ThemeFile.Save: saving C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\ADMTheme.theme 
2023-12-01 11:23:05 | Info | Tm2Handler.SetTheme: applied theme ADMTheme, from origin: C:\Users\Joe\AppData\Local\Microsoft\Windows\Themes\ADMTheme.theme directly via IThemeManager2 
2023-12-01 11:23:05 | Trace | BaseComponent`1.RunCallback: running callback for AppsSwitchThemeFile 
2023-12-01 11:23:05 | Trace | BaseComponent`1.RunCallback: running callback for WallpaperSwitchThemeFile 
2023-12-01 11:23:05 | Info | ThemeManager.UpdateTheme: dark theme switch performed, source: Manual 

I'd try a beta version but on my computer I have Smart App Control enabled which wouldn't let me run unsigned files that don't have a reputation so I probably can't.

@Spiritreader
Copy link
Member

Thanks for the logs!

This confirms my suspicions.
As far as running beta builds is concerned, all of our beta versions are digitally signed with a Microsoft Azure Code Signing Certificate, so that shouldn't be an issue.
The beta would be distributed on our official beta channel which you can enable on the settings page
image

@ThioJoe
Copy link
Author

ThioJoe commented Dec 2, 2023

Thanks for the logs!

This confirms my suspicions. As far as running beta builds is concerned, all of our beta versions are digitally signed with a Microsoft Azure Code Signing Certificate, so that shouldn't be an issue. The beta would be distributed on our official beta channel which you can enable on the settings page

Ah you're right, I am able to run the version from the beta channel so I could let you know how any fix works if implemented. Not that it needs to be a priority or anything since it's easy enough to work around, and seems to be an edge case anyway.

@GentlemanJimStacey
Copy link

I will second this issue, actually. And this beta didn't seem to fix the issue for me.

In my situation, I switch from dark mode to light mode, and everything works correctly. But when I switch back to dark mode, everything changes correctly, including the background, but the background then immediately switches back to the light mode background.

@Spiritreader
Copy link
Member

I will second this issue, actually. And this beta didn't seem to fix the issue for me.

In my situation, I switch from dark mode to light mode, and everything works correctly. But when I switch back to dark mode, everything changes correctly, including the background, but the background then immediately switches back to the light mode background.

Please don't do comments like "i have this issue too" because it will unnecessarily alert everyone that is subscribed to this issue.

This is a confirmed bug and for now we've collected all the data we need to fix it.
I haven't gotten around to working on it yet due to lack of time. As Thio mentioned this isn't a super critical bug in need of immediate attention.

As far as the beta build is concerned:
I will update everyone in this issue thread once a (hopefully working) fix has been implemented and the beta has been updated with those changes. Until then, if anyone else wants to give approval, use a reaction on the top level post.

Thanks

@Spiritreader
Copy link
Member

I have pushed an update that addresses incorrect behavior of the global (single monitor) wallpaper.

This should hopefully also resolve this issue.

Please update to the latest 10.4.2.4 using the beta update channel and let me know if it works.

@gdude2002
Copy link

I can confirm that this appears to be fixed on my end.

@ThioJoe
Copy link
Author

ThioJoe commented Jan 9, 2024

Yep for me with 10.4.2.4 it seems to be fixed as well 👍

Feel free to close the issue whenever, I'll leave it open myself since I'm not sure if you typically prefer to close them after fixes are pushed to stable as opposed to pre-release.

@MihaxXx
Copy link

MihaxXx commented Jan 28, 2024

I encountered the same problem, found this issue and updated to 10.4.2.5 beta, but it fixed the bug onlu partially. I have 3 virtual desktops on 2-monitor configuration, the problem is that in this version the correct change of wallpaper happens only for active virtual desktop (on both monitors). I use one image for all monitors option.

service.log
config.yaml.txt

@Spiritreader
Copy link
Member

I encountered the same problem, found this issue and updated to 10.4.2.5 beta, but it fixed the bug onlu partially. I have 3 virtual desktops on 2-monitor configuration, the problem is that in this version the correct change of wallpaper happens only for active virtual desktop (on both monitors). I use one image for all monitors option.

service.log config.yaml.txt

Thats unrelated to this issue. It's simply a Windows api limitation. We have an different issue to track this, see here for more info: #469

I'll close this one as the original problem has been resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants