[SOLVED] Getting rtcwake to work on Debian Buster

Post Reply
chrizz
Posts: 37
Joined: Wed Jul 07, 2021 2:10 pm
languages_spoken: english, german
ODROIDs: HC4
Location: Germany
Has thanked: 11 times
Been thanked: 2 times
Contact:

[SOLVED] Getting rtcwake to work on Debian Buster

Post by chrizz »

Hello,
I have a HC4 with netboot installed Debian 10 and I'm trying to get rtcwake to work.
I followed this https://wiki.odroid.com/odroid-xu4/appl ... rtc_wakeup article and did

Code: Select all

echo `date '+%s' -d '+ 10 minutes'` | sudo tee /sys/class/rtc/rtc0/wakealarm
And rechecked the setting with

Code: Select all

cat /proc/driver/rtc
rtc_time	: 05:55:45
rtc_date	: 2021-07-12
alrm_time	: 06:05:41
alrm_date	: 2021-07-12
alarm_IRQ	: yes
alrm_pending	: no
update IRQ enabled	: no
periodic IRQ enabled	: no
periodic IRQ frequency	: 1
max user IRQ frequency	: 64
24hr		: yes
So far everything looked ok and I powered off the device.

Code: Select all

poweroff
But after 10 minutes nothing happened.

Is there something I missed to get this working?
Thanks in advance for any help.

User avatar
tobetter
Posts: 8209
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 476 times
Been thanked: 1291 times
Contact:

Re: Getting rtcwake to work on Debian Buster

Post by tobetter »

Sorry, unfortunately RTC wake up does not work with the kernel you are running, it does not have wake up feature from external source which is not implemented yet.

chrizz
Posts: 37
Joined: Wed Jul 07, 2021 2:10 pm
languages_spoken: english, german
ODROIDs: HC4
Location: Germany
Has thanked: 11 times
Been thanked: 2 times
Contact:

Re: Getting rtcwake to work on Debian Buster

Post by chrizz »

tobetter wrote:
Mon Jul 12, 2021 6:40 pm
Sorry, unfortunately RTC wake up does not work with the kernel you are running, it does not have wake up feature from external source which is not implemented yet.
This is sad news.
Is it possible for me to use another kernel?
Should I use another OS?

I wanted to setup a backup machine which wakes up at midnight, does its backup and then goes to powersave again.

User avatar
tobetter
Posts: 8209
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 476 times
Been thanked: 1291 times
Contact:

Re: Getting rtcwake to work on Debian Buster

Post by tobetter »

chrizz wrote:
Mon Jul 12, 2021 7:37 pm
tobetter wrote:
Mon Jul 12, 2021 6:40 pm
Sorry, unfortunately RTC wake up does not work with the kernel you are running, it does not have wake up feature from external source which is not implemented yet.
This is sad news.
Is it possible for me to use another kernel?
Should I use another OS?

I wanted to setup a backup machine which wakes up at midnight, does its backup and then goes to powersave again.
I believe you had installed Debian Buster using the Netboot Installer, you will need to work to make it boot.
Give me a week if I can make a workaround, my first though is to add crontab like feature to the Petitboot.

If you want to try another Debian I highly recommend the version from @meveric, I believe his Debian runs with Hardkernel's stock 4.9 kernel + @.
viewtopic.php?f=203&t=38729

If you like to try with the current installation, I think you can install 4.9 kernel. Maybe you can try this, this would make you have several boot menus with different kernel version 4.9.241 and 5.11.0 on the Petitboot after rebooting. I know it will work, but not sure if it works with RAID1 since I've not tested yet.

Code: Select all

sudo apt update
sudo apt install odroid-grub2 linux-image-4.9.241-odroidg12-arm64
sudo apt update-grub2

chrizz
Posts: 37
Joined: Wed Jul 07, 2021 2:10 pm
languages_spoken: english, german
ODROIDs: HC4
Location: Germany
Has thanked: 11 times
Been thanked: 2 times
Contact:

Re: Getting rtcwake to work on Debian Buster

Post by chrizz »

tobetter wrote:
Mon Jul 12, 2021 9:45 pm
I believe you had installed Debian Buster using the Netboot Installer, you will need to work to make it boot.
Give me a week if I can make a workaround, my first though is to add crontab like feature to the Petitboot.
Sure, I'm in no hurry. I would be very happy if you can find a workaround.
In the meantime I'll try the alternatives you mentioned.

Thank you.

User avatar
tobetter
Posts: 8209
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 476 times
Been thanked: 1291 times
Contact:

Re: Getting rtcwake to work on Debian Buster

Post by tobetter »

