r/Dell•
Snoozhead

XPS 7590 1.6.0 UEFI: unlock undervolting and remove CFG lock

XPS Discussion

EDIT: Much simpler solution - Go into the BIOS settings and click 'Restore settings' and then 'Factory Restore'. Reboot and undervolting is re-enabled.

Disclaimer 1: u/likestomoveblocks has been instrumental to finding this fix and credit should belong to them.

Disclaimer 2: I am not responsible for any damage that might ensue from trying this yourself. I have tried this on my laptop and it has worked perfectly, however results might not be the same for you. If you are NOT comfortable with modding your UEFI/BIOS, I would stop reading here.

Disclaimer 3: this is my first post - apologies for any shortcomings

​

Background to solution: As of BIOS update 1.6.0, Dell locked out users from undervolting their 7590. As this laptop has a tight thermal profile as it is, removing this feature leads to significant throttling. See more here. The CFG bit has always been locked, leading hackintosh users (such as myself) to use power management workarounds.

Since these problems all stem from the BIOS/BIOS upgrade, the 1.6.0 update was extracted using this Python script, and UEFITool was used to search for "CFG Lock" and "Overclocking Lock". The corresponding PE32 file was extracted, See below:

0x4E1A0         Form: View/Configure CPU Lock Options, FormId: 0x273D {01 86 3D 27 B7 01}
0x4E1A6                 One Of: CFG Lock, VarStoreInfo (VarOffset/VarName): 0x6ED, VarStore: 0x1, QuestionId: 0x381, Size: 1, Min: 0x0, Max 0x1, Step: 0x0 {05 91 B0 03 B1 03 81 03 01 00 ED 06 10 10 00 01 00}
0x4E1B7                         One Of Option: Disabled, Value (8 bit): 0x0 {09 07 04 00 00 00 00}
0x4E1BE                         One Of Option: Enabled, Value (8 bit): 0x1 (default) {09 07 03 00 30 00 01}
0x4E1C5                 End One Of {29 02}
0x4E1C7                 One Of: Overclocking Lock, VarStoreInfo (VarOffset/VarName): 0x789, VarStore: 0x1, QuestionId: 0x382, Size: 1, Min: 0x0, Max 0x1, Step: 0x0 {05 91 AC 03 AD 03 82 03 01 00 89 07 10 10 00 01 00}
0x4E1D8                         One Of Option: Disabled, Value (8 bit): 0x0 {09 07 04 00 00 00 00}
0x4E1DF                         One Of Option: Enabled, Value (8 bit): 0x1 (default) {09 07 03 00 30 00 01}
0x4E1E6                 End One Of {29 02}

As we can see, the UEFI variables encoding for Overclocking Lock and CFG Lock are 0x789 and 0x6ED respectively. These are both set to 0x1 (locked) by default in 1.6.0. The other option, 0x0, encodes for unlocked.

The solution:

  1. Format a USB drive to FAT32 on a GUID partition map.
  2. Make a folder called EFI in the root of the USB
  3. Inside this, make a folder called BOOT
  4. Download this file and place it inside BOOT
  5. Rename this file to bootx64.efi
  6. Boot into the USB drive (spam F12 at the BIOS prompt and select your USB drive)
  7. Once this has loaded, enter setup_var_3 0x789 0x00 to disable overclocking lock
  8. Repeat this with setup_var_3 0x6ED 0x00 to disable CFG lock
  9. Enter reboot to exit and restart your computer
  10. You will now find overclocking to re-enabled and CFG lock removed!

CFG lock removed as highlighted, enabling native power management, undervolting works too with VoltageShift

Undervolting re-enabled in Windows

Posted Apr 12, 2020, 11:29 AM UTC · edited

1024
mkdr•

What is "cfg lock"? You also dont need all this, you can just load bios factory settings, and undervolt works again. Does this give options to more things too, like overclocking the cpu?

https://www.reddit.com/r/Dell/comments/fxfcos/how_to_get_undervolting_back_after_g3/

Dell mostly messed up and forgot to set the lock for the bios factory load config.

5
SnoozheadOP•

Ah I had no idea, sounds like a much safer and simpler fix. I'll update the post to reflect that - thanks for the info!

Although that is by far a much better fix, in the future it would be very easy for Dell to patch this, maybe this guide may come in handy for the next UEFI update release.

CFG lock has no real utility unless you're a hackintosh user. Its a portion of the UEFI that is written to by the OS for CPU power management. Basically allows for greater OS dictated C-state control.

