[mythtv-users] want to disable /proc/acpi/alarm wakeup

Craig Huff huffcs at yahoo.com
Thu Jun 28 23:49:38 UTC 2007


> ----- Original Message ----
> Sent: Thursday, June 28, 2007 6:35:45 AM
> Subject: RE: want to disable /proc/acpi/alarm wakeup
> 
> Hi, Craig.  This sounds like a good approach.  Yes, please share your
> script!
> 
<snip>
> 
> thanks,
> Mark
> 
> 
> --- Craig Huff <huffcs at yahoo.com> wrote:
> 
> > Mark,
> > 
> > I struggled to get it to work and then couldn't figure out how to
> > stop it either (but only for awhile ;-]).
> > 
<snip> 
> > 
> > If this explanation leaves things still as clear as mud, let me know
> > and I'll try to post my modified version of /etc/init.d/halt.
> > 
> > Craig.
> > 
> 


Mark,

Here is the patch for my old vs. new /etc/init.d/halt under Fedora Core 6.
I'm new to making patch files, so I would suggest you test it on a copy of 
your halt file in a scratch directory first to see if it succeeds and if the 
result looks like it makes sense.  My test command was:
    # patch -p1 --verbose < patchfile_name
where patchfile_name is whatever you name the text file into which you 
put the stuff between the two lines of "===========" below:

==========================================================
*** Archive/halt        2006-08-17 09:14:07.000000000 -0500
--- new/halt    2007-03-25 18:47:18.000000000 -0500
***************
*** 126,133 ****
--- 126,151 ----
        ;;
  esac

+ ####MYTHtv Fix Start Part 1
+ ACPITIME=`cat /proc/acpi/alarm`
+ ####MYTHtv Fix End Part 1
+
  [ -x /sbin/hwclock ] && action $"Syncing hardware clock to system time" /sbin/hwclock $CLOCKFLAGS

+ ####MYTHtv Fix Start Part 2
+ if [[ "$ACPITIME" =~ "....-00-00 00:00:00" ]]; then
+ # Should not be setting alarm for *exactly* midnight GMT on a MythTV system --
+ #equivalent to 7pm CDT or 6pm CST.  Should be waking up some minutes before
+ #the hour to allow MythTV to get up and running before show starts.
+ #Therefore, this must be intended to turn off the alarm and NOT wake up the
+ #system automatically until manual intervention occurs. Hence, ...
+   echo "Not setting alarm time."
+ else
+   echo -n "Setting alarm time: "
+   echo "$ACPITIME" | tee /proc/acpi/alarm
+ fi
+ ####MYTHtv Fix Start Part 2
+
  # Try to unmount tmpfs filesystems to avoid swapping them in.  Ignore failures.
  tmpfs=$(awk '$2 ~ /^\/($|proc|dev)/ { next; }
             $3 == "tmpfs" { print $2; }' /proc/mounts | sort -r)
==========================================================



Hope that A) the patch applies successfully for you and B) it fixes your issue.

Craig.





       
____________________________________________________________________________________
Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online.
http://smallbusiness.yahoo.com/webhosting 


More information about the mythtv-users mailing list