FIRST of all: Don't mark this question as duplicate. As I saw there are similar questions here but there is no useful answer.
As a developer I have Windows XP, 7 and 10 on one computer. On Windows XP and 10 there is no problem with sleep or hibernate mode. I let the computer sleep and all goes off: The LEDs in keyboard and mouse, the harddisk and CPU fan. The computer seems to be completely off, only the Power LED is blinking. Nothing happens when I use mouse or keyboard while it sleeps. I must press the power button to wake it up. This is perfect.
I want the same behavior on Windows 7, too. But on Windows 7 I click Sleep or Hibernate and only the monitor goes off. All the rest stays on and just moving the mouse turns the monitor on again and shows the log on button. It does not want to sleep at all.
I did all described on this page (power plan, disable wake up timers,..) https://support.microsoft.com/en-us/topic/windows-7-does-not-go-to-sleep-cb84a4b5-4116-cfb5-a237-5cb287e34320#top with no success.
I configured all devices so that the command
Powercfg -devicequery wake_armed returns an empty list now.
Also this page did not help: https://www.computerperformance.co.uk/windows-7/sleep-problem/
Then I found this page which I found more useful: https://support.microsoft.com/en-us/topic/guided-help-get-a-detailed-power-efficiency-diagnostics-report-for-your-computer-in-windows-7-3f6ce138-fc04-7648-089a-854bcf332810
which explains how to use the command
powercfg -energy to diagnose the cause of the problem.
This command generates a file "energy-report.html".
First I got 5 errors of 5 devices which prevent Windows from sleeping. Among them the USB Root hubs which had the Microsoft default drivers. I installed the AMD drivers for the mainboard. After that I had 2 errors less. Only the USB 3.0 drivers are from AMD, the USB 2.0 drivers are still from Microsoft causing problems.
But these 3 are still remainaing:
USB Suspend:USB Device not Entering Suspend The USB device did not enter the Suspend state. Processor power management may be prevented if a USB device does not enter the Suspend state when not in use. Device Name USB Root Hub Host Controller ID PCI\VEN_1022&DEV_7807 Host Controller Location PCI bus 0, device 18, function 0 Device ID USB\VID_1022&PID_7807 Port Path USB Suspend:USB Device not Entering Suspend The USB device did not enter the Suspend state. Processor power management may be prevented if a USB device does not enter the Suspend state when not in use. Device Name USB Composite Device Host Controller ID PCI\VEN_1022&DEV_7807 Host Controller Location PCI bus 0, device 18, function 0 Device ID USB\VID_060B&PID_650A Port Path 1 USB Suspend:USB Device not Entering Suspend The USB device did not enter the Suspend state. Processor power management may be prevented if a USB device does not enter the Suspend state when not in use. Device Name USB Input Device Host Controller ID PCI\VEN_1022&DEV_7807 Host Controller Location PCI bus 0, device 18, function 0 Device ID USB\VID_0458&PID_0188 Port Path 2
Below the article there is no help how to solve these problems. The stupid advice from Microsoft is:
If you encounter power related issues and you do not know how this report could help you, you can send the report to a friend to ask for help.
Additionally Microsoft is not able to display the names of the devices, but I figured it out manually:
- PCI\VEN_1022&DEV_7807 is "Standard OpenHCD USB Host Controller".
- USB\VID_1022&PID_7807 is "USB Root Hub"
- USB\VID_060B&PID_650A is "HID Keyboard Device"
- USB\VID_0458&PID_0188 is "HID Compliant Mouse"
All the drivers are from Microsoft.
I have configured both mouse and keyboard not to wake up the computer:
So I suppose they should also not prevent sleep mode.
My mouse is a Genius Ammox X1-400 and the keyboard is a Cougar Attack X3 RGB.
I installed what the vendors offer on their homepages, but these are only configuration software (for LED colors and button functionality). After installing all these downloads Control panel still shows the Microsoft HID drivers.
Are all three Microsoft drivers buggy? And they never fixed that not even in the service pack? What else can I try to get this working? How can this be so difficult?
As r2d3 suggested I disconnected my mouse and keyboard and used another very cheap Genius mouse to start sleep mode while logging the file "energy-report.html". Now it complains about the other mouse and the USB Root Hub USB\VID_1022&PID_7807. Interestingly this root hub appears twice in the HTML file: Once as error: "The USB device did not enter the Suspend state." and once as warning: "The USB device intermittently suspended during the trace." I disabled the driver for "Standard OpenHCD USB Host Controller" which strangely does not affect my USB devices but the error remains.
There are no BIOS setting concerning sleep mode of USB devices. And as Windows XP and 10 both go to sleep with the same BIOS settings, the BIOS is surely not the cause.
I googled for "Allow the computer to turn off this device to save power" which is a grayed out checkbox of mouse and keyboard power management. I doubt that this checkbox is the cause of the problem because Windows 10 has exactly the same checkboxes and this one is also disabled and unchecked but Windows 10 goes to sleep without any problem. However I tried what I found here: https://www.thewindowsclub.com/allow-computer-turn-device-save-power This article says to set a registry value
PnPCapabilitiesof the mouse driver to zero which should enable this checkbox. But this registry value (which originally did not exist) has no effect on my Windows 7. Then I verified this with my network adapter which also has this checkbox and it is enabled. The checkbox "Allow the computer to turn off this device to save power" toggles the registry value "PnPCapabilities" of "Realtek PCIe GBE Family Controller" between 0 (checked) and 0x18 (=24) (unchecked) So the article is wrong. This value is the check state of the checkbox and does not affect if the checkbox is enabled or disabled.
This page https://answers.microsoft.com/en-us/windows/forum/all/usb-devices-are-not-entering-selective-suspend/bfd1b57b-0536-4f4c-a1dc-ff7ba7b66f15 says to disable "USB selective suspend" but then I even get more errors.