Comments (11)
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
from windows-auto-night-mode.
I can confirm that this appears to be fixed on my end.
from windows-auto-night-mode.
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.
from windows-auto-night-mode.
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
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.
from windows-auto-night-mode.
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
from windows-auto-night-mode.
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.
from windows-auto-night-mode.
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.
from windows-auto-night-mode.
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.
from windows-auto-night-mode.
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.
from windows-auto-night-mode.
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.
from windows-auto-night-mode.
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.
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.
from windows-auto-night-mode.
Related Issues (20)
- ADM process cannot access file in script because it is being used by another process HOT 2
- Dark mode does not apply to dialog windows HOT 1
- UI error (ARM64 build) HOT 1
- MS Store compatibility check HOT 4
- Wallpaper Switch Prioritizes Solid Color Wallpaper Before Picture, even when Picture is Selected. HOT 2
- Add bule light 'filter' and brightness controls/sliders. HOT 2
- Manual toggling HOT 2
- Cannot be used with Rectify11 HOT 1
- (Custom scripts issue) [SystemUnlock] Event changes the theme but does not trigger scripts execution HOT 2
- Light mode not activated back HOT 4
- Spotlight background setting in theme file not persisted HOT 3
- Changing background is not working HOT 8
- Recommendations for the list of compatible apps HOT 6
- Add compatibility and integration to switch themes with Rectify11 theme features HOT 2
- Ability to add accent colour to taskbar in light mode HOT 1
- The theme switcher does not automatically switch the time HOT 4
- Suggestion for Next Updates HOT 1
- Taskbar Accent Color for Both Modes HOT 8
- Running a bat file through the script
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from windows-auto-night-mode.