Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change hidden CFG Lock setting #16

Closed
andot opened this issue Dec 14, 2019 · 8 comments
Closed

Change hidden CFG Lock setting #16

andot opened this issue Dec 14, 2019 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@andot
Copy link
Collaborator

andot commented Dec 14, 2019

https://www.tonymacx86.com/threads/successfully-patched-z170x-ud5-th-cfg-lock-msr-ex02.253466/page-2#post-1847437

GPD P2 Max:

0x285A1 	Form: View/Configure CPU Lock Options, FormId: 0x2738 {01 86 38 27 CC 01}
0x285A7 		One Of: CFG Lock, VarStoreInfo (VarOffset/VarName): 0x587, VarStore: 0x1, QuestionId: 0x154, Size: 1, Min: 0x0, Max 0x1, Step: 0x0 {05 91 9A 03 9B 03 54 01 01 00 87 05 10 10 00 01 00}
0x285B8 			One Of Option: Disabled, Value (8 bit): 0x0 {09 07 04 00 00 00 00}
0x285BF 			One Of Option: Enabled, Value (8 bit): 0x1 (default) {09 07 03 00 30 00 01}
0x285C6 		End One Of {29 02}
0x285C8 		One Of: Overclocking Lock, VarStoreInfo (VarOffset/VarName): 0x636, VarStore: 0x1, QuestionId: 0x155, Size: 1, Min: 0x0, Max 0x1, Step: 0x0 {05 91 96 03 97 03 55 01 01 00 36 06 10 10 00 01 00}
0x285D9 			One Of Option: Disabled, Value (8 bit): 0x0 (default) {09 07 04 00 30 00 00}
0x285E0 			One Of Option: Enabled, Value (8 bit): 0x1 {09 07 03 00 00 00 01}
0x285E7 		End One Of {29 02}
0x285E9 	End Form {29 02}
setup_var_3 0x587 0x00
@Azkali Azkali self-assigned this Dec 15, 2019
@Azkali Azkali added the enhancement New feature or request label Dec 15, 2019
@Azkali Azkali pinned this issue Dec 15, 2019
@Azkali
Copy link
Owner

Azkali commented Dec 16, 2019

@andot Setting setup_var_3 0x587 0x00 does not update it in current bios, how did you manage to save it onto your bios ?

@andot
Copy link
Collaborator Author

andot commented Dec 16, 2019

  1. Create a GUID partition map usbdisk.

image

  1. Download and put Grub Shell on usb
  • Download Grub Shell from grub-mod-setup_var
  • Extract it into ~/Downloads folder
  • Rename it from modGRUBShell.efi to bootx64.efi
  • Copy bootx64.efi into USB disk
cd /Volumes/EFIBOOT
ls
mkdir -p /Volumes/EFIBOOT/EFI/BOOT
cp -iR ~/Downloads/bootx64.efi /Volumes/EFIBOOT/EFI/BOOT/bootx64.efi

image

  1. boot with this usbdisk into grub.

  2. run setup_var_3 0x587 0x00

  3. run reboot to reboot your computer.

and then you will find CFG Lock is disabled.

MSR_PMG_CST_CONFIG_CONTROL........(0xE2) : 0x7E000008
------------------------------------------
 - I/O MWAIT Redirection Enable......... : 0 (not enabled)
 - CFG Lock............................. : 0 (MSR not locked)
 - C3 State Auto Demotion............... : 1 (enabled)
 - C1 State Auto Demotion............... : 1 (enabled)
 - C3 State Undemotion.................. : 1 (enabled)
 - C1 State Undemotion.................. : 1 (enabled)
 - Package C-State Auto Demotion........ : 1 (enabled)
 - Package C-State Undemotion........... : 1 (enabled)

After that. you can change the config.plist:

		<key>AppleIntelCPUPM</key>
		<true/>
		<key>AppleRTC</key>
		<true/>
		<key>KernelCpu</key>
		<false/>
		<key>KernelLapic</key>
		<false/>
		<key>KernelPm</key>
		<true/>

to be

		<key>AppleIntelCPUPM</key>
		<false/>
		<key>AppleRTC</key>
		<true/>
		<key>KernelCpu</key>
		<false/>
		<key>KernelLapic</key>
		<false/>
		<key>KernelPm</key>
		<false/>

to enable native power management.

@andot
Copy link
Collaborator Author

andot commented Dec 16, 2019

It can work on 0.24, 0.25 and 0.27 bios.

0.27 bios.txt
0.24 bios.txt

@Azkali
Copy link
Owner

Azkali commented Dec 16, 2019

Did exactly that but that doesn't seem to update anything, is it supposed to show new entries under BIOS ?
Edit: Never-mind I finally got it setup thanks, will add a section in the README with a big warning could you also update the chinese README ?

@Azkali
Copy link
Owner

Azkali commented Dec 16, 2019

Closing, will add a section inside README

@Azkali Azkali closed this as completed Dec 16, 2019
@andot
Copy link
Collaborator Author

andot commented Dec 16, 2019

This is a hidden setting, we can't see it under BIOS.

@Azkali
Copy link
Owner

Azkali commented Jan 21, 2020

I manage to tweak DVMT allocation with my BIOS unlocked thanks to your guide and a user from the GPD Discord.

But I'm now missing the battery status did you encountered this issue ?
If so and you happen to have a solution, could you make a pull request to fix that, it would be greatly appreciated !

Do you have discord so we can discuss about this repository ?

@andot
Copy link
Collaborator Author

andot commented Jan 21, 2020

There is no problem of battery status of my GPD p2 Max.
My GPD p2 Max is Batch 2 | BIOS 0.25 MacOS 10.15.2
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants