Welcome to our peer-to-peer forums, where owners help owners. Need help now? Visit eSupport here.

English Community

Linux Operating SystemsOther Linux Discussions
All Forum Topics
Options

86 Posts

09-08-2016

United States of America

52 Signins

2661 Page Views

  • Posts: 86
  • Registered: ‎09-08-2016
  • Location: United States of America
  • Views: 2661
  • Message 261 of 394

Re: Yoga 900-13ISK2 - BIOS update for setting RAID mode for missing hard drive on linux install

2016-09-23, 1:48 AM

No problem. If you want to update the story, just private message me on Reddit and I'll get on it.

 

Also, unrelated question. I saw two RAM slots on your board in the picture. Belarc Advisor told me I have two 8 GB modules and two free slots. I saw one slot full and one empty (guessing you got the 8 GB model) on yours. Do these only have two slots?

Reply
Options

15 Posts

08-20-2016

Australia

56 Signins

446 Page Views

  • Posts: 15
  • Registered: ‎08-20-2016
  • Location: Australia
  • Views: 446
  • Message 262 of 394

Re: Yoga 900-13ISK2 - BIOS update for setting RAID mode for missing hard drive on linux install

2016-09-23, 2:20 AM

Bownairo,

 

could you do me a favor and open up a shell and grab the output of

lspci -vvvnn

and then post it here (or somewhere) so I can diff that with a stock machine?

 

I'm still keen to see if I can patch a kernel to bring up the drive and not being able to see what's missing is a PITA

 

While I have a SMD rework station and a CRO on the bench next to me, I'm not quite ready to go there yet :-)

Reply
Options

18 Posts

06-19-2016

United States of America

151 Signins

950 Page Views

  • Posts: 18
  • Registered: ‎06-19-2016
  • Location: United States of America
  • Views: 950
  • Message 263 of 394

Re: Yoga 900-13ISK2 - BIOS update for setting RAID mode for missing hard drive on linux install

2016-09-23, 2:27 AM

Here you go, let me know if there's anything else I can do. This forum requires me to upload something with a proper extension, just remane this to a txt.

Reply
Options

86 Posts

09-08-2016

United States of America

52 Signins

2661 Page Views

  • Posts: 86
  • Registered: ‎09-08-2016
  • Location: United States of America
  • Views: 2661
  • Message 264 of 394

Re: Yoga 900-13ISK2 - BIOS update for setting RAID mode for missing hard drive on linux install

2016-09-23, 3:24 AM

So, I'm interested in another thing that Andy_Lenovo mentioned in his "press release"...

 

How's the 360 hinge working with the AHCI driver? :smileylol:

 

note from moderator: be nice.

Reply
Options

15 Posts

08-20-2016

Australia

56 Signins

446 Page Views

  • Posts: 15
  • Registered: ‎08-20-2016
  • Location: Australia
  • Views: 446
  • Message 265 of 394

Re: Yoga 900-13ISK2 - BIOS update for setting RAID mode for missing hard drive on linux install

2016-09-23, 4:23 AM

Thankyou.  That's enlightening; just had a quick run through over lunch (gotta go and do some real work in a minute unfortunately).

 

