After upgrading from Fedora 23 kernel 4.2.8 to 4.3.x my Gigabyte GA-MA78GM-S2H board starts up immediately after poweroff (ACPI S5). As far as I can tell the RTC CMOS alarm timer is programmed incorrectly and causes the board to be woken up immediately. Tested vanilla kernels: GOOD: 4.2.0 BAD: 4.3.0, 4.4.0, 4.5.0-rc2+ When looking for poweroff and RTC related changes between 4.2 and 4.3 I found commit 88b8d33b1c6aadba553c998db91c4b36be0fac52 Author: Adrian Huang <adrianhuang0701@gmail.com> Date: Mon Jul 6 12:19:12 2015 +0800 rtc: cmos: Cancel alarm timer if alarm time is equal to now+1 seconds Steps to reproduce the problem: 1) Enable RTC wake-up option in BIOS Setup 2) Issue one of these commands in the OS: "poweroff" or "shutdown -h now" 3) System will shut down and then reboot automatically ... which sounds exactly how my board behaves *AFTER* switching to 4.3. Reverting this change did not solve my issue though. So I started a "git bisect 4.3 4.2" and it found commit 52cdbdd49853dfa856082edb0f4c4c0249d9df07 Author: Grygorii Strashko <grygorii.strashko@ti.com> Date: Mon Jul 27 20:43:01 2015 +0300 driver core: correct device's shutdown order ... I built a kernel 4.3.0 + the above commit reverted and my issue is fixed. The description of commit 52cdbdd49 sounds logical, so I wonder if there maybe is some unintended side effect with either ACPI or commit 88b8d33b1c6? FYI: I also found bug #68331 which seems to be related (RTC alarm, similar motherboard with same chipset), but adding "hpet=disabled" to the kernel 4.3.0 boot command line does not fix my issue. Only reverting the above change does.
Created attachment 203411 [details] Kernel config for 4.3.0 used in testing I used this configuration to compile my 4.3.0 test kernels (vanilla and vanilla+reverted). Generated from FC23 4.3.5-200 configuration using olddefconfig & localmodconfig
Created attachment 203421 [details] Kernel messages from 4.3.0 vanilla with initcall_debug
Created attachment 203431 [details] Kernel messages from 4.3.0 vanilla+reverted with initcall_debug
Created attachment 203921 [details] Kernel messages from 4.3.0 vanilla with initcall_debug I've now access to the COM1 port on this HW and can now take kernel logs from serial console. Replacing the old "startup only" logs with "startup and shutdown -h" logs
Created attachment 203931 [details] Kernel messages from 4.3.0 vanilla+reverted with initcall_debug
Created attachment 203981 [details] Kernel messages from 4.3.0 vanilla+reverted with initcall_debug Sorry, user asleep at keyboard. The log for 4.3.0+ was without initcall_debug. Fixed. Comparing the two logs I see the following shutdown order difference between vanilla (shutdown not working): [ 98.084360] r8169 0000:02:00.0: shutdown [ 98.088746] pcieport 0000:00:0a.0: System wakeup enabled by ACPI ... [ 100.158794] rtc_cmos 00:02: shutdown and vanilla+reverted (shutdown working): [ 112.318442] rtc_cmos 00:02: shutdown ... [ 112.337235] r8169 0000:02:00.0: shutdown [ 112.341454] pcieport 0000:00:0a.0: System wakeup enabled by ACPI But that just may be related to WoL which is enabled on this machine too.
Grygorii asked me to play around with the wakeup options in the BIOS. Before doing that I looked around and tried to find the latest BIOS for my board. After updating from the original version F4 to the latest available F11 I'm no longer able to reproduce the issue. Closing this as BIOS bug, i.e. INVALID.