T480-OpenCore-Hackintosh icon indicating copy to clipboard operation
T480-OpenCore-Hackintosh copied to clipboard

BIOS mod thread

Open zombillano opened this issue 5 years ago • 41 comments

Ok, so I've already modded my BIOS. So far I think it is working as intended. Some observations:

  • You can undervolt directly on the BIOS, which indeed seems to work. Does anybody know a way to check undervolt values on any OS using terminal commands? Just to confirm it is being applied. So far temps seems to indicate that it is working.

  • You can unlock TDP limits. I've been testing up to 44W and we can achieve a performance equal to the Ryzen 5 4650U (https://browser.geekbench.com/v5/cpu/3467665). This is under macOS, I believe the best performance can be achieved under linux because it has way less overhead compared with other OSs. NOTE: I have dual heatpipe fan and no dGPU, obviously I also repasted my thinkpad. DON'T TRY THIS WITH SINGLE HEATPIPE FAN, YOUR COMPUTER MAY OVERHEAT.

  • CPU Lock can be disabled, so I disabled the KernelQuirks related to that option. After this I'm unable to boot to Windows 10 through OC. I have to see if it is related to my install or with those options I've disabled. This doesn't seems to have any impact on CPU power consumption.

If you have any question/suggestion/test please let me know.

zombillano avatar Aug 28 '20 23:08 zombillano

@zombillano I've tried:

  1. Undervolt can be checked with voltageshift. It can undervolt the cpu and gpu. But i didn't manage to undervolt the cpucache. I used voltageshift in macos when it boots.
  2. Thanks for the TDP check. I also upgraded to double heat pipe and repasted. However i'm still facing power drain during sleep which is frustrating me. 1% per hour.
  3. Yes if I disable cpulock, i cannot boot to windows too.

swatchie-1 avatar Aug 29 '20 15:08 swatchie-1

1. Undervolt can be checked with voltageshift. It can undervolt the cpu and gpu. But i didn't manage to undervolt the cpucache. I used voltageshift in macos when it boots.

It is possible to undervolt CPU cache too, check your config. I've disabled voltageswift and the undervolting remains through all OSs.

2. Thanks for the TDP check. I also upgraded to double heat pipe and repasted. However i'm still facing power drain during sleep which is frustrating me. 1% per hour.

Might be so many things, hard to track. I remember I was able to drain only 1% every 10-12 hours, will test today at night. Please try with the releases before 4.0, I think when I tested it I was using 3.XX. Then you might be able to track which change to the config started the problem. It shouldn't be related to TDP unlock, 'cause it only affects performance at max CPU usage.

3. Yes if I disable cpulock, i cannot boot to windows too.

To me it was caused by disabling DPTF, disabling CPU Lock doesn't make windows to stop booting.

BTW, Sorry for the late reply

zombillano avatar Sep 01 '20 17:09 zombillano

So my SPI programmer finally arrived. I will flash UEFI within a few days, replace PM 981 NVMe with 970 Evo ( Considerably cheaper than SN750 and little more expensive than A2000, I have good experience with this drive on normal Macs despite what Anti-Hackintosh guide says) and repaste CPU with Thermal Grizzly Kryonaut. Will report my progress in this thread.

EETagent avatar Sep 11 '20 19:09 EETagent

So my SPI programmer finally arrived. I will flash UEFI within a few days, replace PM 981 NVMe with 970 Evo ( Considerably cheaper than SN750 and little more expensive than A2000, I have good experience with this drive on normal Macs despite what Anti-Hackintosh guide says) and repaste CPU with Thermal Grizzly Kryonaut. Will report my progress in this thread.

SN750 is cheaper at my country, but both should work just fine. I didn't saw a big difference using Grizzly Kryonaut, not even during heavy load. Please post your results. A little warning: just because it works on a regular mac doesn't mean it would work on a Hackintosh. The SM961 SSD that I was using had multiple reports that it worked on different MBPs, but as you know I never managed to make it work.

I recommend you to dump your thunderbolt controller EEPROM, may be useful if your T480 starts to have issues with the USB C ports.

zombillano avatar Sep 11 '20 22:09 zombillano

No need to worry about TB3, I updated to fixed firmware version as soon as it was released

EETagent avatar Sep 12 '20 07:09 EETagent

No need to worry about TB3, I updated to fixed firmware version as soon as it was released

There have been reports of people having troubles even when they updated to the fixed firmware. Doesn't hurt to have a dump of it, and if anything fails and you are out of warranty you can easily get a replacement Eeprom at aliexpress and replace the faulty one.

zombillano avatar Sep 12 '20 14:09 zombillano

