Ubuntu can't be installed to certain Lenovo Yoga laptops because the fakeraid storage mode is not supported.

Bug #1627905 reported by Ryan
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Several Lenovo Yoga laptops do not allow the user to install any current Linux distributions due to being BIOS-locked to a RAID mode and Linux does not support this. You can boot a Linux live environment, but when you go to install, it will not see the Solid State Drive and it does not appear as a PCI device.

The affected models are the Yoga 900 ISK2, 900S, 710S, and 900 ISK for Business, and probably the new Yoga Book and Yoga 910 as well.

Lenovo has stated that removing the AHCI option from the BIOS is a feature and that they don't plan to fix this.

There have been some blog postings and news articles about this issue lately.

Here is the Lenovo Forums topic:

https://forums.lenovo.com/t5/Linux-Discussion/Yoga-900-13ISK2-BIOS-update-for-setting-RAID-mode-for-missing/td-p/3339206/highlight/false

(Note that this says it is solved, but it is not. Lenovo replied that they won't fix it and that Linux is not supported on these laptops.)

Matthew Garrett's blog post is here: https://mjg59.dreamwidth.org/44694.html

I approached him with the idea that perhaps the Linux kernel could be modified to reset the hardware and put it into AHCI mode after GRUB loads the kernel (according to him, GRUB doesn't need to be modified because it uses the uEFI firmware's disk access), and then Linux could proceed to boot.

Here's what he said:

"If you wanted to try that, the best place to do it would be the UEFI setup code in the kernel under arch/x86/boot/compressed/eboot.c - that way you can do it independent of bootloader. Grub's able to read files anyway since it's using the firmware calls to do that.

The power management thing isn't about the SSD itself, it's about ensuring that the controller is programmed correctly so that the entire CPU package can enter deep sleep states. Modern systems should idle at around 4W at most, so small amounts make abig difference here."

[...]

"If the firmware hasn't locked the control bit and if the hardware is ok with suddenly being reconfigured, sure, that ought to work. Doing it in eboot.c means you're doing it before any PCI enumeration has occurred, which makes it more likely that things will work out well."

[...]

"I'll take a quick look at the 10-series chipset docs to see if it's documented, and if so I'll throw a quick patch together - but I'm probably not going to try pushing it upstream, I'm afraid. If it does work, I'm fine with anybody else doing so."

I heaven't heard anything back lately, so I am putting this in a bug report so that the Ubuntu maintainers are aware of the issue.

It seems like a few lines of kernel code are all that is really required to fix this and restore the ability of Linux distributions to be installed on half a dozen laptops (probably more to come, since Lenovo says that the industry is moving to this!).
---
ApportVersion: 2.20.4-0ubuntu4.1
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: ryan 1604 F.... pulseaudio
CurrentDesktop: GNOME
DistroRelease: Ubuntu 17.04
EcryptfsInUse: Yes
InstallationDate: Installed on 2017-05-30 (2 days ago)
InstallationMedia: Ubuntu-GNOME 17.04 "Zesty Zapus" - Release amd64 (20170412)
Lsusb:
 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
 Bus 001 Device 003: ID 8087:0a2b Intel Corp.
 Bus 001 Device 002: ID 5986:068c Acer, Inc
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: LENOVO 80UE
Package: linux (not installed)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.10.0-22-generic.efi.signed root=UUID=3ee79c46-724b-41b5-8c42-44458297de6a ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 4.10.0-22.24-generic 4.10.15
RelatedPackageVersions:
 linux-restricted-modules-4.10.0-22-generic N/A
 linux-backports-modules-4.10.0-22-generic N/A
 linux-firmware 1.164.1
Tags: zesty
Uname: Linux 4.10.0-22-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 10/14/2016
dmi.bios.vendor: LENOVO
dmi.bios.version: 2UCN10T
dmi.board.asset.tag: NO Asset Tag
dmi.board.name: VIUU4
dmi.board.vendor: LENOVO
dmi.board.version: SDK0J40709 WIN
dmi.chassis.asset.tag: NO Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Lenovo YOGA 900-13ISK2
dmi.modalias: dmi:bvnLENOVO:bvr2UCN10T:bd10/14/2016:svnLENOVO:pn80UE:pvrLenovoYOGA900-13ISK2:rvnLENOVO:rnVIUU4:rvrSDK0J40709WIN:cvnLENOVO:ct10:cvrLenovoYOGA900-13ISK2:
dmi.product.name: 80UE
dmi.product.version: Lenovo YOGA 900-13ISK2
dmi.sys.vendor: LENOVO

Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1627905

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Incomplete → Triaged
Revision history for this message
Ryan (baronhk) wrote :

This bug has been solved by Lenovo releasing a new BIOS update for affected Lenovo Yoga laptops that allows the user to put the storage controller into AHCI mode, thus making it visible to Linux and any other OS that the user wants to install.

There was also a patch from Intel that adds support for the RAID controller, but there was a long discussion on the Linux Kernel Mailing List where the maintainers of the storage subsystem did not want to merge it because the way Intel implemented this was deemed to be pretty horrible and Intel themselves admitted that it would be better to just install in AHCI mode.

Is Ubuntu interested in that patch? It's smallish, but it's likely to never be upstreamed.

Users of the affected systems should go to Lenovo's support website, enter their serial number or model number, and download the "Linux Only" BIOS firmware. Then they can go into their BIOS and enable BIOS backflashing to make the BIOS accept the update, otherwise it thinks you're trying to install an older firmware and won't allow it. Once that's done, go back into Windows and double click the firmware exe and let it do its thing (making sure that the laptop is plugged into the wall and on AC power the entire time!!!). Once it's flashed in, you can then enter BIOS setup and switch the SATA controller mode to AHCI instead of RAID. Then you can boot from the Linux Live environment and install to the SSD.

At all times, remember that it's easiest to get into boot options and BIOS set-up on a Lenovo laptop by finding the small button next to the power button and pressing it with something like the tip of a pen. This will turn on the computer and immediately take you to startup options.

You may also want to disable "quick boot" while you're in the BIOS setup. I did and it doesn't seem to add any appreciable time to the boot procedure, but it gives you more startup options than quick boot does if you require them in the future.

Now, with all of this said, I'm going to try/recommend closing this bug since Lenovo begrudgingly fixed it in response to a complaint that I filed with the Illinois Attorney General consumer affairs department, after telling the news all of the preceding weeks that it was all the fault of Linux for "not having drivers". The only real reason to have it in RAID mode was to force Windows to load the Intel RST driver for power policy, and that's irrelevant on Linux (although I do recommend creating a system service that calls powertop and has it auto tune the settings as you can get power usage down roughly 30% over the Linux defaults that way, and having it apply the optimization at every boot is convenient.

I found out how to make powertop do this in Ubuntu. I believe they copied the service file from Fedora.

https://blog.sleeplessbeastie.eu/2015/08/10/how-to-set-all-tunable-powertop-options-at-system-boot/

Anyway, I threw that in because the obscene power usage that Matthew Garrett talks about goes away if you do this. With the power policy optimization, the run time on my laptop in Ubuntu is comparable to Windows 10.

Revision history for this message
Ryan (baronhk) wrote :

http://marc.info/?l=linux-ide&m=147709610621480&w=2

There's a link to the patches that Intel submitted.

If you go to next in list, you can see the patches and if you go to next in thread, you can follow the ensuing conversation where upstream kernel developers declare it "too ugly to live" and Intel admits that putting the storage in AHCI mode is better. Of course with Lenovo's default BIOS you can't, so no Linux for you! Regardless, does Ubuntu want to merge and maintain this in case there are other laptops out there with ridiculous BIOS settings? It's a distinct possibility that other companies have hardware out there that does this. I doubt that Lenovo will try it again, but you never know.:P

I'm probably done buying hardware from OEMs that pull stuff like this and then fighting them later as others apologize for them. If it's not crooked, then it's at least braindead stupid.

Revision history for this message
Ryan (baronhk) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected zesty
description: updated
Revision history for this message
Ryan (baronhk) wrote : CRDA.txt

apport information

Revision history for this message
Ryan (baronhk) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Ryan (baronhk) wrote : IwConfig.txt

apport information

Revision history for this message
Ryan (baronhk) wrote : JournalErrors.txt

apport information

Revision history for this message
Ryan (baronhk) wrote : Lspci.txt

apport information

Revision history for this message
Ryan (baronhk) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Ryan (baronhk) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Ryan (baronhk) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Ryan (baronhk) wrote : ProcModules.txt

apport information

Revision history for this message
Ryan (baronhk) wrote : PulseList.txt

apport information

Revision history for this message
Ryan (baronhk) wrote : RfKill.txt

apport information

Revision history for this message
Ryan (baronhk) wrote : UdevDb.txt

apport information

Revision history for this message
Ryan (baronhk) wrote : WifiSyslog.txt

apport information

Revision history for this message
Ryan (baronhk) wrote :

NOTE: The apport information posted above is with the nvme ssd in this laptop visible and operating in AHCI mode (not RAID) under the fixed BIOS that Lenovo provided.

As noted by Intel, there's no way (without their patch) for computers without the new BIOS to install Linux. Linux can't see the device or interact with it at all in the "RAID" mode.

Revision history for this message
Ryan (baronhk) wrote :

This bug is old and Lenovo fixed the issue upstream with a corrected BIOS that users can optionally install, which enables AHCI mode.

Also, from my understanding, Linux installs even in the default configuration now, including on the more recent Yoga 910 and 920 models thanks to some patches from Intel that went into the upstream Linux kernel.

Unless anyone objects, I think this should be closed as fixed upstream.

Brad Figg (brad-figg)
tags: added: cscc
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.