[HowTo] Enable Hidden Features of Lenovo Legion 5 15ARH05


A bit of Context (Can be Skipped): I bought this laptop to use Linux and Windows VM using PCI-passthrough for the GPU, the problem is that Lenovo Doesn’t show IOMMU Option In the BIOS, so I cannot enable it.

The Bios is a InsydeH20, but it seem a different from the one I saw online, as it the one with the mouse support rubbish (




I tried all possible key combo to unlock Hidded Feuture, but accordind to the Murphy law this not Worked at all.
So after a bit of research I discovered H20UVE and H20EZE, but I’m a bit scared, that these are old compared to my bios and could brick my laptop.

Regarding the option that I want to enable, I found these with UEFITool/IRF Extractor, but I want a confirmation from one with more experience before
making damage.

The relevant Part of the IFR is from CbsSetupDxeRN Module:


0xAB6B Form: NBIO Common Options, FormId: 0x7004 {01 86 04 70 08 00}
0xAB71 Subtitle: Statement.Prompt: NBIO Common Options, Flags: 0x0 {02 87 08 00 00 00 00}
0xAB78 End {29 02}
0xAB7A Subtitle: Statement.Prompt: , Flags: 0x0 {02 87 02 00 00 00 00}
0xAB81 End {29 02}
0xAB83 One Of: IOMMU, VarStoreInfo (VarOffset/VarName): 0xCA, VarStore: 0x5000, QuestionId: 0xA6, Size: 1, Min: 0x0, Max 0xF, Step: 0x0 {05 91 39 02 3A 02 A6 00 00 50 CA 00 10 10 00 0F 00}
0xAB94 One Of Option: Disabled, Value (8 bit): 0x0 {09 07 18 00 00 00 00}
0xAB9B One Of Option: Enabled, Value (8 bit): 0x1 {09 07 17 00 00 00 01}
0xABA2 One Of Option: Auto, Value (8 bit): 0xF (default) {09 07 12 00 10 00 0F}
0xABA9 End One Of {29 02}
0xABAB One Of: PCIe ARI Support, VarStoreInfo (VarOffset/VarName): 0xCB, VarStore: 0x5000, QuestionId: 0xA7, Size: 1, Min: 0x0, Max 0xF, Step: 0x0 {05 91 3B 02 3C 02 A7 00 00 50 CB 00 10 10 00 0F 00}
0xABBC One Of Option: Disabled, Value (8 bit): 0x0 {09 07 18 00 00 00 00}
0xABC3 One Of Option: Enabled, Value (8 bit): 0x1 {09 07 17 00 00 00 01}
0xABCA One Of Option: Auto, Value (8 bit): 0xF (default) {09 07 12 00 10 00 0F}
0xABD1 End One Of {29 02}
0xABD3 One Of: PSPP Policy, VarStoreInfo (VarOffset/VarName): 0xCC, VarStore: 0x5000, QuestionId: 0xA8, Size: 1, Min: 0x0, Max 0xF, Step: 0x0 {05 91 3D 02 3E 02 A8 00 00 50 CC 00 10 10 00 0F 00}
0xABE4 One Of Option: Disabled, Value (8 bit): 0x0 {09 07 18 00 00 00 00}
0xABEB One Of Option: Balanced, Value (8 bit): 0x2 {09 07 3F 02 00 00 02}
0xABF2 One Of Option: Auto, Value (8 bit): 0xF (default) {09 07 12 00 10 00 0F}
0xABF9 End One Of {29 02}
0xABFB Ref: GFX Configuration, VarStoreInfo (VarOffset/VarName): 0xFFFF, VarStore: 0x0, QuestionId: 0xA9, FormId: 0x7028 {0F 0F 40 02 40 02 A9 00 00 00 FF FF 00 28 70}
0xAC0A Suppress If {0A 82}
0xAC0C QuestionId: 0xAD equals value 0xF {12 86 AD 00 0F 00}
0xAC12 Not {17 02}
0xAC14 QuestionId: 0xAD equals value 0x1 {12 06 AD 00 01 00}
0xAC1A Not {17 02}
0xAC1C And {15 02}
0xAC1E QuestionId: 0xAD equals value 0x2 {12 06 AD 00 02 00}
0xAC24 Not {17 02}
0xAC26 And {15 02}
0xAC28 End {29 02}
0xAC2A Ref: Audio Configuration, VarStoreInfo (VarOffset/VarName): 0xFFFF, VarStore: 0x0, QuestionId: 0xAA, FormId: 0x7029 {0F 0F 41 02 41 02 AA 00 00 00 FF FF 00 29 70}
0xAC39 End If {29 02}
0xAC3B Ref: XFR Enhancement, VarStoreInfo (VarOffset/VarName): 0xFFFF, VarStore: 0x0, QuestionId: 0xAB, FormId: 0x702A {0F 0F 42 02 42 02 AB 00 00 00 FF FF 00 2A 70}
0xAC4A Ref: SMU Common Options, VarStoreInfo (VarOffset/VarName): 0xFFFF, VarStore: 0x0, QuestionId: 0xAC, FormId: 0x702B {0F 0F 43 02 43 02 AC 00 00 00 FF FF 00 2B 70}
0xAC59 Suppress If {0A 82}
0xAC5B QuestionId: 0xA6 equals value 0x1 {12 86 A6 00 01 00}
0xAC61 Not {17 02}
0xAC63 End {29 02}
0xAC65 One Of: DMAr Support, VarStoreInfo (VarOffset/VarName): 0xCD, VarStore: 0x5000, QuestionId: 0x702C, Size: 1, Min: 0x0, Max 0xF, Step: 0x0 {05 91 44 02 45 02 2C 70 00 50 CD 00 14 10 00 0F 00}
0xAC76 One Of Option: Auto, Value (8 bit): 0xF (default) {09 07 12 00 10 00 0F}
0xAC7D One Of Option: Enabled, Value (8 bit): 0x1 {09 07 17 00 00 00 01}
0xAC84 One Of Option: Disabled, Value (8 bit): 0x0 {09 07 18 00 00 00 00}
0xAC8B End One Of {29 02}
0xAC8D End If {29 02}
0xAC8F End Form {29 02}

So To enable IOMMU I have TO :
Boot Grub with setup_var
issue setup_var 0xCA 0x1
issue setup_var 0xCD 0x1

1) I am Right?

