Closed tylernguyen closed 4 years ago
First remarks: a) I did the wwan patches, because the wwan-code is in the bios. It doesn't hurt and makes the patch more complete. If someone wants to add a wwan-card later on, it's already done. b) don't change the "Bios guard"-setting! If you disable it, your system wont be able to boot and will need an external reflash. c) "Must have"-Settings at least: a) DVMT -> 128mb b) MSR Lock off. Rest will be suspect to much poking and failure ;)
b) "Must have"-Settings at least: a) DVMT -> 128mb b) MSR Lock off. Rest will be suspect to much poking and failure ;)
@tylernguyen For DVMT you're right. MSR Lock means CFG Lock. Sorry, was in a hurry.
Can't wait until next commit! It's a exciting news to know in the tough year. Thank you all! I'll order my external programmer right now.
Additionally interesting: Thermal Management. There are plenty of options besides DPTF (Dynamic Platform and Thermal Framework) which osx doesn't support afaik.
@tylernguyen For DVMT you're right. MSR Lock means CFG Lock. Sorry, was in a hurry.
I can't seem to find options having to do with CFG-Lock either, were you able to find it?
Intel Advance Menu -> Power & Performance -> CPU - Power Management Control -> CPU Lock Configuration -> CFG Lock
(scroll down, up, down on
CPU - Power Management Control
page because scroll is buggy in some menus)
Thanks @rjocoleman, found it. For everyone else, it's the last item on the page CPU - Power Management Control
, there does seem to be a bug, just need to scroll up/down until you see it.
There is another, quite annoying, problem, where settings are not saved. For example I would like to disable "switchable graphics" and force the use of the iGPU. I can set the settings accordingly, but they don't seem to be saved and I think they are only working in specific combinations... *gnarrrrrrrr
Really exciting developments, but this is outside my depth of knowledge to tinker with. I will unfortunately have to wait for you guys to do the hard work. In particular excited for better power management, as this has been the only downside of using macOS so far. The power consumption is just too high on battery for any extended use. Thanks a lot for the hard work guys.
Thought I'd chip in with my own experience on this.
Successfully refreshed BIOS after requiring experimentation on correct pin placement on the USB programmer. I've attached a pic in case anyone else wants to try. Also forgot to use a hex editor for the final change on the patched ROM the first time.
Previously using the kernel patch for 4k to drive two 4k monitors via Thunderbolt/USB-C ports. Setting DVMT-prealloc to 64mb now allows the kernel patch to be removed and can successfully boot into Recovery partition while retaining the 4k displays.
Now starting down the path of power management tweaks.
Couple of general issues remain. With the lid closed and external monitors connected, if you disconnect the external monitors in a 'grab a go' fashion, when opening the lid the internal display does not reactivate, requiring a hard shutdown and reboot.
I am also unable to wake the laptop via Bluetooth. My usual setup is as above with the lid closed, but after sleep, I cannot wake the laptop with the mouse or keyboard. There is a setting under PCH-IO "Wake on WLAN/BT", however this did not do anything.
@Chivs Welcome to the club! ;)
From my understanding "Wake on WLAN/BT" in Bios is only working for native Intel Wifi/BT-Cards.
For us it's a question of wake via USB. The basic problem is described here: https://osy.gitbook.io/hac-mini-guide/details/usb-fix. If it's important to you, I think you should have a look at the _PRW-Method of your XHCI-Device and acpi-wake-type-DeviceProp for the PCIe-Device of the USB-Controller.
With the GPRW-patches from this repo, I think you don't have a chance to get this working.
Btw, @tylernguyen: I don't have any patches for _PRW/_PTS/_WAK and I'm not aware of any problems. LED-Flashing-after-wake can be fixed without renames via _TTS (Transition To State).
Ah, thanks @benbender I'll reset that BIOS setting and look at the link you provided. As I'm using an Apple CS2 BT card which is recognized in BIOS, this should obviously work.
Any thoughts on the display issue I mention in the edited post above?
@Chivs Maybe. But let's not delude this issue. Pls open another issue regarding the display-wake.
Btw, @tylernguyen: I don't have any patches for _PRW/_PTS/_WAK and I'm not aware of any problems. LED-Flashing-after-wake can be fixed without renames via _TTS (Transition To State).
Can you maybe share the differences in your own ACPI configuration that differ from this repo?
Btw, @tylernguyen: I don't have any patches for _PRW/_PTS/_WAK and I'm not aware of any problems. LED-Flashing-after-wake can be fixed without renames via _TTS (Transition To State).
According to your config and SSDT's, your PTS/WAK functions call ZPTS and ZWAK, yet these aren't defined or renamed in your config. Your GPRW is also the same as this repo's.
Confirmed working on latest BIOS-v1.49 I'll test if some of the options which you could not be saved could work on this neweset verion or not.
Just a random suggestion for unable to save items. Try clearing NVRam on BIOS level. On original flashing utility it was /c.
It clears all the nvram including the settings that are unavailable otherwise. Make sure (through Linux) that you have space in the nvram and it’s not filled with dumps of various sorts.
On Jul 22, 2020, at 8:27 AM, zacharysalvatore notifications@github.com wrote:
Confirmed working on latest BIOS-v1.49 I'll test if some of the options which you could not be saved could work on this neweset verion or not.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Btw, @tylernguyen: I don't have any patches for _PRW/_PTS/_WAK and I'm not aware of any problems. LED-Flashing-after-wake can be fixed without renames via _TTS (Transition To State).
According to your config and SSDT's, your PTS/WAK functions call ZPTS and ZWAK, yet these aren't defined or renamed in your config. Your GPRW is also the same as this repo's.
_ZWAK on "\" (aka global), yes. It's needed for a working battery because this method accesses a 16bit-value which needs to be patched for OSx. Except for this one operation, there is no change in the method on global namespace and no change on Device-level.
Just a random suggestion for unable to save items. Try clearing NVRam on BIOS level. On original flashing utility it was /c. It clears all the nvram including the settings that are unavailable otherwise. Make sure (through Linux) that you have space in the nvram and it’s not filled with dumps of various sorts.
Could you provide a link to the tool you are referring to? Could solve the "baseline-problem".
@benbender
It is a part of lenovo toolkit for bios updates. So download the 1.49 bios, extract it and under C:\Drivers\Flash you will find winflash.
SCT Flash Utility for Lenovo
for Windows V1.0.4.9
Copyright (c) 2011-2019 Phoenix Technologies Ltd.
Copyright (c) 2011-2019 Lenovo Group Limited.
Usage: Flash [COMMAND]
bak [filename] Backup BIOS ROM before flash.
bbl Flash boot block.
bcp [EVSA binary] Overwrite BCP data.
bcplogo [BCP name] [file name] [Image ID] Replace logo image stored in BCP.
cac Check AC power is on.
capload Upload capsule without check.
cbp threshold Check battery power in percentage.
cvar Clear variables.
dat string Specify the asset tag DMI string.
dfs string Specify the system family DMI string.
dks string Specify the SKU number DMI string.
dmc string Specify the chassis manufacturer DMI string.
dmm string Specify the motherboard manufacturer DMI string.
dms string Specify the system manufacturer DMI string.
dos [string;string2;...]|[index1 string1 ...] Specify the OEM DMI strings.
dpc string Specify the chassis asset tag number DMI string.
dpm string Specify the motherboard product ID DMI string.
dps string Specify the system product ID DMI string.
dsc string Specify the chassis serial number DMI string.
dsm string Specify the motherboard serial number DMI string.
dss string Specify the system serial number DMI string.
dus [uuid] [overwrite] Specify the UUID DMI string.
dvc string Specify the chassis version DMI string.
dvm string Specify the motherboard version DMI string.
dvs string Specify the system version DMI string.
endkey Required key press after flashing.
errorkey Required key press after flashing error.
ese Enable security examiner.
exit Exit program after flash completed.
file filename Indicate BIOS image file for flash.
help Show command list.
ipf [region name]|all Flash specific region
ioset port value Sets a specific I/O reset port value.
logo filename [ImageId] [filename] [ImageId] ... Replace logo.
ls [ImageId] ... Reserve logo in BIOS ROM.
mod filename Replace a FFS module.
nodelay No delay after flash.
nodrom No decomposing ROM when crisis recovery.
nodromzerr Ignore ROM decompression error.
noerror Do not display error messages.
nowarn Do not display warning messages.
oc string Specify the OEM command line.
p Production mode. Disable simple text output.
prog start size Flash specific area. Both parameters in hexadecimal.
patch Patch mode. To patch particular data to current BIOS.
raw GUID filename [Index] Replace raw section of FFS module.
rsbr GUID1 GUID2 ... Reserve regions/sub-regions with specified GUIDs.
sd Skip BIOS build date time checking.
sfc Skip flash options in BIOS FlashCommand.
silent Silent operation (no beeps).
slp filename Replace SLP marker or MSDM key.
spu filename 20|21 Replace SLP public key.
ss Skip all SLP sub-regions.
sn Skip part number checking.
shutdown Shutdown after flash completed instead of reboot.
v Enable flash verification.
vbl Enable Microsoft Bit-locker check.
vcpu [filename] Update variable size CPU microcode.
wb Flash without skipping same content blocks.
write filename start [fdla] Write a binary file to specific physical address or FDLA.
wsbr GUID filename Write a binary file to specific sub-region.
You will need patch mode and clear nvram: patch /cvar
update: just checked, it is there in 1.49.
@tylernguyen @benbender I'm not familiar with that lot of settings in BIOS. I'm under the newest version v1.49. I could test the unable to save items under this verion. Could you please tell me which i should test. I don't want to mess up with options while i dont know 'her'.
@zacharysalvatore
I will, after I reset the thing. I bricked it once and had to reflash but it seems that some previous set settings are still "remembered". Off the top of my head, I do think that the S0 settings cannot be saved on my BIOS.
@tylernguyen @zacharysalvatore It's really strange, because I can switch S0 enabled/disabled without any problem. Additionally the settings, which aren't saved/resetted, are not consisted. ATM I'm able to setup the I2C-devices however I want - for ~2 days I couldn't change anything on SerialIO-tab. Don't have a clou on this atm...
You need to check if MSR is really unlocked with VerifyMSR-efi tool. Much of my tests were pointless, because it wasn't completely unlocked, even if I had set the option in the bios. It might be good to check, if a minimal patch on the BIOS (without igfx, wwan - just the advanced menu) leads to more a more stable bios. ATM it's really annoying if you need to check everything manually...
Btw, does anyone have a cool BIOS logo? I'm growing tired of the damn Supreme Lenovo thing.
@notthebee is having a livestream in 3 days on removing Intel ME from our machine if anyone's interested. I'll probably be there to hangout also.
@tylernguyen see https://github.com/corna/me_cleaner - but you will loose many features without Intel ME. It would be nice to have a real OSS-replacement, but one should be very aware of the consequences if you want to try it.
@benbender I actually have no intentions of removing Intel ME myself. I have enough things to tinker with as it is. I just wanted to post it for those that may be interested and since I like the channel anyway!
Hey guys :) I've got a question. I have the x1c5 and also want to mod my BIOS. xx_80_patches.txt
mentions Lenovo Thinkpad xx70/xx80
above the patches. If I'm not mistaken this means, that my 7th gen Kaby Lake machine is also supported and I should also be able to use these patches, right?
@B0hrer
It should be okay. Though please backup twice and compare them to make sure that you've done it correctly. If anything goes wrong, you can always reflash this backup and return to vanilla.
@tylernguyen Yeah of course. If I try it I would be super careful (backing up twice, diffing the backups etc.) I just wanted to get a quick second opinion before I order a programmer.
Added BIOS mod instructions and recommended settings in a598de6 See docs/1_README-HARDWAREandBIOS.md Contact me and open an issue should you a fine a custom BIOS option that improves something.
In case someone is interested, macOS Catalina works on my X1C6 with neutered Intel ME (me_cleaner -s
). I was pretty surprised to see it boot, since many people say that macOS needs Intel ME for graphics and QE/CI won't work without it.
@notthebee Booting shouldn't be the issue if you don't have "intel bootguard" (if so, I'm not sure), but things like hw-videodecoding and powermanagement depending on ME/Heci afaik. Those are a problem on hackintoshs anyway because apple is using it's own GUC-FW for intel GPUs. So it might or might not be a problem at the end. Would be nice if you would do more testing in that direction.
@notthebee Can you please try loading Apple GUC with a nerfed ME? I'm wondering if it nerfed the checksum verification for GUC firmware.
@notthebee Can you please try loading Apple GUC with a nerfed ME? I'm wondering if it nerfed the checksum verification for GUC firmware.
I did some more testing and unfortunately neutered ME causes some weird bugs that I couldn't reproduce after I reflashed the original ME firmware.
Didn't need to mod BIOS to access these settings. Seems this procedure works on my Yoga 720. Could also work on X1C6
This is amazing. Do you guys think you can help me out with my BIOS? I'd love to mod mine out if I may receive instructions on how to do it or possibly how to use the Phoenix SCT Winflash tool in command prompt? I need to fix my BIOS as I cannot enter the BIOS at all, I'm locked out so to speak, there is no bios password it just won't let me enter the BIOS. I'd love to first fix my BIOS then enter the unlock procedure and enter advanced bios menu and possibly change the tdp. https://www.mediafire.com/file/6sepgl2qxkciov8/Lenovo_Ideapad_110-15ACL_BIOS.zip/file Thanks
Anyone know if it will work on Thinkpad E580 with this bios version? It seems that Intel Boot Guard is enabled so i dont know if anyone checked if anybody tested with Intel Boot Guard Enabled on another thinkpad model...
Thank you @benbender for bringing this to my attention.
Instructions to unlock advance settings on your BIOS: http://paranoid.anal-slavery.com/biosmods/skylake.html
Use
xx_80_patches.txt
Confirmed workingBIOS-v1.45
I commented out WWAN patches since I do not need it.
On the x1c6, the BIOS chip is located just on top of the CPU, under the sticker shield:
@notthebee also has a useful video to follow: https://www.youtube.com/watch?v=ce7kqUEccUM
The BIOS does not need to be signed by
thinkpad-eufi-sign
. Just remember to replace 4C 4E 56 42 42 53 45 43 FB with 4C 4E 56 42 42 53 45 43 FF on the patched BIOS.Proof:
On the next repo commit, I will include BIOS modding instructions in the repo. For now, this issue will serve as a place to discuss optimal advance settings for hackintosh on the x1c6.