Firstly, where there's a PCI device, there's a kernel module loaded (ie: it's supported).  Especially the thermal and power management... Hi Andy :-)

 

nb:

  1. by "patched" and "unpatched" I mean with/without the BIOS mod.
  2. we're running different distros/versions of lspci, so minor formatting and naming differences
  3. some "randomly" assigned stuff like interrupts and memory locations also differ.
  4. you ran it as root Bownairo, even though I failed to ask that, again, you rock.

 

In the unpatched stock dump a 'RAID' controller appears:

00:17.0 RAID bus controller [0104]: Intel Corporation 82801 Mobile SATA Controller [RAID mode] [8086:282a] (rev 21)
	Subsystem: Lenovo 82801 Mobile SATA Controller [RAID mode] [17aa:381c]
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 16
	Region 0: Memory at a12a8000 (32-bit, non-prefetchable) [size=32K]
	Region 1: Memory at a12be000 (32-bit, non-prefetchable) [size=256]
	Region 2: I/O ports at 3080 [size=8]
	Region 3: I/O ports at 3088 [size=4]
	Region 4: I/O ports at 3060 [size=32]
	Region 5: Memory at a1200000 (32-bit, non-prefetchable) [size=512K]
	Capabilities: [d0] MSI-X: Enable+ Count=10 Masked-
		Vector table: BAR=0 offset=00000000
		PBA: BAR=1 offset=00000000
	Capabilities: [70] Power Management version 3
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold-)
		Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [a8] SATA HBA v1.0 BAR4 Offset=00000004
	Kernel driver in use: ahci
	Kernel modules: ahci

that "slot" (00:17.0) is doesn't appear in the patched system.

 

conversely, in the patched system there is a PCI bridge that doesn't appear in the unpatched system:

00:1d.0 PCI bridge [0604]: Intel Corporation Sunrise Point-LP PCI Express Root Port #9 [8086:9d18] (rev f1) (prog-if 00 [Normal decode])
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 124
	Bus: primary=00, secondary=03, subordinate=03, sec-latency=0
	I/O behind bridge: 00003000-00003fff
	Memory behind bridge: a1000000-a10fffff
	Prefetchable memory behind bridge: 00000000fff00000-00000000000fffff
	Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ <SERR- <PERR-
	BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
		PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
	Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00
		DevCap:	MaxPayload 256 bytes, PhantFunc 0
			ExtTag- RBE+
		DevCtl:	Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
			RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
			MaxPayload 128 bytes, MaxReadReq 128 bytes
		DevSta:	CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
		LnkCap:	Port #9, Speed 8GT/s, Width x4, ASPM L1, Exit Latency L0s <1us, L1 <16us
			ClockPM- Surprise- LLActRep+ BwNot+ ASPMOptComp+
		LnkCtl:	ASPM L1 Enabled; RCB 64 bytes Disabled- CommClk+
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 8GT/s, Width x4, TrErr- Train- SlotClk+ DLActive+ BWMgmt+ ABWMgmt-
		SltCap:	AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise-
			Slot #8, PowerLimit 25.000W; Interlock- NoCompl+
		SltCtl:	Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
			Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
		SltSta:	Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
			Changed: MRL- PresDet- LinkState+
		RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible-
		RootCap: CRSVisible-
		RootSta: PME ReqID 0000, PMEStatus- PMEPending-
		DevCap2: Completion Timeout: Range ABC, TimeoutDis+, LTR+, OBFF Not Supported ARIFwd+
		DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR+, OBFF Disabled ARIFwd-
		LnkCtl2: Target Link Speed: 8GT/s, EnterCompliance- SpeedDis-
			 Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
			 Compliance De-emphasis: -6dB
		LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete+, EqualizationPhase1+
			 EqualizationPhase2+, EqualizationPhase3+, LinkEqualizationRequest-
	Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
		Address: fee00278  Data: 0000
	Capabilities: [90] Subsystem: Lenovo Device [17aa:3805]
	Capabilities: [a0] Power Management version 3
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
		Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [100 v0] #00
	Capabilities: [140 v1] Access Control Services
		ACSCap:	SrcValid+ TransBlk+ ReqRedir+ CmpltRedir+ UpstreamFwd- EgressCtrl- DirectTrans-
		ACSCtl:	SrcValid- TransBlk- ReqRedir- CmpltRedir- UpstreamFwd- EgressCtrl- DirectTrans-
	Capabilities: [220 v1] #19
	Kernel driver in use: pcieport
	Kernel modules: shpchp

And, of finally, here's the bad boy we all want - the Samsung drive on a PCI bus that doesn't appear in the unpatched system:

03:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller [144d:a802] (rev 01) (prog-if 02 [NVM Express])
	Subsystem: Samsung Electronics Co Ltd Device [144d:a801]
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 16
	NUMA node: 0
	Region 0: Memory at a1000000 (64-bit, non-prefetchable) [size=16K]
	Region 2: I/O ports at 3000 [size=256]
	Capabilities: [40] Power Management version 3
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
		Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [50] MSI: Enable- Count=1/8 Maskable- 64bit+
		Address: 0000000000000000  Data: 0000
	Capabilities: [70] Express (v2) Endpoint, MSI 00
		DevCap:	MaxPayload 128 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
			ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset+ SlotPowerLimit 25.000W
		DevCtl:	Report errors: Correctable+ Non-Fatal+ Fatal+ Unsupported+
			RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+ FLReset-
			MaxPayload 128 bytes, MaxReadReq 512 bytes
		DevSta:	CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
		LnkCap:	Port #0, Speed 8GT/s, Width x4, ASPM L1, Exit Latency L0s <4us, L1 <64us
			ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+
		LnkCtl:	ASPM L1 Enabled; RCB 64 bytes Disabled- CommClk+
			ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 8GT/s, Width x4, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
		DevCap2: Completion Timeout: Not Supported, TimeoutDis+, LTR+, OBFF Not Supported
		DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR+, OBFF Disabled
		LnkCtl2: Target Link Speed: 8GT/s, EnterCompliance- SpeedDis-
			 Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
			 Compliance De-emphasis: -6dB
		LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete+, EqualizationPhase1+
			 EqualizationPhase2+, EqualizationPhase3+, LinkEqualizationRequest-
	Capabilities: [b0] MSI-X: Enable+ Count=9 Masked-
		Vector table: BAR=0 offset=00003000
		PBA: BAR=0 offset=00002000
	Capabilities: [100 v2] Advanced Error Reporting
		UESta:	DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
		UEMsk:	DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
		UESvrt:	DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
		CESta:	RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-
		CEMsk:	RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
		AERCap:	First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
	Capabilities: [148 v1] Device Serial Number 00-00-00-00-00-00-00-00
	Capabilities: [158 v1] Power Budgeting <?>
	Capabilities: [168 v1] #19
	Capabilities: [188 v1] Latency Tolerance Reporting
		Max snoop latency: 3145728ns
		Max no snoop latency: 3145728ns
	Capabilities: [190 v1] L1 PM Substates
		L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+ L1_PM_Substates+
			  PortCommonModeRestoreTime=10us PortTPowerOnTime=10us
	Kernel driver in use: nvme
	Kernel modules: nvme

So my completey unfounded speculation at this point is that that "RAID/AHCI" BIOS switch is changing the mode of whatever chip that PCI bridge lives in for some reason... to aggregate attached NVMe devices as a RAID?? dunno.

 

I will post this in a couple of other places and see if that jogs something from someone more up to speed on the chipset stuff.

 

Reply
Options

86 Posts

09-08-2016

United States of America

52 Signins

2661 Page Views

  • Posts: 86
  • Registered: ‎09-08-2016
  • Location: United States of America
  • Views: 2661
  • Message 266 of 394

Re: Yoga 900-13ISK2 - BIOS update for setting RAID mode for missing hard drive on linux install

2016-09-23, 4:51 AM

I shared this with Matthew Garrett on his blog. Maybe someone will see a solution or the makings of one and we can cut Lenovo out of the loop and take back control of our machines one way or the other. Lenovo says they want nothing to do with Linux on the Yoga so I think trying to get them to fix this mess is going to be a complete waste of time. They're busy in crisis mode telling the media to report this some other way that doesn't make them the bad guys.

 

Possible BIOS mod without an external flasher that bownairo was talking about. There has to be a way in somewhere. BIOS code is usually full of bugs from what I've heard over the years. Maybe we can slip past the verification system somehow. I'm perfectly willing to go this route with my machine if it works reliably.

 

-or-

 