Its locked by default in all xps 7590 UEFI versions and the majority of other motherboards as Window's doesn't utilise it.

macOS utilises an unlocked CFG to control CPU power management, and when locked out it fails to boot without patching. By doing this, i'm able to get native CPU power management (like a real mac), which leads to greater responsiveness and power saving simultaneously, and I don't require any work around patches to boot.

3
pmdevitaXPS 15 7590 i7 16GB FHD•

Hey I'm also hackintoshing on the 7590, do you have any kind of estimate as to how unlocking your CFG improved your battery life?

1
SnoozheadOP•

Second half of your question - upon looking into the UEFI firmware image there's a whole hidden 'Advanced' menu containing 'Overclocking Performance Menu', 'CPU Configuration', and 'Thermal Configuration' to name a few. I'm looking into how to enable access to it currently

2
mkdr•

Is there maybe even a way to unhide everything in the bios and you can just have a more advanced bios GUI? Maybe there are "hide" flags for stuff?

1

Many people don't have the option to reset to factory settings

1
mkdr•

I wonder why. Seems like there are two versions of the same laptop out not just mainboard version or anything but also some have this option missing... not sure why.

1
Curtis7990•

Tried on 9570 doesn't seem to work. The console gave me mesagge it succesfull changed parameters to 0x00 but UV still doesn't work. Any suggestion?

​

EDIT: I succeed, addresses for 9570 are 0x659 and 0x5BD

5
undrwater•

Thank you!! Your addresses worked for my 9570, and I get readings in intel-undervolt. Also thanks to u/Snoozhead for the hard lifting here and the "Legacy Boot" hint, as the USB device wasn't booting for me.

​

​

Great work!

3
Majoriteten•

guys ffs, please edit and specify bios version.

1
ad-on-is•

Gosh, I just did it with exactly the same addresses and UV still isn't working. I even did a factory reset.

1
Curtis7990•

Are you on 9570 or 7590?

1
ad-on-is•

9570 from 2018

1
Curtis7990•

Don't know man, you can try extract the BIOS with the guide and look for CFG lock addresses, I did that to find them.

1
VanGoghComplex•

Okay, I got this working on my G7 7700. Things I needed to do:

1.) Disable Secure Boot in the BIOS so that I could boot from the USB.

2.) I wasn't able to use setup_var_3 on my machine. I had to use the original setup_var, which I found here: https://github.com/XDleader555/grub_setup_var/releases/tag/v1.0-alpha Load this one on the stick and name it bootx64.efi like above.

3.) The commands on my bios were

setup_var CpuSetup 0x3e 0x0

and

setup_var CpuSetup 0xda 0x0

4.) After this, I had to do a load Factory defaults on my BIOS, and viola: undervolting is unlocked in XTU. (And I know there are other posts in this thread that might suggest all I had to do was load factory defaults to begin with but trust me, I tried that several times to no avail.)

Thanks to all the contributors!

5
Ninja-Storyteller•

Ran into a hiccup on my G7 7700.
I disabled Secure Boot in BIOS, but the USB is not listed as a boot option (Just Windows Boot Manager, EUFI, etc). When I click Add Option it gives me a rudimentary File Explorer, but not one I can navigate to the USB drive to indicate it.

1
Professor_Toke•

