Sorry about the delay but we wanted to make sure the proposed fix can recover the two test systems we have reliably before asking others to try it.
I've attached a patch to this bug that should fix the still affected systems. It applies on top of v4.15-rc6 and I'll be sending it upstream as well. Canonical already created a kernel package including the fix and it can be installed from the following link: http://people.canonical.com/~ypwong/lp1734147/linux- image-4.15.0-041500rc6-generic_4.15.0-041500rc6.201712312330+20170103+1_amd64.deb The reason why v4.14.9 which includes 9d63f17661e2 ("spi-nor: intel-spi: Fix broken software sequencing codes") recovers many systems but not all is because: - These systems have CMP=1 in the other status register (SR2) making the flash read-only (this is the symptom). - Linux SPI-NOR core clears status register properly for flash chips that have SPI_NOR_HAS_LOCK set. - Serial flashes automatically clear CMP and few other bits if 0 is written to the first status register using WRSR command. - In order to WRSR take effect the serial flash need to be write enabled (WREN must have been issued before WRSR at some point). - The systems that recovered the WREN was in effect (probably issued by the BIOS before handing off to the OS) so when Linux writes 0 to the status register CMP bit is also automatically cleared and the problem goes away. Those systems that were not recovered WREN was not in effect so clearing the status register and CMP bit was ignored by the serial flash chip. Normally WREN is send as a preopcode part of an atomic sequence when software sequencing is used. This has been enabled since commit 8c473dd61bb5 ("spi-nor: intel-spi: Don't assume OPMENU0/1 to be programmed by BIOS"). However, many systems have two write enable preopcodes available the PREOP_OPTYPE register: 0x50 - Write enable for volatile status register 0x06 - Write enable (WREN) The current code picks the former which does not enable write for non-volatile bits so any writes to the status register non-volatile bits, including BP0/1/2 protection bits do not take effect. The attached patch changes the driver so that it prefers WREN over other write enable preopcodes. Booting to the kernel with the patch applied on a system where the issue still persists should reset the protection bits and allow the BIOS to save settings again. ** Patch added: "0001-spi-nor-intel-spi-Prefer-WREN-over-other-write-enabl.patch" https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1734147/+attachment/5030406/+files/0001-spi-nor-intel-spi-Prefer-WREN-over-other-write-enabl.patch -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1734147 Title: Ubuntu 17.10 corrupting BIOS - many LENOVO laptops models Status in Linux: Unknown Status in linux package in Ubuntu: Confirmed Status in linux-hwe-edge source package in Xenial: Fix Released Status in linux-oem source package in Xenial: Fix Released Status in linux source package in Artful: Fix Released Bug description: Description: An update to linux kernel on Ubuntu 17.10 that enabled the intel-spi-* drivers made Insyde BIOS unusable. Main issues were Settings being not stored, USB Boot impossible and EFI entries read- only. Fix: The issue was fixed in Kernel Version 4.13.0-21. But previous affected machines still suffered from a broken BIOS. Repair: Boot Linux and Install Kernel Version 4.14.9. Reboot into Linux and BIOS should be restored to a working state. --- Test Case: Fix has been verified by our HWE team on affected hardware. Regression Potential: Minimal, it's unlikely anyone is actually doing anything which requires this driver. --- Affected Machines: Lenovo B40-70 Lenovo B50-70 Lenovo B50-80 Lenovo Flex-3 Lenovo Flex-10 Lenovo G40-30 Lenovo G50-30 Lenovo G50-70 Lenovo G50-80 Lenovo S20-30 Lenovo U31-70 Lenovo Y50-70 Lenovo Y70-70 Lenovo Yoga Thinkpad (20C0) Lenovo Yoga 2 11" - 20332 Lenovo Z50-70 Lenovo Z51-70 Lenovo ideapad 100-15IBY Acer Aspire E5-771G Acer Aspire ES1-111M-C1LE (not fixed by 4.14.9 and 4.14.10) Acer TravelMate B113 Acer Swift SF314-52 (Fixed by 4.14.9) Toshiba Satellite S55T-B5233 Toshiba Satellite L50-B-1R7 Toshiba Satellite S50-B-13G Dell Inspiron 15-3531 (not fixed by 4.14.9) Mediacom Smartbook 14 Ultra M-SB14UC Acer Aspire E3-111-C0UM HP 14-r012la --- Original Description: Basically on Lenovo Y50-70 after installing Ubuntu 17.10, many users reported a corrupted BIOS. It's not possible to save new settings in BIOS anymore and after rebooting, the system starts with the old settings. Moreover (and most important) USB booting is not possible anymore since USB is not recognized. It's very serious, since our machines do not have a CDROM. Lenovo forums at the moment are full of topics regading this issue. Thank you!! To manage notifications about this bug go to: https://bugs.launchpad.net/linux/+bug/1734147/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp