Fix extra CPU usage

Workaround for the extra CPU usage problem when the miner running in background (no screen attached)