January 1, 0001

— type: post layout: post meta: {} title: Configuring a Shuttle SD32G2 to wakeup using ACPI from Linux tags: - Linux - Tips and Tricks published: true status: publish — I recently configured my Shuttle SD32G2 MythTV PVR server to automatically wakeup when it needed to record a scheduled TV recording. Many of the examples on the web for doing this from MythTV used NVRAM. However, after installing NVRAM it didn’t recognise the BIOS. Given how NVRAM splashes about in sensitive memory in the BIOS I wasn’t too keen to try my luck getting that to work. Some other web pages such as ACPI Wakeup mentioned being able to use the Linux Advanced Configuration and Power Interface (ACPI) instead. This was a much better option and I soon had everything working using simple command line scripts. To configure your Shuttle SD32G2 server to work with ACPI all you need to do is:

  1. Start the machine up and go into the BIOS configuration (hold down Delete while the machine boots)
  2. Select Power Management Setup
  3. Change the Resume By Alarm option to Enabled
  4. Save the BIOS configuration change and reboot the machine

This configures the BIOS so it will indeed wake up when the alarm is set. The following are notes that relate to configuring the use of the ACPI alarm in Linux (based on Kubuntu Feisty Fawn 7.04)

  • The date format for the ACPI alarm for the SD32G2 appears to be yyyy-MM-dd hh:mm:ss. The date format can be confirmed by executing cat /proc/acpi/alarm and looking at the alarm time that is already set in the BIOS.
  • The SD32G2 doesn’t appear to support setting the day of month for the wakeup alarm. This should be fine for TV recording with my configuration since the machine will simply boot up on the specified time on the next day and then shut down 2 minutes later if it doesn’t start recording.
  • If the day is set to 0 (which always seems to appear), then than means start up at the specified time on every day.
  • The wakeup alarm can be set using echo "2007-06-11 16:23:00" > /proc/acpi/alarm if run as root or inside a script executed using sudo
  • The wakeup alarm can be set using sudo sh -c "echo '2007-06-11 16:23:00' > /proc/acpi/alarm" if using sudo. Trying to simply do a direct sudo echo always gave me a permission problem.
  • Content located at ACPI Wakeup is quite useful. The Shuttle BIOS did not need any modifications to the hwclock.sh script though and don’t bother with the clumsy script to alter the time from local time to UTC. Just alter the BIOS clock to use the local time.
  • The BIOS time can be changed from UTC to local time in Kubuntu by opening the /etc/default/rcS file and changing UTC=yes to UTC=no. Much easier all round.
  • The BIOS clock can be set from the system clock using sudo hwclock -systohc. I’m reasonably sure the Kubuntu does this on shutdown.
comments powered by Disqus