@zombillano Also is there some option to overclock RAM controller in Advanced menu? Kabylake-R supports officially only 2400Mhz but there are factory overclocked KBL-R laptops with 2666Mhz RAM support. As I can use two SO-DIMM 4GB DDR4 2666Mhz ( Unknown timing, probably CL19 ) RAM sticks extracted from upgraded Mac Mini. I have currently one free slot, it might be possible to mix one of them with the factory RAM to have 12GB total ( single channel mod ). But because of potential reliability issues with such combination, I will probably replace the included RAM completely to have same capacity albeit in dual channel. So it will be great if there would be some way to run them at their destined clock speed.

EETagent avatar Sep 12 '20 20:09 EETagent

There is an option to overclock RAM, but AFAIK it doesn't work. I have 16GB with 2 x 8GB RAM sticks. You won't have problems mixing sticks and dual channel isn't as important as it is when using AMD processors, you won't notice any real life improvement. Also the difference between 2400Mhz and 2666Mhz isn't noticeable.

zombillano avatar Sep 13 '20 01:09 zombillano

Finally joined UEFI modding gang.

What I have done so far:

  • Laptop wide undervolt
  • Repasting CPU with Kryonaut
  • Resizing DVMT and disabling CFG lock
  • Upgrading SSD to 512GB 970 Evo
  • Adding 4GB DDDR4 2666Mhz stick ( 12GB total )
  • Changed Display from 18 bit to 24 bit ( Shouldn’t be 24 bit by default ? )

Ready to install Big Sur and dive in Cocoa

EETagent avatar Sep 17 '20 21:09 EETagent

Finally joined UEFI modding gang.

Congrats! 😄

What I have done so far:

* Laptop wide undervolt
* Repasting CPU with Kryonaut

First time I applied Kryonaut I didn't notice any improvement. Then I decided to reapply since I read somewhere around the web that you may apply the thinnest layer that you can in order to achieve the best results. Since then my temps improved a lot, and I mean A LOT. I can stay at ~34ºC while doing some normal stuff (surfing the web, coding, listen to music). The fan is off most of the time.

* Adding 4GB DDDR4 2666Mhz stick ( 12GB total )

Did you overclock the RAM?

* Changed Display from 18 bit to 24 bit ( Shouldn’t be 24 bit by default ? )

I think it depends on your LCD panel. Where did you set it up?

zombillano avatar Sep 18 '20 02:09 zombillano

First time I applied Kryonaut I didn't notice any improvement. Then I decided to reapply since I read somewhere around the web that you may apply the thinnest layer that you can in orden to achieve the best results. Since then my temps improved a lot, and I mean A LOT. I can stay at ~34ºC while doing some normal stuff (surfing the web, coding, listen to music). The fan is off most of the time.

Wow, 34ºC during light load is good, I have about 31ºC during 800 MHz idle ( Still did not downloaded Big Sur, tested on Fedora with s-tui ) with charger disconnected. Low load temperature has yet to be seen.

Did you overclock the RAM?

Nope, 2 different RAM sticks, not a good idea. Will just let UEFI do it's magic stuff.

I think it depends on your LCD panel. Where did you set it up?

In the Advanced Menu, where you undervolt GPU, there should be LCD control too. I will get exact location later.

EETagent avatar Sep 18 '20 05:09 EETagent

Wow, 34 degrees. What's your ambient temperature? I can only get mine to 46. Ambient is 27 degrees celc.

swatchie-1 avatar Sep 18 '20 06:09 swatchie-1

Wow, 34ºC during light load is good, I have about 31ºC during 800 MHz idle ( Still did not downloaded Big Sur, tested on Fedora with s-tui ) with charger disconnected. Low load temperature has yet to be seen.

I've got 28ºC on idle: Screen Shot 2020-09-18 at 10 34 13

BTW it turns out that it is possible to set the lowest frequency to 800Mhz using this fork of CPUFriendFriend: https://github.com/fewtarius/CPUFriendFriend

Wow, 34 degrees. What's your ambient temperature? I can only get mine to 46. Ambient is 27 degrees celc.

24ºC. It is quite interesting since it doesn't even turn the fan on, so I'm getting that temperatures only using passive cooling. Now it is at the level of what I can get using Linux/Windows.

I think it's a sum of all factors: Undervolting (I can do -125mV) + Dual Heatpipe Fan (which improves passive colling) + Kryonaut with a thin layer which in fact seems to be doing its job quite well.

zombillano avatar Sep 18 '20 15:09 zombillano

BTW it turns out that it is possible to set the lowest frequency to 800Mhz using this fork of CPUFriendFriend: https://github.com/fewtarius/CPUFriendFriend

Fewtarius's fork is used since 1af92e1805b3aa62b9c9cdda3af61dc02997be5e. I've had lowest frequency at 0.9 GHz, but unlike in other operating systems where average frequency is 800 MHz on all cores, it's not possible on macOS yet.

EETagent avatar Sep 18 '20 15:09 EETagent

I've had lowest frequency at 0.9 GHz, but unlike in other operating systems where average frequency is 800 MHz on all cores, it's not possible on macOS yet.

Yeah, that's right. I don't know what's needed in order to achieve that. Does macbook pro is able to get that low?

zombillano avatar Sep 19 '20 02:09 zombillano

Yeah, that's right. I don't know what's needed in order to achieve that. Does macbook pro is able to get that low?

Don't have one, but will test it on MBA.

Off-topic: Do you know if there is some way to enable deleting files in Finder with Delete key just like In GNOME's Nautilus?

EETagent avatar Sep 19 '20 11:09 EETagent

@zombillano did you undervolt using bios intel advanced menus and if so, what are the parameters you adjusted (processor -125mv, gt -80mv -80mv, uncork -80)? Or did you just use voltageshift?

swatchie-1 avatar Sep 19 '20 11:09 swatchie-1

Off-topic: Do you know if there is some way to enable deleting files in Finder with Delete key just like In GNOME's Nautilus?

It should be possible to achieve with karabiner elements. Another way may be using ACPI, though I'm unsure if it's possible to assign two keys to one (command + backspace to delete).

@zombillano did you undervolt using bios intel advanced menus and if so, what are the parameters you adjusted (processor -125mv, gt -80mv -80mv, uncork -80)? Or did you just use voltageshift?

I'm undervolting using the built in menus on the BIOS. Everything is set up to -125mV (CPU, GT, UNCORE). I might be able to set a higher undervolt but not without instabilities.

zombillano avatar Sep 19 '20 13:09 zombillano

@zombillano It's possible that macOS can somehow mess up power management of whole machine? With UEFI reseted to default ( With changes described above ), I get stable CPU IDLE frequency at 800Mhz in Linux ( Booted without OpenCore, Measured using s-tui ). That is fine until I boot macOS, then frequency is at 900Mhz and changes rapidly until I reset UEFI again. With CFG lock disabled, macOS maybe writtes some bad stuff into the MSR 0xE2 register?

Edit: It does not revert back to 800Mhz even after I reset UEFI to defaults.

EETagent avatar Sep 22 '20 07:09 EETagent

@zombillano If you reset UEFI to defaults, does it disable VT-d ( In Advanced menu - System agent ) and Secure Boot for you too? What is your Firmware Configuration in Advanced menu? Test?

