HP Envy Laptop

After deploying several new HP laptops in the past few months, I have noticed once complaint from almost all users. Many users are reporting that their PC will go to sleep after roughly two minutes of not being in use. I had gone through the normal troubleshooting avenues of checking sleep settings and display timeout settings, to find they were set correctly. Even when set to go to sleep never, this behavior was still occurring. I came to find that this behavior is from a misbehaving feature called System Unattended Sleep Timeout. The purpose of this feature is, when the PC is woken up from a Wake on LAN event, it will use this timer rather than the user set sleep timer. The problem we are seeing is that it takes over after any wake event, even user interaction. It seems that on these new HPs, the default timer is 2 minutes. This may be happening on other brands, but I have not experienced it myself. 

Now the fix. Normally, this kind of thing could be found in Advanced Power Settings. To access this, navigate Settings > System > Power & Sleep > Additional Power Settings > Change Plan Settings > Change Advanced Power Settings > Sleep. The problem is that this setting is missing in power options. We have to make a change to the registry to reenable it. If you open regedit.exe and navigate to HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control > Power > PowerSettings > 238C9FA8-0AAD-41ED-83F4-97BE242C8F20 > 7bc4a2f9-d8fc-4469-b07b-33eb785aaca0, you will see an entry called attributes on the right. If you double click this to edit, you can change the value from 1 to 2. Upon returning to advanced power settings, you will find the System Unattended Sleep Timeout feature is now available. You can change this value to match your normal sleep timeout to resolve this issue. Hopefully, this will be fixed in future builds.