# [SOLVED] Lenovo Legion 5 - Post Bios Fail - Black Screen.

## 120all

Hello Gentoo community, i installed gentoo ~amd64 on Legion 5-15IMH05H (Lenovo)

https://pcsupport.lenovo.com/nl/nl/products/laptops-and-netbooks/legion-series/legion-5-15imh05h/?linkTrack=Homepage%3ABody_Search%20Products&searchType=3&keyWordSearch=Legion%205-15IMH05H%20%28Lenovo%29

The Gentoo installation went just fine, and everything worked like it should.

Until the point i got bored and brain dead and decided to enable secure boot on the Legion Gentoo laptop.

So i followed this guide:

https://wiki.gentoo.org/wiki/User:Sakaki/Sakaki%27s_EFI_Install_Guide/Configuring_Secure_Boot#Notes

I had troubles figuring out on how i should enable secure boot. And did not overseen the consequences of messing up.

At the guide from Sakaki, at the section where it reads:

```
koneko /etc/efikeys #OLD_BOOTORDER="$(efibootmgr | grep "^BootOrder: " | cut -d' ' -f2)"

koneko /etc/efikeys #efibootmgr --create --disk /dev/sdM --part 1 --loader /EFI/Boot/KeyTool.efi --label KeyTool --bootnum 99

koneko /etc/efikeys #efibootmgr --bootorder "${OLD_BOOTORDER}"

koneko /etc/efikeys #efibootmgr --bootnext 99 
```

I rebooted the system, got prompted to a blue screen where i could manipulate the secure boot keys.

I kept following the guide, to the point i replaced the original secure boot database keys, with the ones i created.

Then on reboot, the system boots: with black screen, and power light on.

Nothing else.

I can not enter bios/uefi by hitting F2

I can not boot ubuntu.iso usb drive

Things i tried: open up the laptop case -> remove the battery connector + cmos connector, for a while.

Then re-connect, power on = still black screen.

When at the black screen i can press F2 or any other key, and i can hear the laptop beep.

Caps Lock and Numlock light still go on and off, when pressing them.

I have no idea on how to get the screen working, or get at least something to boot. Maybe even eufi shell? Or some other recovery medium? So i can try to fix the corrupted secure boot data base/keys. Or even just turn secure boot off.

But because all i see is a black screen. There is nothing i can do.

I hope that someone, might give me some insight in how to recover the Legion 5 laptop.

Been searching the www for two days now, on how to fix.

Please help.

[edit] i also removed the nvme disk that got the Gentoo install on it, and tried to boot without disk = still black screen, with laptop fans spinning softly [edit]Last edited by 120all on Sat Dec 19, 2020 9:26 am; edited 1 time in total

----------

## 120all

Two days of trouble shooting, result = solved.

Because of the corrupted secure boot data base, nothing would boot. Also not the discrete nvidia gpu. Secure boot policy would not allow, because of the manipulated secure boot database, that was not in default status anymore.

So there was no video output, and thus i could disable secure boot.

I ended up blind mapping (because there was no (external) video output) trough the bios setting, with help of lenovo bios simulator.

And was so lucky i got able to switch off the discrete nvidia gpu -> Voila !!! video output back !!! -> immediately turn off secure boot.

Now i can boot ubuntu.iso into live environment. 

So all i got to do now, is replace the (nvme) disk that got the Gentoo installation on it.

And system is up and running again.

 :Very Happy: 

Thread can be closed.

----------

## JanovPelorat

 *120all wrote:*   

> Two days of trouble shooting, result = solved.
> 
> Because of the corrupted secure boot data base, nothing would boot. Also not the discrete nvidia gpu. Secure boot policy would not allow, because of the manipulated secure boot database, that was not in default status anymore.
> 
> So there was no video output, and thus i could disable secure boot.
> ...

 

I have the exact same problem you had, on my Lenovo Legion 5 15ARH05H (AMD Ryzen 4800). I am trying to perform the same solution as you describe using the BIOS simulator, but whenever I try to use the bios simulator on another laptop or on my desktop it doesn't respond to any presses on the keyboard. This is a problem especially since I remember the BIOS is pretty graphically oriented with use of the mouse seemingly encouraged. 

I used the simulator to compare the BIOS of your model number to the one for my model number; they look virtually the same, at least the settings you and I are interested in are in the same location within the overall menu. So I am begging you please will you share with me whatever keyboard presses you used to get into the BIOS and switch off the discrete GPU?? I know which setting you are referring to, I can find it in the BIOS simulator. All I need from you is the exact keyboard presses you used from turning on the power to switching off the GPU and restoring the display, especially going from the initial screen to "More Settings". I am in the exact same position you were in before you fixed it and I'm desperate to get this working again. Thank you so much in advance!

I couldn't figure it out on my own and my laptop was still under warranty. The tech replaced the motherboard and that cleared up the issue. This all originally happened because I'm using two SSDs to dual boot windows and Arch Linux (I have a Gentoo desktop, I'm not a complete interloper on this forum) but I'm going to have to find a secure boot compatible distro, probably fedora because I'm not messing with the key enrollment ever again lol.Last edited by JanovPelorat on Sat Oct 09, 2021 9:11 pm; edited 2 times in total

----------

## mega_flow

I brick the same laptop to Legion 5P-15IMH05H. lenovo had to replace my mainboard to fix this (A got a free cpu update from i5-10300H to i7-10875H)

I use secure boot before on this laptop never had problems. But after a bios update the secure keys got delete. When i use my keys and enable secure boot in bios the laptop brick 

still don't now why . only that i use tpm 2 to unlock my luks partition the last time. I hope this is not the problem or windows 11 will brick more lenovo hardware

----------

