CallNtPowerInformation -> SystemPowerInformation -> TimeRemaining returning 0 on Windows11

Neha Gupta 0 Reputation points


I use CallNtPowerInformation to get SystemPowerInformation and check TimeRemaining to take machine to low power state.
For windows 11, after a system restart am getting CallNtPowerInformation -> SystemPowerInformation -> TimeRemaining = 0, that takes my machine to hibernate state. When i start from there then this API starts returning correct value i.e. 0xffffffff.
This all used to work as expected before Windows11.

Can anyone throw some light on it, why this behavior and how can i fix it.

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
6,057 questions
Advanced system utilities to manage, troubleshoot, and diagnose Windows and Linux systems and applications.
1,000 questions
0 comments No comments
{count} votes