Bug 68331
Summary: | [Regression] [bisected] RTC wakeup not working when HPET enabled in BIOS on Gigabyte motherboard | ||
---|---|---|---|
Product: | Timers | Reporter: | Diego Rodriguez (gran.diego) |
Component: | Realtime Clock | Assignee: | timers_realtime-clock |
Status: | NEEDINFO --- | ||
Severity: | normal | CC: | alexandre.belloni, bp, chemobejk, gran.diego, pastas4, pmlists |
Priority: | P1 | ||
Hardware: | x86-64 | ||
OS: | Linux | ||
Kernel Version: | >= 3.8.13 | Subsystem: | |
Regression: | Yes | Bisected commit-id: |
Description
Diego Rodriguez
2014-01-09 11:18:06 UTC
I can confirm this on a Gigabyte GA-MA770-UD3. Reverting the commit will probably not solve the real issue (as the commit itself reverts another commit). Also, the reason why AMD 700 chipsets are affected is probably due to these hardware deficiencies: https://en.wikipedia.org/wiki/AMD_700_chipset_series#Southbridge_issues_.28SB7x0.29 It could be that the check that should turn off HPET doesn't actually work as reliably as it should (it doesn't seem to turn it off in my case, I have to manually do that through hpet=disabled). So the *real* fix could in fact be to disable HPET in BIOS since it doesn't work reliably in the first case? Though not sure if the same applies to the Intel system you mentioned. Same problem with this hardware: http://bugzillafiles.novell.org/attachment.cgi?id=582083 There is no HPET setting in the BIOS, but "hpet=disable" helps. Peter Thanks for pointing out the buggy HPET in that chipset. With "hpet=disable" the RTC alarm now seems to wakeup my Gigabyte GA-MA78GM-S2H board reliably from ACPI S5. FYI: Kernel 4.3 introduced a new regression on my board related to RTC alarm: after poweroff the RTC alarm, even if it is not set, immediately wakes up the board again. See bug #112091 Could you try a kernel with CONFIG_HPET_EMULATE_RTC unset and leaving hpet enabled? I'm trying to understand whether this is the HPET that prevents the wakeup or if this is caused by the RTC emulation. (In reply to Alexandre Belloni from comment #4) > Could you try a kernel with CONFIG_HPET_EMULATE_RTC unset and leaving hpet > enabled? I had to make the following change on 4.3.0 vanilla to get kernel to accept unsetting CONFIG_HPET_EMULATE_RTC. Otherwise it was always set to "yes" after running "make": --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -754,7 +754,7 @@ config HPET_TIMER Choose N to continue using the legacy 8254 timer. config HPET_EMULATE_RTC - def_bool y + def_bool n depends on HPET_TIMER && (RTC=y || RTC=m || RTC_DRV_CMOS=m || RTC_DRV_CMOS=y) config APB_TIMER -------------- After this change the system wakes up correctly from RTC alarm *with* HPET enabled: # uname -a Linux mediabox 4.3.0+ #5 SMP Thu Feb 25 20:34:45 EET 2016 i686 i686 i386 GNU/Linux # cat /proc/cmdline BOOT_IMAGE=/vmlinuz-4.3.0+ root=UUID=XXX ro rd.md=0 rd.dm=0 KEYTABLE=us SYSFONT=True rd.lvm.lv=XXX rd.lvm.lv=XXX rd.luks=0 LANG=en_US.UTF-8 console=ttyS0,115200 # dmesg | fgrep -i hpet [ 0.000000] ACPI: HPET 0x000000007FDE9E40 000038 (v01 GBT GBTUACPI 42302E31 GBTU 00000098) [ 0.000000] ACPI: HPET id: 0x10b9a201 base: 0xfed00000 [ 0.000000] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 133484873504 ns [ 0.000000] hpet clockevent registered [ 0.389120] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0 [ 0.392002] hpet0: 4 comparators, 32-bit 14.318180 MHz counter [ 0.395039] clocksource: Switched to clocksource hpet [ 3.581339] misc hpet: hash matches # extract-ikconfig /lib/modules/4.3.0+/kernel/kernel/configs.ko | fgrep HPET_ CONFIG_HPET_TIMER=y # CONFIG_HPET_EMULATE_RTC is not set # CONFIG_HPET_MMAP is not set This is with the latest BIOS version F11 flashed on my Gigabyte GA-MA78GM-S2H board. Without the above change RTC alarm only works with "hpet=disable". Sounds to me like we want to disable CONFIG_HPET_EMULATE_RTC on Gigabyte boards... pending a better fix, that is. Alexandre? I'd say so. I will have a look at it a bit more in depth, hopefully soon. This is still on my TODO list. Bug #15289 might be related and requires a similar fix. |