MythTV server won’t shut down automatically any longer
Today my mythTV based media homeserver suddenly would not automatically shutdown any longer after a kernel update.
Logs by mythbackend (/var/log/mythtv/mythbackend ) that triggers the shutdown looked like this:
localhost mythbackend: I Scheduler scheduler.cpp:2729 (CheckShutdownServer) CheckShutdownServer returned - OK to shutdown
localhost mythbackend: N Scheduler scheduler.cpp:2814 (ShutdownServer) Running the command to set the next scheduled wakeup time [...]
localhost mythbackend: E Scheduler scheduler.cpp:2820 (ShutdownServer) SetWakeuptimeCommand failed, shutdown aborted
Problem: /sys/class/rtc/rtc0/wakealarm vanished after kernel update
So I ran the SetWakeupTime command myself and go this problem:
/sys/class/rtc/rtc0/wakealarm: No such file or directory
And in fact the file was missing.
System won’t power off any longer
I tried to shut down the pc completely (manually) and start it again. But it wouldn’t power off, it just freezed with the shutdown bar on the screen. Pressing the power button once (only short, not holding it) made the PC power off.
So this looked like some big ACPI problem.
After some more search, I found this in the syslog (/var/log/syslog):
localhost kernel: [ 0.000000] ACPI: no DMI BIOS year, acpi=force is required to enable ACPI
localhost kernel: [ 0.000000] ACPI: Disabling ACPI support
So no ACPI support explains why wakealarm and shutdown is broken.
I am wondering why this happens suddenly after a kernel update (I have not changed my BIOS or something and ACPI was perfectly working before).
Solution: force ACPI
Forcing ACPI solved the problem.
If you use grub2, this is how to do it:
Open /etc/default/grub (e.g. “sudo nano /etc/default/grub”) and update this line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=force"
Save the file and update the grub configuration:
Then restart and you’ll be done.
sudo shutdown -r now
I hope this could help somebody.