[mythtv-users] can't get wakealarm to write to BIOS

Marius Schrecker marius.schrecker at lyse.net
Fri Dec 8 18:53:14 UTC 2017


Hi,

  I'm setting up a new, dedicated mythtv backend system, which should only power on when needed.
 The board is an asus M3A78-CM and Power on From S5 By RTC Alarm is enabled, as is Power on From S5 By PME, which works for wakeonlan events.

System / HWclock time is UTC while I am currently at UTC+1

  The system is running Ubuntu 17.10 (GNU/Linux 4.13.0-19-generic x86_64) and I have tried following the MythTV wiki for RTC wakeup:

$ dmesg | grep rtc
[    1.593134] rtc_cmos 00:01: RTC can wake from S4
[    1.593289] rtc_cmos 00:01: rtc core: registered rtc_cmos as rtc0
[    1.593316] rtc_cmos 00:01: alarms up to one month, y3k, 114 bytes nvram, hpet irqs
[    1.606411] rtc_cmos 00:01: setting system clock to 2017-12-08 17:46:39 UTC (1512755199)


$ dmesg | grep hpet
[    0.000000] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 133481069984 ns
[    0.000000] hpet clockevent registered
[    0.094187] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0
[    0.094187] hpet0: 4 comparators, 32-bit 14.318180 MHz counter
[    0.096038] clocksource: Switched to clocksource hpet
[    1.593316] rtc_cmos 00:01: alarms up to one month, y3k, 114 bytes nvram, hpet irqs


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

$cat /sys/class/rtc/rtc0/wakealarm

[returns nothing]

$date
fr. 08. des. 19:42:53 +0100 2017
$sudo bash -c "echo `date '+%s' -d '+ 6 minutes'` > /sys/class/rtc/rtc0/wakealarm"
$ cat /sys/class/rtc/rtc0/wakealarm
1512758974
$ date -d @1512758974
fr. 08. des. 19:49:34 +0100 2017

$ cat /proc/driver/rtc
rtc_time        : 18:45:28
rtc_date        : 2017-12-08
alrm_time       : 18:49:34
alrm_date       : 2017-12-08
alarm_IRQ       : yes
alrm_pending    : no
update IRQ enabled      : no
periodic IRQ enabled    : no
periodic IRQ frequency  : 1024
max user IRQ frequency  : 64
24hr            : yes
periodic_IRQ    : no
update_IRQ      : no
HPET_emulated   : yes
BCD             : yes
DST_enable      : no
periodic_freq   : 1024
batt_status     : okay
/proc/driver/rtc (END)


BUT, if I reboot, the wakeup time in BIOS has not been written by the system and the wakeup time is set to a completely different date (currently 12:30 UTC on december 15th), this is unaffected if I try again, setting a different time from within Linux.



Can anyone see what is not working/what I'm doing wrong?

BR.

Marius






  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20171208/dc11339e/attachment.html>


More information about the mythtv-users mailing list