Dabba system is usually started in one of the three following ways:

  • User power on
This is the normal starting of the Dabba system by pressing the power button. In this mode both the mythtv front end and backends are started. System needs to be manually shutdown.

One interesting thing here is the implementation of the blackout period (kids study time !!) during which if the system is powered on, the mythtv frontend is not started. This causes the backend to power down the system after a few minutes.
  • System auto-start
This is the auto wakeup of the system triggered by a scheduled recording. There are two methods for wakeup: one based on ACPI and other one based on the RTC wakeup programmed through nvram.

Dabba1 target did not support ACPI wakeup and had a serious limiation of the RTC wakeup. RTC wakeup would work only if the wakeup timeout was manually entered through BIOS and would fail if the wakeup timeout was programmed using  nvram. The  VDR project folks already had a neat trick to get around this problem: Here the wakeup time is set at a fixed date/time, something like 1st July 2000, 12:00:00. Next, disable the system time updation by the initscripts during the system startup and shutdown. Now, if we want the system to wakeup three hours from now, set the system date/time to June 30th, 9:00:00 and then power down. When RTC wakeup starts the system, then own scripts (not the linux initscripts) recognise the situation and adjust the system date/time accordingly based on the info stored earlier. This setup mostly works, however sudden power failures during system startup or shutdown may throw a monkey wrench at the scheme.

On Dabba2 target,  ACPI wakeup is working very well so none of this fiddling is required.
  • AC power fail and recovery
This behavior is a BIOS option and it is handled as above. One problem here is that  if the AC power fail and recovery happens after an auto-start then the restart is handled as "User power on". mythbackend will continue with  the recording but after the recording the system will not shutdown. Instead an idle frontend will sit around...


Hibernating the system rather than powering down is another option. But it looks complicated to handle the AC power fail and the RTC wakeup limiation.