PC power management using arduino

For a project i need to manage power usage in PC by using an externally connected arduino (through USB). Power management is done by putting the Personal Computer into lower power usage states like sleep, hibernate or shut down. So upon non usage of PC over fixed time, the arudino must detect the non usage and send commands to PC to change the state.

Is it possible to program an arduino to work in this way?
If yes, please help me with the steps and code. I am totally new to arduino usage and programming. Any help would surely be of great use :slight_smile: :slight_smile: .

Such a thing would rely on a program on the PC to report activity to the arduino and to perform the switch into a different power state when told to do so. Which brings up the question of what value the arduino is adding.