The decision of whether or not to leave the USB port's power circuit enabled when the system is in ("Sleep" / "Suspend to RAM") is left up to the motherboard BIOS/firmware. It may even have a BIOS option you can configure for this purpose, to enable/disable the USB power when the system is asleep or even turned off.
USB controllers are usually connected to the CPU using something like PCI or PCI Express. PCI and PCI-E support Power Management Events, which are essentially what is used by an on-motherboard NIC to tell the system that it's being woken up due to a WOL. In theory, if the USB controller were receiving standby power from the PCI(-E) bus, it could then decode a wake on LAN magic packet from a USB device, and translate that into a PCI(-E) PME, which would trigger the wake.
First thing you must enable USB wake-up from BIOS and turn OFF eco/safe power management
simply you can know if that work or not by connecting a mouse/keyboard to USB and look if your mouse work when your PC turned OFF
If there is no option for that just update your BIOS
In Device Manager, go to the properties of your PCI-USB host controller, then go into the tab named Power Management. Here you have a Wake up option/Magic Packet , select that one
Now you can wake up a PC from both mode sleep/shutdown
It's all about to send a Magic Packet over serial port but wait how Magic Packets work?! :o
The magic packet is a broadcast frame containing anywhere within its payload 6 bytes of all 255 (XX XX XX XX XX XX in hexadecimal), followed by sixteen repetitions of the target computer's 48-bit MAC address, for a total of 102 bytes.
The trick here is to make your Arduino have fake MAC & IPaddress to act like network adapter
ok everything clear, now for coding side
You need 2 PC on the same network first one will send WOL command the second for receiving
the second PC will be ON too and running WOL packets sniffer
Now when the second PC receive Magic packet your sniffer will capture that code, and that's exactly the same command your Arduino will be use
run any command line from below inside CMD and don't forget to change it to your IP/MAC of the second PC
WakeMeOnLan.exe /wakeup 192.168.1.25
WakeMeOnLan.exe /wakeup 40-65-81-A7-16-23
WakeMeOnLan.exe /wakeup Comp02 30000 192.168.0.255
WakeMeOnLan.exe /wakeup 192.168.1.25 20000 192.168.1.255
Run this program on the second PC download from here or use any sniffer you like
you will receive something like that on the second PC
copy the last section ROW DATA and use it inside your Arduino
That's it :)
what about baud rate?!
try all values and look witch one have the less errors.
If you want to wake up PC from sleep mode just send anything from your Arduino via serial port it's more simple