CallNtPowerInformation -> SystemPowerInformation -> TimeRemaining returning 0 on Windows11

Neha Gupta 0 Reputation points
2023-09-14T04:01:45.6366667+00:00

Hi,

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.
9,440 questions
Sysinternals
Sysinternals
Advanced system utilities to manage, troubleshoot, and diagnose Windows and Linux systems and applications.
1,152 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.