0x3e (CFG Lock) and 0xda (OC Lock) are the same variables for the Vostro 7500, but with or without a BIOS factory default load, Throttlestop still says FIVR controls are locked, wonder if there are any other steps that can be taken to enable undervolting on a 10750h :(

Update: I was using a different setup_var originally and adjusting the "Setup" varstore rather than CpuSetup, thanks!

1
sled_dogs_uk•

Using a combination of these two contributors and the original post, I got it working on my XPS-15 9570 Bios version 17.1

I ran the main post's step but the EFI wouldnt work for me - just got a cursor.

I downloaded the file u/VanGoghComplex linked and that got me into the boot loader.

I originally tried the *setup_var CpuSetup* with the original addresses, that couldn't find CpuSetup.

As per u/Professor_Toke i tried with *Setup* instead of *CpuSetup* and the *0x3e* addresses this worked.

I can see there is another poster ( u/Curtis7990) with a 9570 and he recommends completely different addresses. These didnt work for me [see later edit], but other research has indicated there appears to be two entirely different versions of the 9570 which are outwardly identical. Although it could also be the different version of the bios you started with. The above worked for me so i just wanted to add a call out for other 9570 owners.

Thanks to all contributors, if i'm honest I had very little idea what i was even doing but I got it working.

______________________________________________

Edit:

i just had to reapply with this and u/Curtis7990's numbers worked this time, not the numbers noted in my comment

So working commands for my machine are:

setup_var Setup 0x659 0x00

setup_var Setup 0x5BD 0x00

Both times the BIOS changes worked for my next boot the machine wanted to run its pre-boot checks - big white screen. That seems to be a very good indicator the change has been successfully applied

3
VanGoghComplex•

I did the same thing initially. Glad you got it going!

1
cheher•

this worked also for the XPS 17 9700

thanks

1
Thorton_Melon•

Wanted to say thanks so much for this fix. I updated not giving it a thought and saw my temps go to hell . Rolled back to 1.50 still broken then found this thread on Notebookreview.

Laptop is useless without undervolting .

Thanks again.

2
ezluckyfreeeeee•

Old thread but it worked great, thank you!!

2
Pierre118•

You say : ''Format a USB drive to FAT32 on a GUID partition map''

Don't you mean : make a bootable FAT32 USB drive? Because it won't boot by just format it, make the folders and copy the file.

1
SnoozheadOP•

I've found that following these steps renders the drive bootable without any further intervention. I came across this where the same steps are listed (albeit for a different motherboard). Although, you are correct, this is creating a bootable FAT32 drive - I just left in the partition scheme style for further reference.

2
SnoozheadOP•

UEFI firmware looks for /EFI/BOOT/bootx64.efi to initiate. The file we've renamed to bootx64.efi is a linux bootloader (GRUB) shell. Since the UEFI looks for this file to run by default, that should be enough to render the drive bootable

1
DeltoidDelta•

If you don't mind me asking, how did you extract and parse .sct (PE32) file from UEFITool? I'm running GNU/Linux and I can't seem to be able to figure it out; opening with a text editor would just throw garbage.

I'm trying to see if there are other hidden options that I can change for funsies

1
SnoozheadOP•

You can use IFR Extractor - does the job nicely.

To save you some time I've uploaded the extracted file here to my google drive

Looks like there's an entire hidden 'advanced' menu! Search 0x49725 take you right to it. Contains CPU, Power, Thermal, Network, USB, and switchable graphics configs alongside a host of others.

Annoyingly it looks to me that you'd need to edit and reflash the the image to access it, however i could be wrong, havent spent much time going over it. Let me know if you find anything else interesting

1
DeltoidDelta•

0x49725

Thanks for letting me know! How would you modify its values? I know in ami based aptio UEFI/bios, you can simply use the editor to change its values (changing the permission) so that it's visible.

I'm on a different machine (Inspiron 7591 2-in-1 Black Edition) but it still works!

I wonder changing

                                   Form Sets

0x6C098         Boot Configuration (0x1653 from string package 0x0)
0x6C9C8         Intel Advanced Menu (0x1651 from string package 0x0)
0x8A328    Platform Information Menu (0x1633 from string package 0x0)

0x0 values to 0x1 would simply enable the menu on bios. Hmm...

1
[deleted]•

Is this setup_var_3 a persistent setting? In other words does the setting remain after the system is powered off?

1
SnoozheadOP•

That's correct. I've restarted (both cold and hot) multiple times and CFG and undervolting remain unfettered. I've also rechecked the variables and they've remained at 0x00. You can check the current value without writing to it by entering setup_var_3 VAR where VAR is the variable you're interested in FYI

1
[deleted]•

Before trying to set the value, I a did 'Factory Restore' then checked the value of 'Overclock Lock'. It was set to 0.

The 'CFG Lock' is set to 1 and undervolting still works.

Good to know there's a way to set the value in case the change they factory setting in the future.

2
saraltayal•

hey u/Snoozhead. This is kind of disconnected but I've been wanting to hackintosh my XPS too. Could you point me towards what resources you used (guides, efis etc) and what challenges you faced?

I was considering following this guide: https://www.reddit.com/r/hackintosh/comments/ft7kf4/dell_xps_7590_successful_install_on_macos/

and using one of these EFIsP:

https://github.com/LuletterSoul/Dell-XPS-15-9570-macOS-Mojave

https://github.com/bavariancake/XPS9570-macOS

​

Thanks a ton!

1
SnoozheadOP•

Both LuletterSoul's and Bavariancake's EFIs are great - however I used this one by Daliansky as a base to build from as it got DSDT's patched specifically for the 7590 rather than the 9570.

What i've got now is a sort of hybrid using different parts of all of them - I don't think it really resembles any of them individually anymore.

Whats working: iGPU, Brightness control, Volume control, headphone jack, webcam, WiFi, Bluetooth, USB ports all correctly mapped, Thunderbolt (USB, Audio, HDMI (and audio over HDMI), Ethernet), Multi touch/gesture support, HDMI, and USB-C ethernet

Glitches: When using HDMI over thunderbolt (I connect to my thunderbolt dell dock, which is connected to a second monitor via HDMI) the internal screen goes blank - by sleeping the laptop and waking it up it works again. Very rarely (probably once weekly) audio just stops working - its fixed by a warm-reboot.

Whats not working: Fingerprint reader (no fingerprint readers work for anyone), GTX 1650 (again no one's got this working), and SD card port.

I probably get around 5 hours of battery life (think the dGPU is still sapping some power) and have been using macOS as a daily driver for the last few months.

​

I'm sure you're aware about the incompatibility of the WIFI/BT card, so I replaced it with the DW1820A. This requires pin shielding which can be easily done with sellotape (see here).

Hackintool is your best friend - I've used it to remap my USB ports, and also to update Clover and all kexts to their latest versions (apart from voodooI2C/I2CHID which is at v2.3 as v 2.4 breaks touchpad usage).

I've changed the SMBIOS to a 16,1 macbook pro as it uses the same processor and iGPU.

Also following the steps above and unlocking the MSR (CFG lock), ive removed all CFG/MSR related patches in clover.

I've also ended up building a CPU Friend Kext for CPU management (i know you shouldn't need to with native power management) because my i9 wasn't downclocking to 800Mhz or reaching 5GHz.

Also moved to VirtualSMC instead of Fake SMC

I've made a tonne of other changes which are way too much to go into here. As i'm sure most hackintosh users will tell you, perfecting your hack is a constant evolutionary process. I'm making a how-to guide for the XPS 7590, I'll PM you with details when finished if you'd like

3
Shadowed87•

Wow! Looking forward to your efi config! Happy hackintoshing :P

1
saraltayal•

Firstly thanks a ton for taking the time to write such a thorough and detailed reply! I didn't know about tools like Hackintool and will definitely look into the other mods you suggested!

Yes, a How-to-Guide would be super appreciated!!!! I hope this isn't too big of an ask but could you also upload your EFI when you finish your guide? Being able to sift through the various EFI parameters to help perfect my hack as you mentioned would be super useful.

Thanks again for taking time to reply to my comment and for writing up a how-to guide for the 7590. I'm finally getting around to hackintoshing this machine since the quarantine has given me more free time! Cheers

1
Live_Distribution•

Hi, I tried the above to my dell inspiron 7490, but I am stuck at BIOS Dell logo. Do you think the bootx64.efi only XPS models ? I did turn off the secure boot and disabled bitlocker..

1
SnoozheadOP•

Try entering the BIOS setup and enabling legacy ROM booting - this is required in some other dell models (XPS and non XPS alike)

1
Live_Distribution•

Hi I think the issue is the Inspiron 7490 does not have legacy rom booting only uefi boot is allowed.

I can select the bootx64.efi using f12 but shortly after selecting it, It just locks on the Dell screen.

I am going to try recompling the modgrubshell file as the new version grub2 supports uefi apparently worth a try i guess. bios

1
SnoozheadOP•

That's strange - I can't imagine it's changed that much between the Inspiron 7490 and 7590. Over here they've documented the procedure on the Inspiron 7590 with no mention of legacy ROM boot enabling required. You'd think it'd be the other way round, i.e. legacy booting removed from the newer versions and persistent on the older?

Let me know if you have any luck with the recompiled version - could be very useful for other users limited to uefi mode

1
Live_Distribution•

I have tried everything I know and gave up for now.

  1. From 2020 Dell Stopped support for legacy boot rom so I don't have this option ref: https://www.reddit.com/r/sysadmin/comments/bjxdgg/dell_removing_legacy_boot_by_2020/
  2. Someone else had similar issue of not being able to boot with a dell logo stuck and later on got it working by switching on the legacy boot option in the bios ref: https://www.reddit.com/r/hackintosh/comments/g1dk6d/cfg_unlock_image_issues/
  3. I tried the ubuntu 20.04 usb install with grub2.04 uefi mode and it booted so I tried to find a modified grub_setup_var with modified grub2 that supports uefi boot and I did find it. Despite booting it gave me an error Unable to find variable store. ref: https://github.com/XDleader555/grub_setup_var

I contacted the original devoloper on github asking him help on how to compile the script for grub2.04 as i recall him having setup_var_3 patch maybe that's why mine didn't work.

​

FIXED: The developer reached back to me and corrected an error I made which was incorrect syntax spacing which was fixed and i managed to get undervolting back. Thanks mate. https://github.com/XDleader555/grub_setup_var/issues/4

2
Ndwolfy780•

Would this work in a 7790? I’ve used the factory bios settings and that allowed me to undervolt great! However being able to overclock? That’s right up my ally so I’m trying to use the Boot USB instead. And everytime I try to boot to it I’m taken to a supportassist hardware check.

1
Ndwolfy780•

Im also still using windows if that affects anything. Im not very knowlegable when it comes to the software side of computers. Im mainly a hardware guy so im trying my best to understand everything. So far im understanding everything youve mentioned, but some of the stuff in the comments have got me confused haha...

1
Shadowed87•

u/Snoozhead Thank you very much for this!! This is HUGE!

Question regarding macos: Do you notice a behaviour like the one I described here

https://www.reddit.com/r/hackintosh/comments/gf6j7q/increased_battery_drain_after_wake_from_sleep_xps/

I did some cpufriend configurations, as well as undervolt and power limit with voltageshift and can get 6+ hours if I do not sleep->wake!

Do you notice something similar?

BTW, what efi configuration are you using? I just read you have the same spec as I do (i9, etc..), would you mind sharing your efi? Thank you in advance!

1
Deloox•

Trying to turn it off on my optiplex 7740 - where do i find a file to import to check this?

1
OmegaMalkiorWishing for an XPS 15 9500 2 in 1•

Do you think this would work on HP laptops like the Spectre 15 2020?

1
TeflonDonInc•

@Snoozhead - Great post... When you get your Guide posted add me to the list.... I've cloned so many repos for the 7590 I've lost count.... I have Clover working almost perfect with a fork of Daliansky... I updated the kexts and made some other minor changes for the DW1820A....

Working on Open Core for the XPS 7590 OLED.....

Check out this OpenCore for XPS 7590..

https://github.com/shadowed87/Hackintosh-XPS-7590

Another Open Core 0.5.6 - https://github.com/geek5nan/Hackintosh-XPS7590

My Clover fork of daliansky- https://github.com/CryptoNeverSleeps/XPS15-7590-Hackintosh

When I modified my Samsung Ativ Book 8 years ago for Hackintosh, I had made a custom bios disabling integrated graphics... I didn't have to pass it anymore in clover... If this bios is based on the same... We can possibly have custom bios as well.. I'll have to look into that this weekend.. been about 5 years since I modified bios files.....

Just ordered 64GB of ram for the XPS 7590 - I have the i7-9750H OLED Model using 970 Evo Pro for Windows, I use the 512GB NVMe drive it came with macOS (NVMe Enclosure)

Upgrade to 2TB 980 Samsung NVMe if and when released / available... Then I'll split the partitions most likely 3-Way... Windows 10, Kali / Ubuntu and macOS.... Virtual Machines etc....

1
Paris-Green•

I'm not terrifically familiar with python, but would this work on a G3 3579? Scratch that, I actually managed to work it out. If you're trying to pull this trick off on a Dell G3 3579 with an Intel i5 8300h the codes you're looking for are 0x5BC for the clock and 0x658 for the CFG, respectively

1
bigsmellypoopy•

Will these values be the same for a G7 7590?

1
cheher•

I have tried it for the XPS 17 9700 with no success. understandably I have used the identifiers for the XPS 17 9700

1
VanGoghComplex•

I'm getting stuck on unpacking the PE32 file from the BIOS. UEFITool finds the "CFG Lock" string in one file, but when I export it (either as-is or just the body), it's a text file full of gibberish. Can anyone help me figure this out? I'm trying to find the right addresses to do this to my G7 7700.

1
cheher•

use this tool https://github.com/LongSoft/Universal-IFR-Extractor and point it to the file you exported

1
VanGoghComplex•

Worked perfectly, thanks!

1
gobblerjook•

Resetting the BIOS to factory settings worked great on my 7590 with the 1.7.0 BIOS. Thank you! I also made sure to disable the "UEFI Firmware Update Via Capsules" option in the BIOS security tab as mentioned in this article: https://www.ultrabookreview.com/37095-dells-disabling-undervolting-on-their-laptops-heres-how-to-re-enable-it/ Apparently that should stop Windows update from messing with this in the future.

1