kernel: add auto wakeup mechanism.