nicehash / excavator

NiceHash's proprietary low-level CUDA miner
https://www.nicehash.com
53 stars 19 forks source link

Preventing Sleep on Windows #308

Open DanielBaulig opened 3 years ago

DanielBaulig commented 3 years ago

The excavator process prevents Windows from sleeping. While this makes a lot of sense while mining, it might not make sense while excavator is just idling.

It might make sense to allow for a toggle of this behavior through commands, that way a user can choose if they want to prevent the computer from sleeping while not mining.

nicehashdev commented 3 years ago

What would be the reason to keep it idling instead of turning it off?

DanielBaulig commented 3 years ago

NiceHash Quick Miner will respawn the process even if I killed it. Regardless of that though, I would like to be able to start and stop mining from NiceHash API for as long as the computer isn’t sleeping.

DanielBaulig commented 3 years ago

Any chance we can get this behavior/feature?

I'm controlling my Excavator to only run at off-peak times to increase power cost efficiency, but since Excavator will idle in the background even while not mining it will prevent my computer from sleeping/hibernating, driving up my power consumption again.

musahi0128 commented 3 years ago

Do you have fixed off-peak times ? I schedule my computer to sleep every 2 hour for 5 minutes using Windows Scheduler+PSTool to go to sleep and WakeupOnStandby to wake the computer. No matter what the excavator doing, my computer will go to sleep and wake up at that scheduled time.

cbarbosa2 commented 3 years ago

I have a similar problem, where I start/stop mining through the NiceHash API and when not mining I would like the computer to be able to go to sleep or I'll have the computer on for no reason. Btw. I use Wake-On-Lan to bring the computer out of sleep when the command to start mining is sent.