# How to enable rtc for wakeup-events

**URL:** <https://forums.balena.io/t/how-to-enable-rtc-for-wakeup-events/350674>\
**Category:** General\
**Created:** [December 24, 2021, 10:24am UTC](https://forums.balena.io/t/how-to-enable-rtc-for-wakeup-events/350674 "2021-12-24T10:24:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![luca1](https://avatars.discourse-cdn.com/v4/letter/l/919ad9/32.png) [@luca1](https://forums.balena.io/u/luca1)\
**Post date:** [December 24, 2021, 10:24am UTC](https://forums.balena.io/t/how-to-enable-rtc-for-wakeup-events/350674/1 "2021-12-24T10:24:19Z")

</div>

Hi,  
im trying to send my balenafin to sleep using the integrated rtc ds1307, i followed this [post](https://forums.balena.io/t/balena-fin-rtc-how-to/17301) after enabling the rtc i can successfully see it on the x68 address on bus 3 using i2cdetect with status UU, but when i try to run rtcwake i get the following error:

> $ sudo rtcwake -s 10  
> rtcwake: cannot open /sys/class/rtc/rtc0/device/power/power/wakeup: No such file or directory  
> rtcwake: /dev/rtc0 not enabled for wakeup events

running cat /proc/driver/rtc gives me no errors and returns me the correct rtc time, using sudo hwclock -w or -r i can successfully interact with the rtc too

adding `dtoverlay=i2c-rtc,ds1307,wakeup-source` to /boot/config.txt doesn’t fix the issue either.

---

<div class="post-metadata">

**Author:** ![anujdeshpande](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/anujdeshpande/32/3155_2.png) [@anujdeshpande](https://forums.balena.io/u/anujdeshpande)\
**Post date:** [December 28, 2021, 11:26am UTC](https://forums.balena.io/t/how-to-enable-rtc-for-wakeup-events/350674/2 "2021-12-28T11:26:32Z")

</div>

Hi

Just to confirm - you are using Raspbian on the balenaFin - is that right?

---

<div class="post-metadata">

**Author:** ![nitish](https://avatars.discourse-cdn.com/v4/letter/n/34f0e0/32.png) [@nitish](https://forums.balena.io/u/nitish)\
**Post date:** [December 28, 2021, 1:58pm UTC](https://forums.balena.io/t/how-to-enable-rtc-for-wakeup-events/350674/3 "2021-12-28T13:58:16Z")

</div>

Can you provide a `-mode` option to `rtcwake` and try this again? If that doesn’t work let’s check whether `wakeup-alarm` are actually working. Try a manual sleep timer via something like:

```auto
sudo sh -c ‘echo "+00-00-00 00:00:10" > /sys/class/rtc/rtc0/wakealarm'

```

Note: You would need to put the fin manually to sleep for this to work. If that is working then `rtc` should be fine.

-N

---

<div class="post-metadata">

**Author:** ![luca1](https://avatars.discourse-cdn.com/v4/letter/l/919ad9/32.png) [@luca1](https://forums.balena.io/u/luca1)\
**Post date:** [December 28, 2021, 2:50pm UTC](https://forums.balena.io/t/how-to-enable-rtc-for-wakeup-events/350674/5 "2021-12-28T14:50:39Z")

</div>

Yes raspbian

---

<div class="post-metadata">

**Author:** ![luca1](https://avatars.discourse-cdn.com/v4/letter/l/919ad9/32.png) [@luca1](https://forums.balena.io/u/luca1)\
**Post date:** [December 29, 2021, 10:17pm UTC](https://forums.balena.io/t/how-to-enable-rtc-for-wakeup-events/350674/6 "2021-12-29T22:17:02Z")

</div>

supplying a mode to the rtcwake with `rtcwake -m mem -s 10` gives a syntax error for some reason, im using raspbian v0.1.0 dowloaded from the official balenafin [website](https://www.balena.io/fin/1.1/docs/downloads/)  
Now regarding the manual sleep, i dont have the wakealarm file in ` /sys/class/rtc/rtc0/`  
so i can’t even do it manually

---

<div class="post-metadata">

**Author:** ![luca1](https://avatars.discourse-cdn.com/v4/letter/l/919ad9/32.png) [@luca1](https://forums.balena.io/u/luca1)\
**Post date:** [January 3, 2022, 10:38pm UTC](https://forums.balena.io/t/how-to-enable-rtc-for-wakeup-events/350674/7 "2022-01-03T22:38:45Z")

</div>

Hi nitish any suggestions?
