You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PowerMate devices do not persist their settings (like LED brightness) when the computer resumes from standby. On its own, the device will revert its brightness to the default value when the computer resumes, as if you had replugged it.
Broken workaround
#1: To work around this, PowerMateVolume listens for the SystemEvents.PowerModeChanged event, and uses that to reset the device settings when resuming from standby by setting all the HID features again based on the in-memory values. It also resets all the features on any device input (like rotation) if the expected and actual settings differ, but this relies on the user manually using the PowerMate to fix the settings.
Unfortunately, SystemEvents only fires the PowerModeChanged event on resume roughly 95% of the time. In the remaining occurrences, the event is not fired and PowerMateVolume does not reset the settings, so the LED brightness and other settings will be wrong.
Better workaround
To fix this, maybe we should detect resumes using ETW instead of whatever message pump bullshit SystemEvents uses.
Problem
PowerMate devices do not persist their settings (like LED brightness) when the computer resumes from standby. On its own, the device will revert its brightness to the default value when the computer resumes, as if you had replugged it.
Broken workaround
#1: To work around this, PowerMateVolume listens for the
SystemEvents.PowerModeChanged
event, and uses that to reset the device settings when resuming from standby by setting all the HID features again based on the in-memory values. It also resets all the features on any device input (like rotation) if the expected and actual settings differ, but this relies on the user manually using the PowerMate to fix the settings.Unfortunately,
SystemEvents
only fires thePowerModeChanged
event on resume roughly 95% of the time. In the remaining occurrences, the event is not fired and PowerMateVolume does not reset the settings, so the LED brightness and other settings will be wrong.Better workaround
To fix this, maybe we should detect resumes using ETW instead of whatever message pump bullshit
SystemEvents
uses.Fail2Ban4Win has an example of programmatically listening for ETW records, although that's written for .NET Framework instead of .NET Core, so the dependencies may be different.
Standby and resume records are found in the
System
log, from theKernel-Power
source, with event IDs42
(standby) and107
(resume).The text was updated successfully, but these errors were encountered: