Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

RTC alams are working great for waking up my system when I want to record a program, but if I decide that I don't want my system to wake when it is scheduled to, I'm finding it hard to disable that previously scheduled alarm. I've tried:

sudo sh -c "echo 0 > /sys/class/rtc/rtc0/wakealarm"

but when I subsequently do:

cat /proc/driver/rtc

The alarm has been changed to 5 minutes in the future.

I've also tried:

sudo sh -c "echo `date '+%s' -d '- 5 minutes'` > /sys/class/rtc/rtc0/wakealarm"

but that also moves the alarm to 5 minutes in the future (instead of the intended 5 mins in the past). For now I just unplug the laptop to disable the wake up, since it will not wake up a laptop on battery power. Any ideas of how to disable the RTC alarm? Thanks.

share|improve this question

1 Answer 1

That is how I expect it to work. Have you tried seeing if it will actually wake up?

This is what it looks like when I turn an alarm on:

$ sudo bash -c "echo $(date +'%s' -d '20 minutes') > /sys/class/rtc/rtc0/wakealarm"
$ cat /proc/driver/rtc 
rtc_time        : 13:25:55
rtc_date        : 2013-01-07
alrm_time       : 19:45:54
alrm_date       : 2013-01-07
alarm_IRQ       : yes          # Alarm is now on
alrm_pending    : no
...

And when I turn it off:

$ sudo bash -c "echo 0 > /sys/class/rtc/rtc0/wakealarm"
$ cat /proc/driver/rtc 
rtc_time        : 13:28:09
rtc_date        : 2013-01-07
alrm_time       : 13:33:07
alrm_date       : 2013-01-07
alarm_IRQ       : no          # Alarm is now off
alrm_pending    : no
...
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.