-
-
Notifications
You must be signed in to change notification settings - Fork 247
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
"TimeSwitchModule" after "BatteryStatusChanged" triggering (Script issue) #787
Comments
Hm yes, that doesn't seem right. Disabling automatic theme switch should also disable the time switch module. You mentioned this happens randomly?
Which shouldn't be active on disabled automatic switch. Could you please upload the entire log and your config file? I need to check if the time switch governor is active. |
As far as I understood, this happens when the service.log config.yaml
AutoThemeSwitchingEnabled: true
Governor: Default
Autostart:
Validate: false
WindowsThemeMode:
Enabled: true
DarkThemePath: C:\Users\wz\AppData\Local\Microsoft\Windows\Themes\dark.theme
LightThemePath: C:\Users\wz\AppData\Local\Microsoft\Windows\Themes\light.theme
MonitorActiveTheme: false
ApplyFlags: []
AppsSwitch:
Enabled: true
Component:
Mode: Switch
SystemSwitch:
Enabled: true
Component:
Mode: Switch
TaskbarSwitchDelay: 1200
TaskbarColorOnAdaptive: false
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-10-20T08:30:00.0000000
Sunset: 2023-10-20T18:20:00.0000000
Location:
PollingCooldownTimeSpan: 1.00:00:00
Enabled: false
UseGeolocatorService: true
SunsetOffsetMin: 0
SunriseOffsetMin: 0
CustomLat: 0
CustomLon: 0
Tunable:
BatterySliderDefaultValue: 25
DisableEnergySaverOnThemeSwitch: false
UseLogonTask: false
Debug: true
Trace: false
DebugTimerMessage: false
ShowTrayIcon: true
AlwaysFullDwmRefresh: true
UICulture: en
GPUMonitoring:
Enabled: false
Threshold: 30
Samples: 1
ProcessBlockList:
ProcessNames: []
Enabled: false
Events:
DarkThemeOnBattery: true
Win10AllowLockscreenSwitch: true
Notifications:
OnAutoThemeSwitching: true
OnSkipNextSwitch: true
AutoSwitchNotify:
Enabled: false
GracePeriodMinutes: 5
Hotkeys:
Enabled: false
ForceLight:
ForceDark:
NoForce:
ToggleTheme:
TogglePostpone:
ToggleAutoThemeSwitch:
IdleChecker:
Enabled: false
Threshold: 5
WallpaperSwitch:
Enabled: false
Component:
TypeLight: Individual
TypeDark: Individual
Position: Fill
GlobalWallpaper:
Light:
Dark:
SolidColors:
Light: '#FFFFFF'
Dark: '#000000'
Monitors: []
Updater:
AutoInstall: false
Enabled: true
Silent: false
DaysBetweenUpdateCheck: 7
CheckOnStart: false
VersionQueryUrl: https://raw.githubusercontent.com/AutoDarkMode/AutoDarkModeVersion/master/version-beta.yaml
DownloadBaseUrl:
ZipCustomUrl:
HashCustomUrl: Here's a part where I tested AC plug-unplug and it worked as it should:
|
Your config and the logs say otherwise:
Your auto switch is enabled. Which means that the time switch module and the battery event can overlap, causing the behavior you observed. The duplicate trigger is most likely a race condition where ADM hasn't updated the internal state yet after the battery event triggers, and the timer events fire just so. I've introduced a guard on the battery event that should prevent the governor modules from invoking a switch when a battery trigger event happens. |
Yes, yes, it's my bad. But this does not cancel the fact that the bug exists, and perhaps this will fix the situation:
|
Is the guard working? |
Description
Sometimes, after
BatteryStatusChanged
,TimeSwitchModule
is also triggered (with weird params), which leads to duplication of scripts.My script detected the duplicate and returned
## MULTI ##
:How often does this happen?
It seems more like random thing. Maybe about once in ten times.
Expected Behavior
No response
Log Data
Commit Hash, Version and Windows Build
cf7a0fe
10.4.1.1
3.1.4
1.3.3.0
7.0.5
19045.3448
Screenshots / Videos
No response
The text was updated successfully, but these errors were encountered: