tylernguyen / x1c6-hackintosh

READMEs, OpenCore configurations, patches, and notes for the Thinkpad X1 Carbon 6th Gen 2018 Hackintosh
https://tylernguyen.github.io/x1c6-hackintosh/
The Unlicense
625 stars 109 forks source link

CPU Power consumption #28

Closed velaar closed 4 years ago

velaar commented 4 years ago

@tylernguyen Can you please confirm the CPU power of about 2W on PKG when idle? If possible also post an Intel power gadget screenshot.

I've got a feeling that the CPU power vectors are not exactly correct. I have a way lower PKG on Linux/Windows (<1W) and trying to pinpoint the issue.

Thanks!

Screen Shot 2020-01-10 at 8 22 24 AM

tylernguyen commented 4 years ago

I just quickly checked, mine is also pulling 2W on idle. Though I'm not exactly sure how to approach this issue. @velaar I saw your pull request, did power consumption improve after installing NVMEFix?

velaar commented 4 years ago

@tylernguyen Yes, but not on the CPU package. The system can now go down from around 9W to around 7W and I have a very low power SSD.

For the CPU package consumption, so far every app I run reports the original 1.3GHz CPU frequency vector. One way would be to determine if that is the case. Also for i7-8650U the minimum frequency is 400MHz but I was unable to patch the vector to push it this low.

CPU Ratio Info:
------------------------------------------
Base Clock Frequency (BLCK)............. : 100 MHz
Maximum Efficiency Ratio/Frequency.......:  4 ( 400 MHz)
Maximum non-Turbo Ratio/Frequency........: 21 (2100 MHz)
Maximum Turbo Ratio/Frequency............: 42 (4200 MHz)

IGPU Info:
------------------------------------------
IGPU Current Frequency...................:    0 MHz
IGPU Minimum Frequency...................:  300 MHz
IGPU Maximum Non-Turbo Frequency.........:  300 MHz
IGPU Maximum Turbo Frequency.............: 1150 MHz
IGPU Maximum limit.......................: No Limit
Colton-Ko commented 4 years ago

Screen Shot 2020-01-11 at 09 25 11 2W on idle as well

velaar commented 4 years ago

@Colton-Ko @tylernguyen There is a chance that this is just a different type of measurement (comparing to Linux), but I was able to get <3W of total consumption on low brightness. (here: https://www.reddit.com/r/thinkpad/comments/8aqy5g/x1c6_on_linux_idle_29w_real_battery_life_on_light/). I guess 5W should be achievable in MacOS (that should give us about 10h of battery).

NVMeFix definitely helps. Now the question is if we can really push the CPU to C10 at 400MHz. Another question is why CpuFriendFriend (and other similar apps) all show that the vector is 1.3GHz:

Current Frequency Vector:

1 of 2: 0D (1300 MHz)

Enter the new min hex freq (800Mhz would be 08, 1300Mhz would be 0D):
Colton-Ko commented 4 years ago

@velaar I have only reached the minimum of 800MHz on i7-8550U in macOS. I used https://github.com/stevezhengshiqi/one-key-cpufriend to create a customized DataProvider for CPUFriend.kext

The below is the configuration screen when customizing CPUFriend using one-key-cpufriend image

I am now trying to lower the frequency to 400MHz using one-key-cpufriend.

Test configuration: Low Frequency Mode: 400MHz Mode: Prefer max battery life

Result Screen Shot 2020-01-12 at 12 21 25

CPU Ratio Info in AppleIntelInfo.kext

CPU Ratio Info:
------------------------------------------
Base Clock Frequency (BLCK)............. : 100 MHz
Maximum Efficiency Ratio/Frequency...... :  4 ( 400 MHz)
Maximum non-Turbo Ratio/Frequency....... : 20 (2000 MHz)
Maximum Turbo Ratio/Frequency........... : 40 (4000 MHz)
velaar commented 4 years ago

I think I did it :)

Screen Shot 2020-01-14 at 8 07 40 PM

tylernguyen commented 4 years ago

@velaar That's great! What did you do?

velaar commented 4 years ago

NVMeFix was the key to this as well as a low power SSD. Plus undervolting (-83mV), using CPU vectors from MacBookPro15,4 adjusted to 400MHz (practically only drops to 600), enabling ASPM through PCIutils on most of the devices, a lot of USB power tweaking.

I've hit a rough patch at work, so can't contribute at a previous rate for some time.

velaar commented 4 years ago

Sorry for double-posting. Today I woke my laptop and for some reason it was at an unusual power state. I don't know what caused it (ec bug?) but for some reason the CPU power consumption was exactly what it is supposed to be on this cpu. (See screenshots) I'm now wondering what happened and how can we replicate the condition. The good part is that It is possible to achieve 5.5W draw on X1C6 on MacOS X.

Screen Shot 2020-01-20 at 5 20 25 AM

Screen Shot 2020-01-20 at 10 25 47 AM

Update: I purposely did not reboot the laptop since and using it throughout the day. I have noticed two things:

Now I'm wondering if we can bring a laptop to this state on demand, as I'd love to have the 8+ hours of battery even if I have to reboot for that

velaar commented 4 years ago

❗ HELP NEEDED❗

@tylernguyen, @Colton-Ko Ok. So I found the way to increase the X1C6 battery life to about 9-10h at realistic brightness with low activity (python coding/web kind of tasks)

There are 3 components to it:

1. Undervolting I use VoltageShift (kext + launchctl) but it doesn't seem to persist after sleep, a better undervaluing solution is needed. It is important that this solution can separately manage the Core, GPU and digital IO voltages and can re-apply it on a 1-3 minute basis (otherwise the EC resets offsets)

2. Thunderbolt / USB-C Thunderbolt controller causes a C-storn on our laptops ramping the CPU package to 2.2-2.5W If you disable it (or put into BIOS-assisted mode), the C-storm ends and the CPU properly clocks down to where it is supposed to be allowing us to reach a way better power state. While I'm writing this message on battery my laptop consumes about 5W of power while WiFI and Bluetooth are ON.

I will continue to experiment in this field but here are some findings:

Further research is needed into TB3 v3.1 and TBTonPCH to see if we can activate TB on demand and USB-C

Thunderbolt BIOS assist means (as per Lenovo rep):

I confirmed with the experts: In BIOS Assist Mode, memory resource arraignment is done by BIOS. In Native mode, memory resource arrangement is done by OS.

There are two different firmwares - one for each mode - as they aren't compatible between the two modes. LVFS should take care of getting you the right one now as mentioned above.

3. ASPM The best way to set the ASPM mode is through a EFI driver. But I'm not good enough in programming to write one. It can be done with setpci.efi but I don't know how to wrap the setpci into a script that can be called by OpenCore to automate the process

I think that it is worth looking into it. At the moment I'm enjoying a very long battery life (better than some Macs) with some shortcomings (no USB-C at the moment, TB3 requires reboot, have to run a script for max power savings), I hope that with your help we can overcome all of them, but some time commitment is needed.

tylernguyen commented 4 years ago

@velaar Thank you so much for contribution!!! It means so much to me that others are helping my project.

I'm investigating the matter on my own as we speak. Can you point to more references on ASPM and setpci.efi? I want to look deeper into that.

Also, I would suggest repasting the machine with something like Grizzly thermal to improve undervolting capabilities.

Moving forward, I will track the energy usage of my EFI release folders and include it in my repo. I also ask that you attach an EFI folder and relevant settings each time energy usage is reported. This will help coordinate settings and experiments.

I'll be back soon with further updates!

tylernguyen commented 4 years ago

@velaar Also, what are you using to track energy usage? A combination of iStats menu and Intel Power Gadget? I just want to be on the same page.

velaar commented 4 years ago

@tylernguyen I track the energy with iStat + intel power gadget, that is correct.

After running this set of settings for a week I can say that a very low power usage is real.. and it's very easy to get used to.

Unfortunately I'm quite busy this/next week but will try to upload a quick writeup of what needs to be done to achieve this level of power consumption.

Porco-Rosso commented 4 years ago

On a i7-8650U, with Volta set to "power-limit" 1 W and one-key-cpufriend set to "1200/1300mhz balance Power" I get the following:

Screen Shot 2020-01-26 at 5 08 45 PM

Is it safe for me to try 400mhz on cpufriend, or is there a chance I won't be able to boot back into macOS?

velaar commented 4 years ago

@Porco-Rosso Yes, it is safe, but no, it is verified to not work (no difference from 800MHz). I don't use Volta as it doesn't work that well on ThinkPads (EC constantly resets the voltage offsets, visible if you read MSR directly), maybe they fixed it by now. Will retest soon.

Also setting PL1 or PL2 (not sure what power-limit actually means) will kill the CPU performance (lock your CPU down to 400MHz)

AutinMitra commented 4 years ago

When I last checked, my wattage was ~7-9W browsing Chrome and using VSCode for web development, and that's without undervolting (using OC folder).

To highlight ways we can improve PM, we can maybe add a section to README.md?

tylernguyen commented 4 years ago

@velaar Is there any updates on your instructions to maximize battery life?

lubixxx96 commented 4 years ago

Hello.

Is that only me or VoltageShift does not work on our machine? I get instant crash on Windows when I am trying to apply offset of -100mV or more, but in OSX I can set -200 or more and nothing. I dont even see any temperature differences. Powerlimits are working fine.

I am using VoltageShift Undervoltage Tool v 1.21. with deamons for reapply every minute. Any ideas?

Thanks, Lubomir

tylernguyen commented 4 years ago

@lubixxx96 I haven't really tried VoltageShift myself. It was really only here b/c of reference from @velaar . In the next week, I will do some testing on it and get back to you.

velaar commented 4 years ago

@lubixxx96 It does work, however you should be aware of the EC behaviour where it resets TDP to 15W/25W as soon as you hit either ~90C or ~40W in power. That's why reapply is there.

I'm not sure what "VoltageShift Undervoltage Tool v 1.21" is. I'm using kexts and software from here: https://github.com/sicreative/VoltageShift

And I crash at about -90mV on the CPU or at about -120mV on the digital/ring side. In Windows I crash at -80mV in linux the best sustained result was -90mV (can be a calculation/rounding error)

@tylernguyen Sorry for lack of response here. I'm also a student going through my finals at the moment, should be over by Apr. 16.

The main points about power consumption that I hope you can look into:

Powering up/powering down USB-C/Thunderbolt controller causes an interrupt storm. It might be on the CPU side or the USB controller side but the power consumption is higher by about 2W on average. There is some discussion of it here https://forums.lenovo.com/t5/Linux-Discussion/FYI-Linux-May-Not-Support-Thunderbolt-Native-Mode/td-p/4057604?page=1

USB power management - Believe can be tuned further but I don't know how exactly to do that. It seems Mac OS does not completely disable the USB ports when nothing is plugged in

APSM I'm enabling ASPM on most of the devices with a help of a script. I know that is can be done on either UEFI level or with a UEFI/Opencore driver (tested by loading an efi shell and running the UEFI versions of setpci/lspci to set the registers as follows:

./setpci -s 03:00.0 50.b=3:3
./setpci -s 02:00.0 50.b=3:3
./setpci -s 04:00.0 50.b=3:3 

Thunderbolt - I don't really expect power management to work there without Apple firmware on the controller. However if we can make a more reliable thunderbolt implementation with "Thunderbolt BIOS assist" ON we might get hotplug again as BIOS does the d device init. We just need to make it look like an External PCIe device.

Undervolting can be done on BIOS/UEFI/EC side to achieve permanent results - that is pending Skyra1n

aspm2.sh.zip

lubixxx96 commented 4 years ago

@velaar I am using same VoltageShift v1.21 kext and app from same github repo. No matter what I set for cpu, it does not crash. Only the cache offset crash, not sure about other (system agency, analogy i/o) OC mailbox returns failed and looks like I cant change Digital I/O - still 0mv.

Thanks for the aspm2 script, I am using it as lauchdaemon.

BTW, do we have an option to manually control fan rpm?

tylernguyen commented 4 years ago

@lubixxx96 I do not think so, not until a BIOS release exploit is out. @velaar Where you getting setpci and lspci binaries from? I cannot find a source to download them.

lubixxx96 commented 4 years ago

Here you have: setpci_lspci.zip

velaar commented 4 years ago

pciutils.zip pciutils.efi.zip pciutils.efi.bin.zip

@tylernguyen I've build pciutils myself. Both for MacOS and efi.

Here is what I used to get the setpci.efi https://github.com/timotheuslin/pciutils.efi

update: I have attached my folders with binaries and toolchain. Sorry for the mess :)

tylernguyen commented 4 years ago

@velaar Thanks for your binaries. I do have a question though,

Which pic devices specifically are you enabling ASPM for? And which ASPM mode are you enabling? I assume L1?

benbender commented 4 years ago

Just as a quick-note: I'm working on this issue on a T480, which is very similar. Three big parts of the puzzle of power consumption are:

a) Power management of the iGPU. All your screenshots showing a max frequency of ~350mhz which means that the GuC-Firmware, and therefore power management, is missing.

b) USB-Power for internal devices (f.e. Card-Readers) which may be powered up constantly

c) MAYBE: dGPU - Whatevergreen just powers down the PCIe-port and I've disabled Optimus via ACPI instead and power consumptions seems to be improved a bit.

tylernguyen commented 4 years ago

Just as a quick-note: I'm working on this issue on a T480, which is very similar. Three big parts of the puzzle of power consumption are:

a) Power management of the iGPU. All your screenshots showing a max frequency of ~350mhz which means that the GuC-Firmware, and therefore power management, is missing.

b) USB-Power for internal devices (f.e. Card-Readers) which may be powered up constantly

c) MAYBE: dGPU - Whatevergreen just powers down the PCIe-port and I've disabled Optimus via ACPI instead and power consumptions seems to be improved a bit.

@benbender Thanks for letting me know.

The x1c6 does not have a dGPU so that's not an issue. On the next repo update, I will force load Apple GuC-Firmware which should improve power consumption somewhat. However, I have been experimenting it on my machine and it really hasn't saved that much power. I suspect that the biggest power hog is USB and Thunderbolt. But I really don't know how to begin to investigate.

benbender commented 4 years ago

For USB: My "attack vector" is patching the ports directly via ACPI: https://github.com/daliansky/OC-little/tree/master/16-ACPI%E5%AE%9A%E5%88%B6USB%E7%AB%AF%E5%8F%A3 For things like IR-Camera etc But f.e. I would like to use the card reader, but it seems to constantly consume 500mW of USB-Power - As there seems no known patch for internal USB-Card-Readers in Catalina these kinds of devices are a real PITA for power consumption.

For Thunderbolt: My target is to disable TB and retain USB-C 3.1. I've been experimenting with disabling the PCI-E-Interface for TB, but was only able to get USB-C 3.0 @ 5GBit. Time will tell ;)

For GuC: Is GuC-Loading working for you?

For me it fails to get the firmware hash from the ME-controller. Therefor igfxfw=2 and loading of linux-guc-fw fails. Additionally there are closed bug-reports on the acidanthera bug-tracker which suggests, that there is only skylake-guc-fw for kabylake-gpus in the apple-framebuffers - which leads to KP with igfxfw=1. I wasn't successful on that part in any way. PCIID for my UHD620 is 5917.

tylernguyen commented 4 years ago

@benbender Thank you, I'll look into those ACPI patches. For GuC, igfxfw=2 works fine for me, and I have the same iGPU as you. What's your framebuffer settings?

benbender commented 4 years ago

I'm using 591C0005 with the following config:

                        <key>PciRoot(0x0)/Pci(0x2,0x0)</key>
                        <dict>
                                <key>AAPL,GfxYTile</key>
                                <data>AQAAAA==</data>
                                <key>AAPL,ig-platform-id</key>
                                <data>BQAcWQ==</data>
                                <key>AAPL,slot-name</key>
                                <string>Internal@0,2,0</string>
                                <key>device-id</key>
                                <data>FlkAAA==</data>
                                <key>framebuffer-con2-enable</key>
                                <data>AQAAAA==</data>
                                <key>framebuffer-con2-type</key>
                                <data>AAgAAA==</data>
                                <key>framebuffer-patch-enable</key>
                                <data>AQAAAA==</data>
                                <key>hda-gfx</key>
                                <string>onboard-1</string>
                                <key>model</key>
                                <string>Intel(R) UHD Graphics 620</string>
                        </dict>

Accompanied by a binary patch to get rid of the 32mb-dvmt-check, this gives me perfectly stable 4k/60Hz output via DP/USB-C and 30Hz via HDMI 1.4.

I'll try to check out your config and have a look, if that gives me GuC-acceleration. But I fear my problem is related to the (T480-)Firmware and the hash-generation which is used in GuC-firmware-loading.

Btw, atm I'm running -disablegfxfirmware which gives me at least 500mhz "boost"-clock on the GPU and doesn't seem to have a negative impact on power consumption.

PS: I'm running as macbookpro15,2 because of the better match of cpu-configs/freq-tables. There might be also some effect in the platform choice.

Do you have any special reason to use the macbookpro14,1 as a platform? I'm asking because I'm, besides of different "rumors" in varius forums, not quite sure about the impact of the choice of the platform.

parndt commented 4 years ago

Accompanied by a binary patch to get rid of the 32mb-dvmt-check, this gives me perfectly stable 4k/60Hz output via DP/USB-C and 30Hz via HDMI 1.4.

@benbender 😲 what is the binary patch you're using? I tried to get 4K@60Hz on USB-C/DP and could never get it working (see #40 if you're interested).

benbender commented 4 years ago
        <key>Patch</key>
        <array>
            <dict>
                <key>Base</key>
                <string></string>
                <key>Comment</key>
                <string>KBL-DVMTpatch-10.15-10.15.1-10.15.2-10.15.3</string>
                <key>Count</key>
                <integer>0</integer>
                <key>Enabled</key>
                <true/>
                <key>Find</key>
                <data>D4KnAwAA</data>
                <key>Identifier</key>
                <string>com.apple.driver.AppleIntelKBLGraphicsFramebuffer</string>
                <key>Limit</key>
                <integer>0</integer>
                <key>Mask</key>
                <data></data>
                <key>MaxKernel</key>
                <string>19.3.0</string>
                <key>MinKernel</key>
                <string></string>
                <key>Replace</key>
                <data>D4IAAAAA</data>
                <key>ReplaceMask</key>
                <data></data>
                <key>Skip</key>
                <integer>0</integer>
            </dict>
            <dict>
                <key>Base</key>
                <string></string>
                <key>Comment</key>
                <string>KBL-DVMTpatch-10.15.4-10.15.5</string>
                <key>Count</key>
                <integer>0</integer>
                <key>Enabled</key>
                <true/>
                <key>Find</key>
                <data>D4KPAwAA</data>
                <key>Identifier</key>
                <string>com.apple.driver.AppleIntelKBLGraphicsFramebuffer</string>
                <key>Limit</key>
                <integer>0</integer>
                <key>Mask</key>
                <data></data>
                <key>MaxKernel</key>
                <string></string>
                <key>MinKernel</key>
                <string>19.4.0</string>
                <key>Replace</key>
                <data>D4IAAAAA</data>
                <key>ReplaceMask</key>
                <data></data>
                <key>Skip</key>
                <integer>0</integer>
            </dict>
            <dict>
                <key>Base</key>
                <string></string>
                <key>Comment</key>
                <string>CFL-DVMTpatch-10.15-10.15.1-10.15.2-10.15.3</string>
                <key>Count</key>
                <integer>0</integer>
                <key>Enabled</key>
                <true/>
                <key>Find</key>
                <data>D4KnAwAA</data>
                <key>Identifier</key>
                <string>com.apple.driver.AppleIntelCFLGraphicsFramebuffer</string>
                <key>Limit</key>
                <integer>0</integer>
                <key>Mask</key>
                <data></data>
                <key>MaxKernel</key>
                <string>19.3.0</string>
                <key>MinKernel</key>
                <string></string>
                <key>Replace</key>
                <data>D4IAAAAA</data>
                <key>ReplaceMask</key>
                <data></data>
                <key>Skip</key>
                <integer>0</integer>
            </dict>
            <dict>
                <key>Base</key>
                <string></string>
                <key>Comment</key>
                <string>CFL-DVMTpatch-10.15.4-10.15.5</string>
                <key>Count</key>
                <integer>0</integer>
                <key>Enabled</key>
                <true/>
                <key>Find</key>
                <data>D4KPAwAA</data>
                <key>Identifier</key>
                <string>com.apple.driver.AppleIntelCFLGraphicsFramebuffer</string>
                <key>Limit</key>
                <integer>0</integer>
                <key>Mask</key>
                <data></data>
                <key>MaxKernel</key>
                <string></string>
                <key>MinKernel</key>
                <string>19.4.0</string>
                <key>Replace</key>
                <data>D4IAAAAA</data>
                <key>ReplaceMask</key>
                <data></data>
                <key>Skip</key>
                <integer>0</integer>
            </dict>
        </array>

These are working fine for both, the KBL/CFL-Framebuffers. But you need to have 32mb-stolenmem-patches in place for updates and recovery. Booting in update-/recovery-mode OC isn't able to apply those patches and will result in a kernel-panic otherwise. Additionally you may need to update kextcaches ("sudo kextcache -i /") if you change ig-platform-id. If caches and config are out of sync, these may also lead to KP. (At least as far as I can tell). Oh, and "AvoidFastLinkTraining" should be disabled in your framebuffer of choice. Otherwise 4k was a bit unstable for me from time to time.

But as my daily driver with a 4k-32"-Display it's working perfectly stable, fine and even fast.

benbender commented 4 years ago

You're welcome! If needed, I could share my config.plist as a whole. I don't think that there are more parts involved (besides WEG-config and the patches - and maybe the platform-id of macbookpro15,2), but I'm not entirely sure.

benbender commented 4 years ago

@tylernguyen just tried with macbook14,1, exactly the framebuffer-config from your repo and igfxfw=2 and got stuck again in a failed loop of

[IGPU] Hash data from ME never returned, status = 1, doing retry #

So I think my guess is right and it's firmware/bios related. You may want to put a note in the docs if you plan to update your repo :/

tylernguyen commented 4 years ago

You're welcome! If needed, I could share my config.plist as a whole. I don't think that there are more parts involved (besides WEG-config and the patches - and maybe the platform-id of macbookpro15,2), but I'm not entirely sure.

Actually, could you share your EFI zip as a whole? I want to cross reference everything possible. Make sure to remove your SMBIOS info before sharing.

velaar commented 4 years ago

@tylernguyen can you share your latest config.plist too? I struggle to enable igfwfx. Fails to load the WEG altogether

benbender commented 4 years ago

Sure - It's not cleaned up and there are some experiments in there, but the config.plist is mostly stable for me.

Here you go: OC-T480.zip

(I've left the OC 5.9-Release parts out, they are completely default.)

tylernguyen commented 4 years ago

@benbender This is embarrassing. I misspelled igfxfw as ifgwfx. With the correct spelling, it fails to load. Thanks for double-checking me. @velaar

benbender commented 4 years ago

My testing was done with the following bootargs:

 <string>debug=0x100 keepsyms=1 brcmfx-country=#a brcmfx-driver=2 -wegnoegpu -wegdbg -v igfxfw=2 </string>

So it may be an embarrassing (wouldn't say that ;) mistake, but not my cause of the problem. No need to worry!

BTW: quicktip to whom it may concerns - I do such experiments simply with an extra install of OC on an USB-stick. So no harm if it fails for my installation.

tylernguyen commented 4 years ago

My testing was done with the following bootargs:

 <string>debug=0x100 keepsyms=1 brcmfx-country=#a brcmfx-driver=2 -wegnoegpu -wegdbg -v igfxfw=2 </string>

So it may be an embarrassing (wouldn't say that ;) mistake, but not my cause of the problem. No need to worry!

So if we can't load Apple GuC firmware. How has your experience with -disablegfxfirmware been? Also, with your kernel patches? Do you just disable them every time you need to enter recovery or do macOS updates?

benbender commented 4 years ago

Regarding iGPU-FW: No boot-args regarding firmware (which results in igfxfw=4 afaik) gives me a maximum of 300mhz and no power-management on the iGPU.

-disablegfxfw gives me a maximum of 500mhz and no power-management on the iGPU.

-igfxfw=1 & -igfxfw=2 leads to a loop of failed hash-retrieval and finally no fw-load.

For the patches: No need to disable them at any point. They are simply not applied for recovery/updates - so you need to have the framebuffer-stolensize patches to not crash into a KP.

And there is the problem, in case of updates, that the framebuffers could change and the patches don't fit anymore (which happened with 10.15.14 as you see above).

My strategy on this is to test new OSX point-releases with my config on an external ssd-enclosure with a clean install and my config beforehand (not only because of the patches, but because the t480 is my daily driver) and apply them if it seems to be working stable

tylernguyen commented 4 years ago

@benbender Also to answer your previous question, the reason I'm using MacbookPro14,1 is mostly because this repo/project was started over 2 years ago. And if I can recall, MacbookPro15,2 was not an available or stable SMBIOS at the time. MacbookPro14,1 has been perfectly stable for me since so I never bothered to experiment with other SMBIOS. So I guess I should start trying some different ones out soon. Have you ever tried MacbookPro14,1 and in your experience, does the SMBIOS affect CPU Power Consumption, with CPUFriendDataProvider applied?

tylernguyen commented 4 years ago

Edit: Also, MacbookPro15,2 is a Coffee Lake processor while MacbookPro14,1 is a Kaby Lake one which matches closest to my machine. I'll experiment with different SMBIOS soon but I do not think using one of a different platform could possibly be better?

benbender commented 4 years ago

Not quite sure - I've done to much experimentation in this regard in parallel.

What's an additional PITA is the fact, that sensor readings not the same between platforms. f.e. iStat Menus maps the sensor-values to static names of according to platform (for macbookpro15,2 the cpu-sensors start 0-indexed f.e. and my cpu-core 4 is shown as "CPU Proximity". Same for power readings).

tylernguyen commented 4 years ago

@benbender What's your CPU? is it the Coffee Lake UHD 620 or the Kaby Lake -R UHD 620?

benbender commented 4 years ago

@tylernguyen thats not quite accurate. Kaby lake is essentially 7xxx-series in mac os-world, coffee lake is 8xxx-series and kaby lake refesh (which is what the 8650u is) isn't available in the mac-world. There are a number of people who are even forcing lilu to lilucpu=9 for kbr, but I couldn't note any difference and decided to leave lilu alone in the end.

My CPU is kaby lake refresh 8650u with an (U)HD 620 8086-5917.

But these namings are generally more marketing than anything else and, at times, generations of cpus/gpus even get mixed when it fits budgets/marketing/etc.

See f.e.: https://github.com/acidanthera/bugtracker/issues/290

benbender commented 4 years ago

Oh and, as I said, I couldn't really find any meaningful explanation of the effects of platform-id choice. Some say it should be chosen by gpu, some cpu.

In my opinion it's more about cpu, because frequency-vectors/cpu-pm really depends on that choice (but can be altered). Besides of that, different assumptions of os x and/or apps seem to depend on it (f.e. the expected sensors of iStat, TouchID etc)

tylernguyen commented 4 years ago

@benbender Right, but the problem is that a lot of our config.plist variables depend on Kaby Lake properties, not Coffee Lake ones. For examples, your device-id is 1659000 (Intel HD Graphics 620) while your AAPL,ig-platform-id is 05001C59 (Intel HD Graphics 630), both of which are Kaby Lake graphics. So when it comes to switching a different SMBIOS, it's a lot more work than just changing MacbookPro14,1 to MacbookPro15,2. For it be to truly optimized and improve anything, you would need to patch various variables to be in sync with your SMBIOS. Or at least that's what I'm assuming? it not even affect anything if the SMBIOS definition and various config variables do not match

benbender commented 4 years ago

That's a point of question for me where I'm uncertain. ATM I tend to believe that platform-id/framebuffer do not depend on one another (which is backed by the fact f.e. that it was advised to fake kaby-lake down to skylake when there was no fitting framebuffer in os x).

Besides of that I'm a bit unsure what kind of variables you are talking about (the only ones I'm aware of are those in the platform-id-section of OC and sure, they have to match)

benbender commented 4 years ago

fun fact btw: original macbooks have poor thermals and cpu-performance on windows because every optimization is done via kext in osx (freq-vectors, power-profiles, therma-pressure etc) and not available to windows even if it's installed via bootcamp... So, in the end, its all software-based tuning which means a) it can be altered and b) (and thats a kind of a problem for us) the data in the acpi tables is meaningless nowadays to os x/hackintoshing.