Also what is your Geekbench 5 ST score compared to other platforms? I know that Geekbench is shitty way to measure performance but this is problem which I have from the beginning of this EFI. My ST score on Linux/Windows is over 900 yet on macOS it is 745 :( I have CPUFriendDataProvider configured with values for MBP.

EETagent avatar Sep 22 '20 09:09 EETagent

@zombillano If you reset UEFI to defaults, does it disable VT-d ( In Advanced menu - System agent ) and Secure Boot for you too? What is your Firmware Configuration in Advanced menu? Test?

It won't reset certain settings when using reset to default option, it is a known bug. I don't have Secure Boot set up 'cause I don't really need it right now. Firmware Configuration is set up as test.

Also what is your Geekbench 5 ST score compared to other platforms? I know that Geekbench is shitty way to measure performance but this is problem which I have from the beginning of this EFI. My ST score on Linux/Windows is over 900 yet on macOS it is 745 :( I have CPUFriendDataProvider configured with values for MBP.

This is mine, but take in mind I've unlocked my TDP up to 44W: https://browser.geekbench.com/v5/cpu/3467665 If you want I can reset my TDP settings to default values later today and make the test again.

zombillano avatar Sep 23 '20 18:09 zombillano

Ok, so I've got back to default TDP values and made the same test across several OSs:

  • MacOS: https://browser.geekbench.com/v5/cpu/3892026
  • Pop_OS! (Linux): https://browser.geekbench.com/v5/cpu/3892322
  • Windows 10: https://browser.geekbench.com/v5/cpu/3892730

As you can see, macOS gets the lowest numbers, but I'm still getting higger numbers than you @EETagent . Can you please share your TDP config? Mine got back to 10W/25W/29W, but I'm unsure about TurboBoost timer.

zombillano avatar Sep 24 '20 14:09 zombillano

Ok, so I've got back to default TDP values and made the same test across several OSs:

  • MacOS: https://browser.geekbench.com/v5/cpu/3892026

  • Pop_OS! (Linux): https://browser.geekbench.com/v5/cpu/3892322

  • Windows 10: https://browser.geekbench.com/v5/cpu/3892730

As you can see, macOS gets the lowest numbers, but I'm still getting higger numbers than you @EETagent . Can you please share your TDP config? Mine got back to 10W/25W/29W, but I'm unsure about TurboBoost timer.

Thanks for testing, your results are really amazing. Especially the Linux one.

I’ve got same UEFI configuration, but don’t know how could be macOS score so much lower. Even though that MT score is perfectly fine for i5-8250U ( cca 3240 ). I did even more testing with Blender 2.90 using BMW file and macOS managed to render it at 9 mins, thats not that much difererent than 8:43 that I had on Linux with throttled installeď. On Windows, I once managed to get score over 1700, that’s considerably higher than normal 1500. With 44W TDP configured through Intel XTU.

EETagent avatar Sep 24 '20 14:09 EETagent

Thanks for testing, your results are really amazing. Especially the Linux one.

Yeah, they are really good. That's why I doubt about TurboBoost timer value, because I remember I increased the value before and I suspect that it didn't got back to its default value.

I’ve got same UEFI configuration, but don’t know how could be macOS score so much lower.

I don't really think it is a huge deal. I mean, most of the time I don't use all the power of the CPU, unless I'm compiling a project or having 2-3 VMs running, which may happen only twice a day.

Also, there are so many variables involved in how an OS manages the CPU that it might be very difficult to achieve the same performance.

Even though that MT score is perfectly fine for i5-8250U ( cca 3240 ). I did even more testing with Blender 2.90 using BMW file and macOS managed to render it at 9 mins, thats not that much difererent than 8:43 that I had on Linux with throttled installed.

That's what I'm saying, the difference isn't that big in real life scenarios. If you really want to get the most out of your CPU then just get up the TDP values to 44W (or even higher if you want, but I found 44W to be the best in terms of performace/thermals).

I will try to test across OSs with TDP set up to 44W, but I think I won't do it until the weekend.

zombillano avatar Sep 24 '20 15:09 zombillano

@zombillano Like I wrote above, my machine is still unable to reach 800Mhz on all cores as before. I reseted UEFI multiple times, reseted NVRAM, tested it on multiple Linux distros and macOS versions and there is no difference. Is there some other option then reflashing stock firmware?

Package power is reported same or at least very close to previous values so this is probably more of my fictional problem I think. Still there is something wrong and I wonder if macOS or OpenCore can somewhat corrupt our machines.

EETagent avatar Sep 29 '20 20:09 EETagent

@zombillano Like I wrote above, my machine is still unable to reach 800Mhz on all cores as before. I reseted UEFI multiple times, reseted NVRAM, tested it on multiple Linux distros and macOS versions and there is no difference. Is there some other option then reflashing stock firmware?

I think you might be overreacting about it. I mean, I don't think it modifies anything other than the frequency vectors at OS level, not at UEFI level. It may be something else but nothing to worry about, give a look at my Intel Power Gadget window right now:

imagen

And I haven't change anything since my last report. Also, as you said, macOS never really gets that low, so at least for macOS is more like a fictional number. I haven't checked what's the behaviour on Windows or Linux, I can check later today if you want.

Package power is reported same or at least very close to previous values so this is probably more of my fictional problem I think. Still there is something wrong and I wonder if macOS or OpenCore can somewhat corrupt our machines.

AFAIK macOS and OC only modifies NVRAM. Maybe there is an stuck value on the NVRAM. I've read reports of people having problems when trying to erase NVRAM on thinkpads and they eventually had to reflash their BIOS EEPROM (or send their computer to lenovo service when they didn't have a backup of their BIOS EEPROM), so I think it is better to just reflash your stock BIOS backup.

zombillano avatar Sep 29 '20 22:09 zombillano

@zombillano @swatchie-1 So I disassembled ThinkPad again and now I am trying reflash stock firmware. Like last time, I am getting Programmer inicialization failed error. I managed to get it working before and hope that I will even this time.

I want to ask if one of you encountered this error and if yes what was the best fix. Thanks

EETagent avatar Sep 30 '20 17:09 EETagent

Flash completed, I am just clumsy ...

I also made backup of the TB3 EEPROM for possible future issues.

Edit: Booted Linux and ......... I am back at 800Mhz!

EETagent avatar Sep 30 '20 18:09 EETagent

Nice. Looks like both of us solved our issues by re-flashing to stock. Are you planning to flash another patched UEFI?

swatchie-1 avatar Sep 30 '20 22:09 swatchie-1

Nice. Looks like both of us solved our issues by re-flashing to stock. Are you planning to flash another patched UEFI?

Probably yes.

EETagent avatar Oct 01 '20 12:10 EETagent