MythTV auto startup really working now

| No Comments | No TrackBacks
I've previously posted about my mythtv box, and how I was struggling to get the auto power up features working. I can now say I've fixed it. But this time I've waiting a while to write a blog post saying that, so I can be sure it's really working.

And it turns out the instructions at http://www.mythtv.org/wiki/ACPI_Wakeup were on the money, but for whatever reason, I had some conceptual blocks that prevented me understanding them.

Firstly, those instructions tell you to set various mythtv-setup settings to call the mythshutdown binary, and to put configure other shutdown settings in the mythtvwelcome configuration. I now understand that the mythshutdown program ca be thought of as a helper for mythtvwelcome. The settings you configure in the mythtvwelcome screens are used to control how mythshutdown behaves.

My rebooting loop in my last blog post was because I hadn't set the mythwelcome settings to have the 'nvram-wakeup restart command' set to empty. If it's not empty mythshutdown assumes it needs to reboot (because prior to ACPI shutdown you had to do that to program the nvram bootup method).

I also found I had used an incorrect time format in various places. At one point I my script was trying to write a yyyy-MM-ddThh:ss style string to /sys/class/rtc/rtc0/wakealarm. That doesn't work, it needs the number of seconds since epoch. As well as that, at one point I was trying to pass the number of seconds since epoch to mythshutdown, which expects time in the yyyy-MM-ddThh:ss format.

In the last couple of weeks I've learned:
  • what to look for in /var/log/mythtv/mythbackend.log, 
  • that browsing the mythtv source code is helpful, 
  • it's good for my setwakeup script to log what it's doing,
  • that logging the output of 'cat /proc/driver/rtc' in my setwakeup script is really helpful to double check what's going on.
So now here I am, almost 12 months later and the problem is fixed. If only I'd paid more attention to Greg's comment last July about his nvram setting fixup.

No TrackBacks

TrackBack URL: http://geoff-blog.cromp.id.au/cgi-bin/movabletype/mt-tb.cgi/176

Leave a comment