2) What VarStore indicate?

3) And Would be possible to show these settings in the BIOS?

4)Why Some option that I can See in the BIOS, like "Restore Default Overclocking" is not shown in the IRF, but EUFITool Find it in the Correct Module?

Here's the bios mega.nz/file/kZgkCYjT#Z_BNPepPIiBIkisVK5IF7xUMzpsvolAMdbJYeDWW7tM (around 18Mb)

Edit by Fernando: Thread title customized

Resolved by myself

@AARCH64_EL3 - Yes, setup_var may work, or you may need to dump vars with CMD-line H2OUVE, edit, then flash back (Safest and best way)

For #4 - You may only be looking at CBS IFR, there is also setup module IFR which would have the rest of stuff from normal BIOS area such as the setting you asked about.


I have the same issue for the same reason, how did you resolve it?

Hello @AARCH64_EL3 , thanks for these pointers, I was able to enable IOMMU & DMAR following these steps:

1. Download modGRUBShell.efi from github(.)com/datasone/grub-mod-setup_var/releases (or compile from source) and place it in a bootable usb, assuming your device is /dev/sda:

sudo wipefs -a /dev/sda
sudo parted /dev/sda mktable msdos
sudo parted /dev/sda mkpart primary fat32 0% 100%
sudo mkfs.fat -F 32 /dev/sda1
sudo parted /dev/sda set 1 boot on

sudo mount /dev/sda1 /mnt
sudo mkdir -p /mnt/EFI/BOOT
sudo cp ./modGRUBShell.efi /mnt/EFI/BOOT/bootx64.efi

2. Boot from usb, and when at grub prompt, issue the following 2 commands:

setup_var_cv AmdSetup 0xCA 0x1 0x1
setup_var_cv AmdSetup 0xCD 0x1 0x1

Note: It’s necessary to use setup_var_cv instead of setup_var since the variables are in a different varstore (0x5000 = AmdSetup) than the default

Now reboot, and both features will be enabled

hello im new here thanks for help i tried your guide on EUCN31WW and it worked msinfo32 says that kernel DMA protection is on
PROTIP on linux you can enable iommu=pt and intel/ amd_iommu=on on the ubuntu livecd by pressing e to edit the command line and put after /vmlinuz.efi

but will this still work for [LENOVO EUCN33WW 23/09/2021] BIOS
i reverted my bios to defaults and installed the newest firmware via lenovo vantage to avoid errors
after a few reboots i tried it again it says [GUID does not match expected GUID taking it nevertheless] this is the same output as last time when it worked
but this time it no longer seems to work strangely the mobilepassthorugh script says that IOMMU VT-D/AMD-Vi is enabled in the uefi but DMAR is off on msinfo32
did the lenovo developers patch this method? it says on the changelog the wakeup sleep issue was fixed surprisingly i never experienced any instability unlike what reddit said

also can i use this method with different variables to increase the radeon iGPU to 2gb VRAM flashing BIOSes is too dangerous for me even though my device is still in warranty
512mb of vram feels bare minimum edge would lag for a second when watching multiple youtube tabs simultaneously and i can notice it going to peak 480mb on task manager

No. It seems this feature is not working in your BIOS.

Don’t know if they did it, but I can check if anything about DMAR has changed if you share a copy of the BIOS. EUCN33WW is currently not available for download on driver download page.

Hi, I have released, my unlocker for Lenvo/Legion Bios :
Look Here:
Legion Bios Unlocker and Locker

thanks didn’t expect such a quick reply here you go i have an original copy of the bios EXE files itself on C:/drivers/flash
will this work for the 1660 2060 models as well? i wanna buy this in the future its a shame that i can’t increase the radeon Vram

bios exe files.zip (11.3 MB)

ok i managed to enable the advanced menu after using the unlocker script but for some reason IOMMU keeps turning itself off whenever i check with the bios how do i fix this it just keeps on going to AUTO
i also turned off [use OS defaults] and set it to uefi manually but it still keeps turning off and the mobilepassthough script hangs when i run it on livecd

however the good news is that i managed to set my igpu Vram to 1gb by poking around the UMA settings

I also do not understand why this is so. Therefore, I could not give an answer for so long.

Can you elaborate which UMA settings you changed? Settings that are in the CBS menu?

Advanced > Peripheral Configuration > TPM
for those who want to avoid win11

AMD CBS > NBIO Common Options > GFX Configuration > UMA
IOMMU keeps reverting to auto on every reboot but DMAR says enabled in the bios even though its off msinfo32 strangely PCIe ARI is still enabled

for the graphics set it to UMA specified then enable switchable graphics or the iGPU will be automatically disabled (i have no idea why it does that)
AMD PBS > Special Display Features > HybridGraphics
the weird part is no matter what i put on UMA frame buffer size it always gives me 1GB even if i set it to 768M
but based on what i found most APUs have 1GB of vram with no way of changing so i guess thats normal but would be really nice if i could get it to 2GB

i don’t know if the [OS Optimized Defaults] is causing the bios to revert but it seems to be uefi/legacy related and nothing more
another thing i noticed is selecting [Load Default Settings] does not seem to re-lock by bios i dunno if holding power button for 10 seconds will reset it
if nothing else works i might try using CMOS deanimator on my winPE maybe something is stuck in the bios? hopefully i dont brick my pc by accident

Resetting to default, doesn’t remove the unlock, because, restoring to default, just load setting from ifr, and not create nor delete efi var, so the variable created by my tool is not deleted, for this I created also the relocker. Is just like the boot order, and boot entry.
Look at the how it work, section to see why it work that way.
If you want i can create also the version with the fn+d, but then it will relock every time

do you know the original variables there? i think i might have messed up while using that tool hopefully i have not done any permanent damage to my hardware
while it worked originally on 31 when i used it on the newer EUCN33WW something else might have been modified which prevented iommu from turning on

is there a way to fully reset all the efivars back to default maybe lenovo has an official reset too for this?
i dont wanna dissasemble my laptop to remove the cmos due to warranty
if nothing else works i might revert back to back to EUCN31WW also CMOS deanimator didn’t do anything

if needed maybe i can extract by bios and all the efivars
edit: i have no idea how to extract the bios from motherboard (not the exe) google does not yield any results
maybe there is some kind of low-level efi app to read the firmware and save it to the usb

EUCN33WW, Is a bugged version, that also lenovo reverted, due too many problem, as you can see, from the site you can only download the EUCN31WW.
There was something broken with EUCN31WW, that made you update to EUCN33WW? for me the bios "if it ain’t broke, don’t fix it"
Regarding setup_var, it should be revert automatically on LOAD Default, or on bios upgrade/downgrade.
BTW, you can get the default value from my first post with the IFR, from there both 0xCA and 0xCD, have 0xF as default

Hi, guys! I’ve managed to update the bios to EUCN33WW, which caused some problems, meaning the system could boot up but I couldn’t see anything on the screen. So, after using an HDMI cable to connect it to other display and changing the graphics settings, I’ve managed to boot it up properly. So far, nothing wrong, I’ve just unlocked the advanced settings menu in the bios, I was hoping to find the XMP profile for my RAM.

As far I can tell, EUCN33WW is a bugged version, that was retired by lenovo, as far I can tell EUCN31WW, is the most recent stable version.
Regarding XMP, there are no setting regarding that, there are setting regarding manual memory timing, but never tried that, as I was afraid of getting an expensive brick; so I don’t know if these setting do something or not.

I guess, but I’m not downgrading it. So far, so good! I can always go back to a working version of the bios since I have the modded bios and the SPI clip at my disposal. So, I’m waiting for the future updates to see if it works unlocking them with the Windows app. Great work!

BTW, I’ve found the NVMe Raid mode. I’m currently using two NVMe drives, one from Corsair and the other one from ADATA. Do you know it I can enable this mode on these drives without being similar?