Hi,
I want to use the rtc wake up function on coreboot and Linux on ASUS M2V MX-SE. I used rtcwake command (ver 2.19) from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/ to automatically wake up the machine after an S3 sleep. This works well on manufactured ASUS bios. But with coreboot, it reports an error, "open device /sys/class/rtc/rtc0/device/power/wakeup failed." It seems the command try to find /dev/rtc0 but failed. And I checked that device manually; it does not exist.
Anyone knows why this happened and how to fix it? Thanks!
Regards,
Jiang
* Jiang Wang jwangzju@gmail.com [110418 23:38]:
Hi,
I want to use the rtc wake up function on coreboot and Linux on ASUS M2V MX-SE. I used rtcwake command (ver 2.19) from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/ to automatically wake up the machine after an S3 sleep. This works well on manufactured ASUS bios. But with coreboot, it reports an error, "open device /sys/class/rtc/rtc0/device/power/wakeup failed." It seems the command try to find /dev/rtc0 but failed. And I checked that device manually; it does not exist.
Sounds like some node is missing in the DSDT?
Hi Stefan,
Do you have any suggestions about the specific name or keywords that I should look for in the DSDT? I think I can dump the DSDT of the manufactured BIOS with acpitool and compare it with the one of coreboot, right? But it is better to have a rough idea before doing the comparison. Thanks.
Regards,
Jiang
On Mon, Apr 18, 2011 at 7:08 PM, Stefan Reinauer stefan.reinauer@coreboot.org wrote:
- Jiang Wang jwangzju@gmail.com [110418 23:38]:
Hi,
I want to use the rtc wake up function on coreboot and Linux on ASUS M2V MX-SE. I used rtcwake command (ver 2.19) from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/ to automatically wake up the machine after an S3 sleep. This works well on manufactured ASUS bios. But with coreboot, it reports an error, "open device /sys/class/rtc/rtc0/device/power/wakeup failed." It seems the command try to find /dev/rtc0 but failed. And I checked that device manually; it does not exist.
Sounds like some node is missing in the DSDT?
Hi
I think two things are missing:
1) Paste this into the dsdt table:
Device(RTC0) { Name(_HID, EISAID("PNP0B00")) /* AT Real Time Clock (not PIIX4 compatible) */ Name(_CRS, ResourceTemplate() { IRQNoFlags(){8} IO(Decode16,0x0070, 0x0070, 0, 2) }) } /* End Device(_SB.PCI0.LpcIsaBr.RTC0) */
Now the RTC device should be visible. Second problem is that a wakeup event is not enabled. This can be fixed most likely here:
Index: lpc.c =================================================================== --- lpc.c (revision 6474) +++ lpc.c (working copy) @@ -237,6 +237,9 @@ printk(BIOS_DEBUG, "SLP_TYP type was %x %x\n", tmp, acpi_slp_type); #endif
+ /* enable power button wakeup and from RTC */ + outb(0x5, VT8237R_ACPI_IO_BASE + 0x3); + /* All SMI on, both IDE buses ON, PSON rising edge. */ outw(0x1, VT8237R_ACPI_IO_BASE + 0x2c);
Completely untested but might even work. Please let me know if it works for you,
Thanks, Rudolf
Hi Rudolf,
Thanks for your email. I tried with your way, but the RTC0 device still is not visible. either from /dev/ or /sys/class/ directory.
I also extract DSDT table from Original BIOS,
Device(RTC0) { Name(_HID, EISAID("PNP0B00")) Name(CRS0, ResourceTemplate() { IO(Decode16, 0x0070, 0x0070, 0x00, 0x02) IRQNoFlags() {8} }) Name(CRS1, ResourceTemplate() { IO(Decode16, 0x0070, 0x0070, 0x00, 0x02) }) Method(_CRS, 0, NotSerialized) { If(LOr(LEqual(SHTB, Zero), LEqual(^^HPET.SHTS(), Zero))) { Return(CRS0) } Return(CRS1) } } It looks like same thing you posted in last email. but I cannot compile successfully for this one because of some unrecognized symbol of this line: LEqual(^^HPET.SHTS(),
I did enable the power button in lpc.c file.
Is there anything else I am missing?
Thanks, Fengwei
On 04/19/2011 02:24 PM, Rudolf Marek wrote:
Hi
I think two things are missing:
- Paste this into the dsdt table:
Device(RTC0) { Name(_HID, EISAID("PNP0B00")) /* AT Real Time Clock (not PIIX4 compatible) */ Name(_CRS, ResourceTemplate() { IRQNoFlags(){8} IO(Decode16,0x0070, 0x0070, 0, 2) }) } /* End Device(_SB.PCI0.LpcIsaBr.RTC0) */
Now the RTC device should be visible. Second problem is that a wakeup event is not enabled. This can be fixed most likely here:
Index: lpc.c
--- lpc.c (revision 6474) +++ lpc.c (working copy) @@ -237,6 +237,9 @@ printk(BIOS_DEBUG, "SLP_TYP type was %x %x\n", tmp, acpi_slp_type); #endif
- /* enable power button wakeup and from RTC */
- outb(0x5, VT8237R_ACPI_IO_BASE + 0x3);
/* All SMI on, both IDE buses ON, PSON rising edge. */ outw(0x1, VT8237R_ACPI_IO_BASE + 0x2c);
Completely untested but might even work. Please let me know if it works for you,
Thanks, Rudolf