[Guide] How to Unlock DVMT Pre-Allocated on Laptops



EliteMacx86

Administrator
Staff member
Setting DVMT to 64 is required and it can avoid several graphics issue. This requirement is not only for laptops but for desktops too.
But a majority of manufacturers don't give option to change the DVMT. DVMT can be set from EFI shell method but can be trouble for encrypted BIOS. The only workaround is to patch the framebuffer to match your BIOS settings. Commonly the 32MB DVMT is set on Broadwell/Skylake and Kaby Lake.

If you're using Intel HD Graphics (Supported Graphics), OS X/macOS needs more than 32MB DVMT otherwise there can be a Graphics kernel panic.
Also, if you're having a QHD/4K or UHD Laptop, you need to set the DVMT to 64 MB or even more such as 96 or 128MB.

Available Methods
There are only few methods by which DVMT-prealloc can be set or matched to your Laptop BIOS Settings. The methods are listed below
  • BIOS Option
  • Framebuffer
  • EFI Shell
  • Flashing a Unlocked BIOS
BIOS Option
This is a very easy method. But the major disadvantage is this option is not available by most of the laptop manufacturers. Only some manufacturers allow such as ASUS. The DVMT can be set from the Advanced Tab>Graphics Configuration>DVMT Pre-Allocated to 64M.

Framebuffer
This method is the easiest method and works for the most of the time. The advantage of this method is it can be applied to all the manufacturers, without flashing and unlocking the BIOS. Even if the BIOS is locked, this method will work.
The patch for the StolenMemory is present in the config.plist from RehabMan. You can just follow the laptop installation guide and get it done.

Note :
  • For patch, to bypass the StolenMemory, you must use a valid ig-platform-id to match the framebuffer.
EFI Shell
This method is bit difficult and doesn't fits to all the laptops. Laptops such as HP, Lenovo has often locked/encrypted BIOS and the DVMT cannot be unlocked.

Warning:
  • This method can also brick your Laptop. Use at your own risk.
Downloads
EFI Shell
UEFITool
Universal IFR Extractor
Phoenix Tool

Extracting the BIOS
The very first step is to extract the BIOS. The BIOS must be in a valid format such as .ROM, .BIN or .fd. The direct BIOS file will not work. For AMI BIOS, you can use AMI BIOS Utility. The other way is to use Universal BIOS Toolkit. With some manufacturers and laptop models, you can also use the .EXE BIOS file and then extract it directly. For some BIOSes, it's packed and compressed in a different format.

Extracting the Module from the BIOS file
The next step is to get the data from the extracted BIOS file. To get the data, open your BIOS file using UEFITool you downloaded above.
Find the module labeled with Setup
Expand the module, and right click on PE32 image section and then click on Extract Body.
A binary file will be saved on your Desktop.

Extracting the Settings from the Module
Once you've the module, you can proceed with the next step.
Open Universal IFR Extractor, you downloaded above.
Browse your Module and click on Extract.
A text version of the same module will be saved with the same name on your Desktop.
Open the text file and look for "DVMT".
Find the variables for the DVMT Pre-Allocated memory and the related values.
In this case, DVMT pre-allocated memory's variable is 0x1C3. The value of 96MB is 0x3. Record these two values.

Prepare a Bootable USB with UEFIShell
Use a USB Flash Drive
Format it as FAT32, MBR
Extract the EFIShell you downloaded above. You'll find a folder named BOOT.
Rename your USB to "EFI"
Create a folder on your USB and rename it to "EFI"
Copy the BOOT folder to your USB.

Note:
  • With some laptops, it will not recognize it. You'll need to copy the BOOT folder to the root of your USB Flash Drive.
Changing the DVMT
Restart your Laptop
Boot to boot menu and boot using your USB Flash Drive. Make sure you boot from the EFI prefix followed by your USB Flash Drive.
Now, you need to use the setup_var command to change the DVMT settings.
Syntax:
Code:
setup_var address value
Once you're in EFIShell, type the commands below.
In this case, the command is setup_var 0x1C3 0x3.

Note:
  • Change the value of memory variable and the memory of DVMT.

Once you get this done, you'll get a success message. If not, your BIOS is locked or encrypted and this method cannot be used.

Restart and boot it using the OS X/macOS USB Installer, you should have bypassed the assertion/kernel panic due to less DVMT size.

A Quick Note
The above method may not work on a Laptop with Insyde or H20 BIOS. As you won't be able to find the "Setup" module. To over come this, you'll need to use another method, but the medicine is same.


Once you've the BIOS file, follow the steps below.

1. Extract Phoenix Tool you downloaded above.
2. Open the folder, and you'll find PhoenixTool.exe.
3. Open the Phoenix Tool, this will open up a new window as shown below.
Under the Original BIOS, browse the path to your extracted BIOS.
4. Select the BIOS file you extracted, and click on “Open”
5. The tool will open the BIOS file.
Once the tool reads the BIOS, it will give a pop-up message, just click on “OK” and it will finish running.
6. Click on the “Structure” button as below.

With the above method, we used "Setup" variable but in the Insyde and H2O BIOS, you'll need to use "DXE Core" file.

Identifying the DXE Core
The next step is to identify the BIOS ROM file with the variable that we need to change. After clicking the “Structure” button in the Phoenix Tool, a new window will open up as shown below.
Expand the modules and look for the line described as “DXE Core"
2. Collapse the DXE Core button and select the “PE32+ image section”.
3. Select the “Decompress Extracted Modules” check box and then click “Extract
4. For few minutes, it will seem like nothing is going or the process has stopped but you need not to worry.
It will create a new folder called “DUMP” in the folder where you saved your extracted BIOS file.
Once the process finishes, you will be directed back to the PhoenixTool main menu window. You can close this window by clicking the close button.

Identifying the BIOS ROM file
The location where you saved your BIOS, you can find a folder named “DUMP”. Inside this folder there will be several files all ending with .ROM extension. Except one ROM, all the other ROM files are of no use.
Identify the largest file with the name starting with FE3542FE. For my example this was named “FE3542FE-C1D3-4EF8-657C-8048606FF670_1513.ROM” and was about 555KB big yours will be different but starts with the same FE3542FE name.
Copy the identified ROM and place it to another location.

Once you get the ROM file, you can follow the above steps, from Universal IFR Extractor step.

Flashing a Unlocked BIOS
This method is quite risky and will not work without use of special tools and knowledge. A little wrong step can lead to damage your Laptop and you need to get your laptop to some technician and deal with it.

You can find a unlocked BIOS for your laptop here. Please note that the unlocked BIOS might not be available for your laptop. But you can request it.


Credits:
Austere.J
Kinutsk
 

Lingaraju06

New member
Hello and thank you for the detailed guide @EliteMacx86 , i am trying to use efi shell to modify the values and was able to find the setup and the parameters to change dvmt and created usb and was able to boot to some grub but wasnt sure if my laptop has ami or insyde so i proceeded using phoenix method and was able to loacte dxe core and PE image section and before going there when i click on structure it creates a dump folder with lots of .rom files and opens efi in new window and i was able to locate dxe core and pe image and when i click decompress and extract nothing happens i left it at that stage for half hour and it never went back to main window and i proceeded to look for the fe3254fe rom but i couldnt find it, so i am not sure what bios my lappy has at this point as both methods were almost finding everything, but in my bios it shows 64mb video memory but my hackintosh shows only 7mb and i have upgraded my ram as well but its not showing correctly and i was able to locate the memory address and vakues in the text that efr tool extracted, so now i am not sure which method to follow, do you have any advice, thank you. Btw i have dell 5559 with i5 6200u and intel hd520, thank you.
 

EliteMacx86

Administrator
Staff member
Hello and thank you for the detailed guide @EliteMacx86 , i am trying to use efi shell to modify the values and was able to find the setup and the parameters to change dvmt and created usb and was able to boot to some grub but wasnt sure if my laptop has ami or insyde so i proceeded using phoenix method and was able to loacte dxe core and PE image section and before going there when i click on structure it creates a dump folder with lots of .rom files and opens efi in new window and i was able to locate dxe core and pe image and when i click decompress and extract nothing happens i left it at that stage for half hour and it never went back to main window and i proceeded to look for the fe3254fe rom but i couldnt find it, so i am not sure what bios my lappy has at this point as both methods were almost finding everything, but in my bios it shows 64mb video memory but my hackintosh shows only 7mb and i have upgraded my ram as well but its not showing correctly and i was able to locate the memory address and vakues in the text that efr tool extracted, so now i am not sure which method to follow, do you have any advice, thank you. Btw i have dell 5559 with i5 6200u and intel hd520, thank you.
Often Dell Laptops requires DVMT unlocking or you can also use Clover patch instead of modifying the EFI shell. Provide your asset tag and the BIOS version installed. Also provide the BIOS file from Windows.
 

Lingaraju06

New member
Often Dell Laptops requires DVMT unlocking or you can also use Clover patch instead of modifying the EFI shell. Provide your asset tag and the BIOS version installed. Also provide the BIOS file from Windows.
In bios it says video memory as 64mb but in hack it only shows as 7mb and i get error during hack boot as igpu unable to something but it boots fine and works fine otherwise, i have also updated my memory from stock 8gb hynix 1600mhz to 16gb hyperx 2133 and in cpuz in windows it still reads 1600mhz as bios is locked to that speed but in hackintosh it shows up as 2000mhz speed, i also want to update bios to reflect correct ram speed and i was able to locate the address and values in the text file that ifr tool has extracted to set correct memory speed in efi shell but i am not sure what type of bios my lappy has, recently updated to latest dell 1.7.0 bios with exe downloaded from dell, adding link to the extracted .rom and the original .exe downloaded from dell, thank you.
.rom file https://www.dropbox.com/s/kmz4y4xp5d4v6k2/DellInc.-1.7.0.rom?dl=0
.exe file https://www.dropbox.com/s/pqkao0hgns0pw2s/Inspiron5459_170.exe?dl=0
Service tag 6S2KPC2
 


Top