chrizz wrote:
Tue Jul 13, 2021 12:09 am
tobetter wrote:
Mon Jul 12, 2021 9:45 pm
I believe you had installed Debian Buster using the Netboot Installer, you will need to work to make it boot.
Give me a week if I can make a workaround, my first though is to add crontab like feature to the Petitboot.
Sure, I'm in no hurry. I would be very happy if you can find a workaround.
In the meantime I'll try the alternatives you mentioned.

Thank you.
Hey, just want to let you know that I would found a solution for RTC wake up with Linux 5.x kernel on ODROID-HC4 and I am going to apply the chage and test for sure. Since I am also thinking of supporting Wake-On-Lan in the next release, the update could take a bit more. If Wake-On-Lan is not feasible in short-term, let me finish the work around for RTC wake up for you and I will let you know how to update your ODROID-HC4. :crossfinger:
These users thanked the author tobetter for the post (total 2):
odroid (Fri Jul 16, 2021 2:49 pm) • chrizz (Fri Jul 16, 2021 9:19 pm)

Krulle
Posts: 4
Joined: Fri Jul 02, 2021 3:25 pm
languages_spoken: english, german
ODROIDs: HC4
Has thanked: 0
Been thanked: 0
Contact:

Re: Getting rtcwake to work on Debian Buster

Post by Krulle »

Hello all,

I am also interested int the rtc wape up and happy about the solution.
:D

User avatar
rooted
Posts: 8664
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 743 times
Been thanked: 367 times
Contact:

Re: Getting rtcwake to work on Debian Buster

Post by rooted »

tobetter wrote:
chrizz wrote:
Tue Jul 13, 2021 12:09 am
tobetter wrote:
Mon Jul 12, 2021 9:45 pm
I believe you had installed Debian Buster using the Netboot Installer, you will need to work to make it boot.
Give me a week if I can make a workaround, my first though is to add crontab like feature to the Petitboot.
Sure, I'm in no hurry. I would be very happy if you can find a workaround.
In the meantime I'll try the alternatives you mentioned.

Thank you.
Hey, just want to let you know that I would found a solution for RTC wake up with Linux 5.x kernel on ODROID-HC4 and I am going to apply the chage and test for sure. Since I am also thinking of supporting Wake-On-Lan in the next release, the update could take a bit more. If Wake-On-Lan is not feasible in short-term, let me finish the work around for RTC wake up for you and I will let you know how to update your ODROID-HC4. :crossfinger:
Awesome, WoL is much more useful for me than RTC wake but it's nice to have options.

User avatar
tobetter
Posts: 8209
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 476 times
Been thanked: 1291 times
Contact:

Re: Getting rtcwake to work on Debian Buster

Post by tobetter »

Krulle wrote:
Fri Jul 16, 2021 3:40 pm
Hello all,

I am also interested int the rtc wape up and happy about the solution.
:D
Oh, well...not to make you upset, I opened your thread regarding to WOL to share the progress but not updated since I was replying something else. :)

User avatar
tobetter
Posts: 8209
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 476 times
Been thanked: 1291 times
Contact:

Re: Getting rtcwake to work on Debian Buster

Post by tobetter »

Well...since I've posted the RTC wake up here, let me update a bit more about the progress that wake up by RTC or Lan only can be feasible when the device is shutdown, not in suspend. So the use case is like ODROID-HC4 boots, and do something - back up or mirroring whatever, then make it shutdown then ODROID-HC4 could wake up / start by RTC or Lan.
Let me back when I have a piece to share with you guys.

chrizz
Posts: 37
Joined: Wed Jul 07, 2021 2:10 pm
languages_spoken: english, german
ODROIDs: HC4
Location: Germany
Has thanked: 11 times
Been thanked: 2 times
Contact:

Re: Getting rtcwake to work on Debian Buster

Post by chrizz »

tobetter wrote:
Fri Jul 16, 2021 4:16 pm
wake up by RTC or Lan only can be feasible when the device is shutdown, not in suspend. So the use case is like ODROID-HC4 boots, and do something - back up or mirroring whatever, then make it shutdown then ODROID-HC4 could wake up / start by RTC or Lan.
Well, this is exactly what I am looking for since I don't like to waste precious energy. This would be very nice.
But take your time and let me know if I can test anything for you.

Have a happy weeks ending!
These users thanked the author chrizz for the post:
tobetter (Fri Jul 16, 2021 9:25 pm)

User avatar
tobetter
Posts: 8209
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 476 times
Been thanked: 1291 times
Contact:

Re: Getting rtcwake to work on Debian Buster

Post by tobetter »

rooted wrote:
Fri Jul 16, 2021 3:54 pm
tobetter wrote:
chrizz wrote:
Tue Jul 13, 2021 12:09 am
tobetter wrote:
Mon Jul 12, 2021 9:45 pm
I believe you had installed Debian Buster using the Netboot Installer, you will need to work to make it boot.
Give me a week if I can make a workaround, my first though is to add crontab like feature to the Petitboot.
Sure, I'm in no hurry. I would be very happy if you can find a workaround.
In the meantime I'll try the alternatives you mentioned.

Thank you.
Hey, just want to let you know that I would found a solution for RTC wake up with Linux 5.x kernel on ODROID-HC4 and I am going to apply the chage and test for sure. Since I am also thinking of supporting Wake-On-Lan in the next release, the update could take a bit more. If Wake-On-Lan is not feasible in short-term, let me finish the work around for RTC wake up for you and I will let you know how to update your ODROID-HC4. :crossfinger:
Awesome, WoL is much more useful for me than RTC wake but it's nice to have options.
RTC wake up is a friend of a lazy routine job, are you going to use Wake-On-Lan with HC4 or C4?

User avatar
tobetter
Posts: 8209
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 476 times
Been thanked: 1291 times
Contact:

Re: Getting rtcwake to work on Debian Buster

Post by tobetter »

@chrizz and @Krulle, new Petitboot version has been uploaded. Download this file and copy to SD card as spiboot.img, so your ODROID-HC4 will update on next rebooting. This version also includes RAID support which I've worked with @chrizz last week.
http://ppa.linuxfactory.or.kr/images/pe ... 210716.img

This version includes RTC wake up with the current Linux kernel on Debian. I've not prepared a documentation yet, but the instructions are identical to the on in Hardkernel's Wiki.
https://wiki.odroid.com/common/applicat ... rtc_shield

Also new version has the fix for Wake-on-Lan and have tested with Ubuntu 21.04 and it works. Whilist Debian 10 does not allow to set Wake-on-Lan with ethtool, so I am looking into it what makes the difference. Let me inform you @Krulle, when new kernel is uploaded after testing. :crossfinger:
These users thanked the author tobetter for the post:
chrizz (Mon Jul 19, 2021 2:49 pm)

User avatar
rooted
Posts: 8664
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 743 times
Been thanked: 367 times
Contact:

Re: Getting rtcwake to work on Debian Buster

Post by rooted »


tobetter wrote: RTC wake up is a friend of a lazy routine job, are you going to use Wake-On-Lan with HC4 or C4?
You can just as easily use WoL when you have a house full of devices, just add it to a cron job on one of them.

RTC wake is nice if the device isn't connected or you just need it to be standalone.

I have no current need, but I do use WoL. Don't let my input sway your priorities of which to implement.

chrizz
Posts: 37
Joined: Wed Jul 07, 2021 2:10 pm
languages_spoken: english, german
ODROIDs: HC4
Location: Germany
Has thanked: 11 times
Been thanked: 2 times
Contact:

Re: Getting rtcwake to work on Debian Buster

Post by chrizz »

tobetter wrote:
Sat Jul 17, 2021 12:53 pm
@chrizz and @Krulle, new Petitboot version has been uploaded. Download this file and copy to SD card as spiboot.img, so your ODROID-HC4 will update on next rebooting. This version also includes RAID support which I've worked with @chrizz last week.
http://ppa.linuxfactory.or.kr/images/pe ... 210716.img
Wow, you nailed it again. It was working out of the box after the petitboot update. Thank you very much.
These users thanked the author chrizz for the post:
tobetter (Mon Jul 19, 2021 2:49 pm)

User avatar
tobetter
Posts: 8209
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 476 times
Been thanked: 1291 times
Contact:

Re: Getting rtcwake to work on Debian Buster

Post by tobetter »

chrizz wrote:
Mon Jul 19, 2021 2:49 pm
tobetter wrote:
Sat Jul 17, 2021 12:53 pm
@chrizz and @Krulle, new Petitboot version has been uploaded. Download this file and copy to SD card as spiboot.img, so your ODROID-HC4 will update on next rebooting. This version also includes RAID support which I've worked with @chrizz last week.
http://ppa.linuxfactory.or.kr/images/pe ... 210716.img
Wow, you nailed it again. It was working out of the box after the petitboot update. Thank you very much.
Thank you for the confirmation, Petitboot support becomes rich. Next official release will have RAID and RTC, hope WOL can be included. :)
These users thanked the author tobetter for the post:
chrizz (Tue Jul 20, 2021 12:05 am)

Krulle
Posts: 4
Joined: Fri Jul 02, 2021 3:25 pm
languages_spoken: english, german
ODROIDs: HC4
Has thanked: 0
Been thanked: 0
Contact:

Re: Getting rtcwake to work on Debian Buster

Post by Krulle »

Hello,

the RTC also works for me (with kernel 5.13).
I have not tried WoL.

But that is enough for me. With it, I can run the HC4 at rush hour :)

Thanks a lot.

Post Reply

Return to “Other OS”

Who is online

Users browsing this forum: No registered users and 0 guests