Bug 195951 - Booting kernel 4.11 triggers a reset of UEFI firmware settings on the next boot
Summary: Booting kernel 4.11 triggers a reset of UEFI firmware settings on the next boot
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Other (show other bugs)
Hardware: Intel Linux
: P1 normal
Assignee: drivers_other
: 195975 (view as bug list)
Depends on:
Reported: 2017-06-01 06:33 UTC by Abdó Roig-Maranges
Modified: 2022-12-27 13:15 UTC (History)
7 users (show)

See Also:
Kernel Version: 4.11
Regression: No
Bisected commit-id:

early boot log with kernel 4.11.2 (53.45 KB, text/plain)
2017-06-01 06:33 UTC, Abdó Roig-Maranges
dmesg log at 8afda8b2 (good) (55.09 KB, text/plain)
2017-07-26 14:01 UTC, Abdó Roig-Maranges
dmesg log at ff00d7a3 (bad) (55.10 KB, text/plain)
2017-07-26 14:03 UTC, Abdó Roig-Maranges
Prevent touching BCR register from lpc_ich.c (522 bytes, patch)
2017-07-26 14:32 UTC, Mika Westerberg
Details | Diff

Description Abdó Roig-Maranges 2017-06-01 06:33:34 UTC
Created attachment 256825 [details]
early boot log with kernel 4.11.2

My machine boots fine with kernel 4.11.3. However, on the next boot, the firmware says: "Configuration Changed - Requires restart", and the firmware settings are reset to defaults. There was no such issue with the 4.10 kernels.

My machine is a Lenovo Thinkpad Yoga (first generation) with the latest firmware revision.

I attach a piece of logs I gathered booting kernel 4.11.2 with efi=debug. Is there any other piece of data I can provide?
Comment 1 Julius Bullinger 2017-06-04 10:13:53 UTC
I can confirm this bug on the same hardware for all current kernel versions from 4.11 on. I tested on Fedora:

 * kernel-4.11.2-200.vanilla.knurd.1.fc25.x86_64
 * kernel-4.11.3-200.fc25.x86_64
 * kernel-4.12.0-0.rc2.git0.1.vanilla.knurd.1.fc25.x86_64

All of them suffer from the issue, while 4.10 does not.
Comment 2 Julius Bullinger 2017-06-04 10:15:41 UTC
*** Bug 195975 has been marked as a duplicate of this bug. ***
Comment 3 Matt Fleming 2017-06-15 21:27:16 UTC
Could you try doing a git bisect to track down which commit introduced the issue? I looked at the EFI changes between v4.10 and v4.11 but nothing obvious stood out.
Comment 4 Abdó Roig-Maranges 2017-07-09 00:00:44 UTC
I bisected the issue to commit ff00d7a32a1b88b772981a13fc198e0d29300666: "mfd: lpc_ich: Add support for SPI serial flash host controller".
Comment 5 Matt Fleming 2017-07-14 09:20:37 UTC
Thanks for bisecting. Re-assigning since this doesn't look like an EFI issue per se.
Comment 6 Matt Fleming 2017-07-14 09:21:15 UTC
Mika, can you take a look?
Comment 7 Mika Westerberg 2017-07-24 09:08:51 UTC
Can you attach full dmesg to the bug and then revert ff00d7a32a1b88b772981a13fc198e0d29300666 and attach dmesg of that boot as well?
Comment 8 Abdó Roig-Maranges 2017-07-26 14:01:57 UTC
Created attachment 257711 [details]
dmesg log at 8afda8b2 (good)
Comment 9 Abdó Roig-Maranges 2017-07-26 14:03:09 UTC
Created attachment 257713 [details]
dmesg log at ff00d7a3 (bad)
Comment 10 Abdó Roig-Maranges 2017-07-26 14:05:39 UTC
I attached the logs you requested. The git hashes in the logs do not match the hash in the kernel version because in order to work-around a gcc7 build problem I cherry-picked 474c9015 on top.
Comment 11 Mika Westerberg 2017-07-26 14:10:47 UTC
Both logs say kernel v4.10 is that expected?
Comment 12 Abdó Roig-Maranges 2017-07-26 14:13:43 UTC
Yes, this is what git-describe reports. The bug was introduced in the 4.11 merge windows, so git describe reports 4.10-blah-blah.
Comment 13 Mika Westerberg 2017-07-26 14:32:30 UTC
Created attachment 257715 [details]
Prevent touching BCR register from lpc_ich.c

Can you try the attached patch and see if it makes a difference?
Comment 14 Abdó Roig-Maranges 2017-07-26 14:59:00 UTC
Yes, it does. With your patch on top of the bad commit, the problem disappears.
Comment 15 Mika Westerberg 2017-07-27 15:34:28 UTC
OK, thanks for testing. I'll prepare proper patch and send it upstream tomorrow.
Comment 16 Keigh Rim 2017-10-20 12:18:29 UTC
I upgraded Ubuntu on my thinkpad yoga machine (1st gen) from 17.04 (kernel 4.10) to 17.10 (kernel 4.13) and this issue is introduced. I also tried Fedora 26 (kernel 4.11) live cd, and noticed the same problem.
Comment 17 Joshua 2017-11-11 03:59:39 UTC
Hi Mika, this bug also affects me. Has your patch been committed?
Comment 18 Mika Westerberg 2017-11-11 08:25:32 UTC
Yes, it should be included in v4.14-rc1+
Comment 19 Gero Cammans 2022-12-27 11:08:33 UTC
Whoever is responsible for this should provide a fix or buy me a new laptop. I can't change any BIOS settings.

Note You need to log in before you can comment on or make changes to this bug.