Old GeForce Experience Bug Won’t Let Some PCs Sleep But There’s A Fix
Many times it's easy to find the cause of sleep issues; just go to an administrative command prompt and enter powercfg /requests to see what's keeping the system up at night. However, that didn't work for one developer named Dmitry. Windows Power Management tools were of no help, as there were no outstanding requests. Dmitry outlined the investigative process on his blog, Details of Note, and it's a fun read. He'd gotten a new flight stick, and that was the only change to his machine, so it was time to go to Google.
What he discovered is that most folks who had a controller keeping a system awake managed to track it down to the GeForce Experience game library application. Why on earth would NVIDIA's optimization tool stop a PC from sleeping just because a controller changed? According to the Windows control panel, there wasn't any analog drift causing the system to register input. As it turns out, it's
Shadow Play is a fun part of GeForce Experience that is always keeping track of what's going on in a game and recording the last little bit of game play using the GeForce GPU's video encoder. Then when something the player wants to save happens in the game, hit a hotkey and that video is committed to the disk. It's a great tool to share gameplay videos on YouTube or social media.
As Dmitry outlined in
He wrote a utility to keep track of when the system last received input from any device using Microsoft's XInput API, and it correctly identified that there was no input. Then he hooked into NVIDIA's Share utility with x64dbg to look for a cause. He discovered that the Shadow Play overlay was constantly polling raw input devices looking for anything, and if it found something it'd keep the display active. Just having the joystick plugged in seemed like enough to make the overlay think it found some input. So right here, we can see that if a PC isn't sleeping while GeForce Experience is running, unplugging any controller might be enough to fix it. So would quitting the GeForce Experience app.
However, if this is happening to you and you want to leave everything set up the way it is, Dmitry put together a PowerShell script to fix it. This script looks for the libcef.dll file used by GeForce Experience and examines some bytes at a specific address. If those byte values match up, then the script will kill the process and apply a one-byte patch library file. This prevents GFE from polling raw input, and the PC will resume power management as normal. However, since NVIDIA's support team has acknowledged Dmitry's report, we could just simply wait for a new version of the app to land.