Use the command line to find what causes the PC to wake up
One way to find out what is causing a wake-up problem is provided by the command line. Open a command prompt with elevated privileges and enter this command:
The last device that woke up the system will be shown.
To find out which devices are enabled to wake up the PC, enter this command
powercfg -devicequery wake_armed
These commands are the same in Windows 7 on up through Windows 10.