A power outlet is a precious thing and when there aren’t enough in a room to meet your needs, you have to pick your favorite (possibly the most productive) device and give it a lifeline. Even when power outlets are available in abundance, we tend to charge our phones by connecting them to our computers. This allows us to work with charging cables that are absurdly short in length, and to keep our phones on the same desk we’re working on. The phone charges while you work but if you were to close the lid and let your computer enter Sleep mode, your phone would cease to charge. Here’s how you can continue charging your phone even with the laptop lid closed and your system in Sleep mode. This works in Windows 7 and above.
Open Device Manager (right-click My Computer, select Properties, and Click Device Manager on the left). Expand the Universal Serial Bus Controller section. You will see a few devices called ‘USB Root Hub’. Click on each one and go to its properties. In the Properties window for each USB Root Hub, go to the Power Management tab and uncheck the ‘Allow the computer to turn off this device to save power’ option.
Once you do this for all USB Root Hub devices, you will be able to continue charging your phone even if your close your laptop lid.
In the event that this doesn’t work, it might be because USB Wake Support is disabled on your laptop. To enable it, you will need to go to your laptop’s BIOS. Enabling USB Wake Support will differ for laptop manufacturers so you will have to Google how to do it for your one.