Maybe Linux developers will figure out a way to get the kernel to use the storage without taking it out of Lenovo's stupid fake RAID mode and then we can see what unfolds next. I'm betting that if we ever get it to work, Lenovo will probably break it again. Either with a new BIOS version or on their next Yoga.

 

There might be some penalty on battery life if we can do the first method and put the controller in AHCI mode, but I really don't care. It probably won't be much. Maybe bownairo can time battery life in AHCI mode under Linux since he can run Fedora now and clue us in on how much of a difference we're really talking about.

 

Garrett suggested "laptop meltdown", but that's probably just being dramatic. I'd rather sacrifice 10-15 minutes of runtime on a charge than spend half my time trying to solve the latest problem with Windows 10 every day.

 

Seriously. These SSDs use what? 2-3 watts? Tops. Even if it never goes into low power mode, that's not going to be your biggest power use. That's like the difference in setting your monitor 5% higher on brightness.

Reply
Options

86 Posts

09-08-2016

United States of America

52 Signins

2661 Page Views

  • Posts: 86
  • Registered: ‎09-08-2016
  • Location: United States of America
  • Views: 2661
  • Message 267 of 394

Re: Yoga 900-13ISK2 - BIOS update for setting RAID mode for missing hard drive on linux install

2016-09-23, 5:20 AM

Someone on Reddit suggested that since Linux doesn't use BIOS calls for anything and addresses the hardware in native mode, and the hardware still supports AHCI native mode, that someone should "teach GRUB read-only RAID support" and then have the kernel set to switch the hardware out of RAID and into AHCI native mode as soon as it is loaded.

 

Is this an option? Sorry if this is obviously not an answer. :)

Reply
Options

86 Posts

09-08-2016

United States of America

52 Signins

2661 Page Views

  • Posts: 86
  • Registered: ‎09-08-2016
  • Location: United States of America
  • Views: 2661
  • Message 268 of 394

Re: Yoga 900-13ISK2 - BIOS update for setting RAID mode for missing hard drive on linux install

2016-09-23, 5:31 AM

Replying to my previous post because I got an answer regarding the "Just toss out the BIOS-set RAID mode and kick it back into AHCI with the kernel once it's up." question. Matthew Garrett responded:

 

"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."

 

I asked:

 

"Is this something that can be put in the mainline kernel so that at least it does _work_ at least as well as the XPS while we're waiting for a better solution?"

 

I'll come back if he answers.

Reply
Options

15 Posts

08-20-2016

Australia

56 Signins

446 Page Views

  • Posts: 15
  • Registered: ‎08-20-2016
  • Location: Australia
  • Views: 446
  • Message 269 of 394

Re: Yoga 900-13ISK2 - BIOS update for setting RAID mode for missing hard drive on linux install

2016-09-23, 5:31 AM

That sounds about right, however there's something of a chicken-and-egg scenario there; you'd probably have to either put the modified grub directly on the SSD (by sticking it in a carrier card in desktop machine) or patch the grub as booted on the USB installer and as installed by the installer.

I'll add it to the list of things to look at :-)

 

Reply
Options

86 Posts

09-08-2016

United States of America

52 Signins

2661 Page Views

  • Posts: 86
  • Registered: ‎09-08-2016
  • Location: United States of America
  • Views: 2661
  • Message 270 of 394

Re: Yoga 900-13ISK2 - BIOS update for setting RAID mode for missing hard drive on linux install

2016-09-23, 5:37 AM

Garrett says that it could be upstreamed so we have an interim solution.

 

"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 replied:

 

"Is there a way you could get this upstream so we can try it out? I'm sorry, but it's above my head. :)"

Reply
Forum Home

Community Guidelines

Please review our Guidelines before posting.

Learn More

Check out current deals!

Go Shop
X

Save

X

Delete

X

No, I don’t want to share ideas Yes, I agree to these terms

Most Liked Authors

(Last 7 days)

View All