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

Brightness seems to revert to 80 after computer resumes from standby #1

Closed
Aldaviva opened this issue Feb 21, 2023 · 4 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@Aldaviva
Copy link
Owner

Aldaviva commented Feb 21, 2023

Maybe this library can detect resuming from sleep and re-send the Set-Report feature requests.

You can maybe do this with Windows Forms' SystemEvents on Windows if you target .NET Framework or .NET Core 3.0 or later, but this library targets .NET Standard 2.0 and also needs to work on MacOS.

@Aldaviva Aldaviva self-assigned this Feb 21, 2023
@Aldaviva Aldaviva added the bug Something isn't working label Feb 21, 2023
@Aldaviva
Copy link
Owner Author

Based on powercfg /availablesleepstates, the computer was resuming from S3 because it doesn't support any other sleep states like S0 or S1. The PowerMate was connected directly to a USB port on the motherboard, not to an external hub that could have turned off or disconnected during standby or input changes, such as the monitor's USB hub.

The following sleep states are available on this system:
    Standby (S3)
    Fast Startup

The following sleep states are not available on this system:
    Standby (S1)
        The system firmware does not support this standby state.

    Standby (S2)
        The system firmware does not support this standby state.

    Hibernate
        The hiberfile type does not support hibernation.

    Standby (S0 Low Power Idle)
        The system firmware does not support this standby state.

    Hybrid Sleep
        Hibernation is not available.
        The hypervisor does not support this standby state.

@Aldaviva
Copy link
Owner Author

This does not seem to be a problem with S0, at least for a short sleep. The PowerMate maintains its old LED state, possibly because it was receiving power the whole time.

@Aldaviva
Copy link
Owner Author

Aldaviva commented Feb 24, 2023

On a Windows 10 machine with an ASRock X570 Taichi motherboard and an Anker 7-port USB3 data hub, the PowerMate retains its LED settings after S3.

On a Windows 11 machine with an Asus Prime A520M-K motherboard and the same USB hub, the PowerMate loses its LED settings after S3. It does not trigger a device list changed event when waking up.

@Aldaviva
Copy link
Owner Author

Working around the issue by using SystemEvents.PowerModeChanged in PowerMateVolume, and not trying to solve it in a cross-platform library manner.

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

1 participant