There was an issue of the computer going to sleep in 2 minutes even though the sleep setting was set to never

Turns out there is a hidden option for a setting called system unattended sleep timeout

The following worked on Windows 10 and 11

First go to the following registry key:

HKEY_LOCAL_MACHINE>SYSTEM>CurrentControlSet>Control>Power>PowerSettings>238C9FA8-0AAD-41ED-83F4-97BE242C8F20>7bc4a2f9-d8fc-4469-b07b-33eb785aaca0

Open Attributes and change the setting to 2

Next go to control panel and power settings and change advanced settings

Expand sleep and you should see System unattended sleep timeout

I changed it to 1000 so the problem won’t happen again

Reference:

https://www.isunshare.com/windows-10/how-to-stop-windows-10-from-going-into-sleep-mode-randomly.html