That's indeed NOT possible.
Well,on the
local pc with the USB hardware attached there are events to alert you that the pc is about to enter sleep mode and just after it awakes. (Both Linux and Windows at least)
If you want to monitor these events remotely, you can send these events via a Daemon to the control PC. That Daemon or service can control and hold up sleep until a notification is send to the control PC.
In Windows that (very simple) service would listen for
WMQueryEndSession, do
ShutdownBlockReasonCreate, (notify the controlling computer here) , and do
ShutdownBlockReasonDestroy. In Linux there is something similar, but I have to look that up.
You could also listen for WM_POWERBROADCAST message in your service and check for PBT_APMSUSPEND and PBT_APMRESUMESUSPEND. (Dunno for sure how that works)
For startup I suspect that it is enough to send a notification from the service that the service has started or resumed to the controlling computer, provided the service is started after the network services.
But anyway on Windows it's pretty straightforward. I will investigate a Linux solution.
[edit]
I found this
http://stackoverflow.com/questions/8197477/how-to-make-java-app-detect-that-the-linux-pc-has-resumed-from-suspended-statewhich seems doable in FPC.
Don't use Lazarus components to write this. Use pure FPC.