My pc is automatically going to sleep. in event viewer it shows kernel error id 42 sleep due to power button or ld. sometimes it also shows error due to application ai or similar. Any solutions?

Rahul Thakur 20 Reputation points
2025-07-04T09:05:49.38+00:00

Hello,

My pc running Windows 11 latest version goes into sleep randomly, even while I’m actively using it. I checked Event Viewer, and it often shows the sleep was caused by either:

Lid Close

  • Power Button
  • Application Api

However:

I'm not closing the lid when this happens.

I already changed the Power Options so that both "closing the lid" and "pressing the power button" are set to "Do nothing".

  • There's no scheduled sleep, and Process Monitor doesn’t show any SetSuspendState activity.Hello, My laptop running Windows 11 goes into sleep randomly, even while I’m actively using it. I checked Event Viewer, and it often shows the sleep was caused by either:
    • Lid Close
    • Power Button
    • Application Api
    However:
    • I'm not closing the lid when this happens.
    • I already changed the Power Options so that both "closing the lid" and "pressing the power button" are set to "Do nothing".
    • There are quite a few applications i don't know which one interferes
    • There's no scheduled sleep, and Process Monitor doesn’t show any SetSuspendState activity.
Windows for home | Windows 11 | Sleep and Power on, off
0 comments No comments
{count} votes

Accepted answer
  1. Ian Trinh 640 Reputation points Microsoft External Staff Moderator
    2025-07-05T07:25:28.5533333+00:00

    Hello Rahul Thakur,

    Welcome to Microsoft Q&A.

    I understand your situation. Based on your description, your PC enters sleep mode unexpectedly even when no operations are performed, and unfortunately, the steps you’ve taken so far haven’t resolved the issue. When standard troubleshooting doesn’t help, you might consider using a tool to keep your computer awake and prevent it from entering sleep mode. One of the simplest options is to download PowerToys from the Microsoft Store, which includes a built-in tool called Awake that can help you achieve this. If you’re willing, feel free to give it a try and see if it makes a difference.

    Thank you for your patience and cooperation. Please keep me updated if you make any further progress.

     

    Best wishes

     

    Ian | Microsoft Q&A Support Specialist

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.