> -----Original Message-----
> From: Adam Nielsen [mailto:[email protected]]
> Sent: 22 December 2009 23:45
> To: Graham Adams
> Cc: [email protected]
> Subject: Re: Auto wake on Poweredge 2700 ?
> 
> > I found this was set to (according to /proc/acpi/alarm) "2009-12-00
> > 00:00:00" .  This seems to mean wake up at midnight every day.  By
> > changing this to a specific day I can stop the alarm repeating daily
> > but I think it will still repeat monthly because if I try to set it
> > to, say, "2009-11-01 01:01:01" then read it back it returns
> > "2009-12-01 01:01:01", presumably because the RTC chip is one without
> > year and month fields in the alarm.  I am going to try to disable the
> > RTC alarm IRQ using the ioctl documented at the rtc(4) man page.
> 
> Interesting.  Poking around a bit I also discovered this: (for my
> desktop PC which doesn't automatically wake up)
> 
> $ cat /proc/driver/rtc
> rtc_time        : 09:40:22
> rtc_date        : 2009-12-23
> alrm_time       : 03:42:25
> alrm_date       : ****-**-**
> alarm_IRQ       : no
> alrm_pending    : no
> 24hr            : yes
> periodic_IRQ    : no
> update_IRQ      : no
> HPET_emulated   : yes
> DST_enable      : no
> periodic_freq   : 1024
> batt_status     : okay
> 
> Apparently you can configure these values through
> /sys/class/rtc/rtc0/wakealarm, as detailed here:
> 
> http://www.mythtv.org/wiki/ACPI_Wakeup#Using_.2Fsys.2Fclass.2Frtc.2Frtc
> 0.2Fwakealarm
> 
> Might save you writing some code.
> 
> Cheers,
> Adam.

Hello Adam,

Unfortunately /sys/class/rtc does not exist in kernel 2.6.16.
I wrote a program as follows:

#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/rtc.h>

main(argc, argv) {
        int ior, k = 0;
        int fd = open("/dev/rtc", O_RDONLY);
        if (fd <= 0) {
                puts("open failed");
                exit(1);
        }

        ior = ioctl(fd, RTC_AIE_OFF, &k);
        printf("ioctl result was %d\n", ior);
        close(fd);

}

But although this seems to run without error "cat /proc/driver/rtc" still shows 
"alarm_IRQ:  yes" .  However, I have just checked another system I have been 
setting up and that does show "alarm_IRQ: no",  it is possible that while 
testing I managed to do something that has disabled it.  I need to play around 
a bit more to see if I can find out what sequence of commands/actions disabled 
it.

I have verified that while the alarm_IRQ is enabled then the system will wake 
once a month if, say, "echo '2008-11-23 12:01:01' > /proc/acpi/alarm" is run, 
i.e. the year and month values are ignored.

Graham


_______________________________________________
Linux-PowerEdge mailing list
[email protected]
https://lists.us.dell.com/mailman/listinfo/linux-poweredge
Please read the FAQ at http://lists.us.dell.com/faq

Reply via email to