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

Increased power consumption and resource utilization via IPG after sleep #27

Open
egore24 opened this issue May 28, 2020 · 11 comments
Open

Comments

@egore24
Copy link

egore24 commented May 28, 2020

Hello. I'm happily using your latest OC files, so thank you for that!

An ongoing issue I have noticed (long before OC, on Clover as well) is increased power consumption and resource utilization after sleep. This is measured with Intel Power Gadget. On a fresh boot, PKG power values in IPG remain at idle approx. 0.8 but after sleep wake up go up to no lower than 2.10. Utilization values on boot are approx 0.4, but never lower than 0.9 after sleep wake up.

Any ideas where to look to have these values remain unchanged after sleep?

Thanks.

@the-Quert
Copy link
Contributor

the-Quert commented May 29, 2020

Yap, I've notice this problem since Clover. To solve the problem, more researches about HWP and XCPM are needed.

Kinda busy on other stuffs these days, more researches would keep going in few days.

More info about power consumption would be updated to issue#25 in the future.

  • Feel free to report any issues, and maybe I will do it tomorrow.

@bozma88
Copy link

bozma88 commented Jun 16, 2020

I am running OC on the XPS 9360 i7-7500U version, with HWP tables generated by one-key-cpufriend and choosing the most aggressive frequency-switching setting.
Frequency scaling, power consumption and benchmarks are the same both pre and post-sleep.
With NVME SSD (Sabrent Rocket) and FHD display at 50% brightness I am seeing 3.3w idle power consumption in total.
Using MacBookPro14,1 identifier, as it is the most appropriate for 7500U users.
idle

@the-Quert
Copy link
Contributor

Thanks for replying, I think the problem should be solved from XCPM, more statistics would be collected and improved.

  • Kinda busy on other stuffs these days, more researches would keep going in few days.

  • Feel free to report any issues, and maybe I will do it tomorrow.

@the-Quert
Copy link
Contributor

the-Quert commented Jun 19, 2020

Test result:
With the latest repo...
Bootloader: Clover
Monitor: Intel Power Gadget, HWMonitor

  • Idle before sleep:
    CPU Package Total 0.7 W
    Frequency 0.8 GHz

  • Idle after sleep:
    CPU Package Total 2 W
    Frequency 0.8 GHz

  • The statistics above is do with latest repo, and turn off TurboBoost in BIOS.

  • Research on XCPM will keep working to optimize the performance.

  • Feel free to report any issues, and maybe I will do it tomorrow.

@bozma88
Copy link

bozma88 commented Jun 19, 2020

My results shown above (same PM before-after) is with a 7500U, custom CPUFriend data provider, turboboost eabled in BIOS, a Sabrent Rocket NVME SSD and identical EFI folder to yours, except for the following:

  • I removed the FakePCIID Wifi kext and Broadcom BT kexts, as I have the native "NG" Fenvi card
  • I also removed the FakePCIID Audio kext, as with Whatevergreen is no longer necessary and HDMI audio still works
  • My SMBIOS is MacBookPro14,1, as it is the most suitable for 7-series owners

Same PM and GB scores before and after sleep.

Also, in Sierra I was happy without HWP and got extremely satisfying results by not enabling HWP, not injecting plugin-type SSDT property and just relying on legacy XCPM to control CPU and GPU frequency.
Indeed, with XCPM, I was getting way more power states for both CPU and GPU, compared to HWP.

HWP in Catalina is a bit more clever, since, for example, throttles down performance and total watt usage when battery is lower than 20%.

Then, there is also the ability of the EC to override CPU scaling settings: for example, with battery at 0% and nearing its LVC, CPU is throttled down by BIOS at 0.4GHz flat.

@the-Quert the-Quert reopened this Jun 19, 2020
@the-Quert
Copy link
Contributor

the-Quert commented Jun 21, 2020

OpenCore is just modified and updated.
Try OpenCore as bootloader, cause more detailed power management is just configured with DSDT in OC.

  • Feel free to report any issues, and maybe I will do it tomorrow.

@egore24
Copy link
Author

egore24 commented Jun 22, 2020

Hello and once again thank you for your efforts! I have installed OC from your latest repo and the power consumption has remained unchanged as before (prior to sleep, PKG 0.74; after sleep PKG 1.9)

Only differences I have had to modify are removal of Airport and BCM kexts along with associated removal of these kexts mentioned in kernel of config. Also, my machine can only achieve a -91 CPU undervolt, compared to your -100; all other BIOS variables are applied the same as you. I can provide my EFI if that would be of any help to you and further development on this issue of power management.

Thanks again!

@the-Quert
Copy link
Contributor

Thanks for testing, more improvement would be updated in next week.
Since XCPM is active, will see what can do to improve power consumption.

  • Feel free to report any issues, and maybe I will do it tomorrow.

@teeuwen
Copy link

teeuwen commented Dec 11, 2020

Do you have Thunderbolt Boot Support disabled in the BIOS settings @egore24?

I found the fix on the Arch Wiki: https://wiki.archlinux.org/index.php/Dell_XPS_13_(9360)#Power_Drain_after_waking_from_standby and besides, the README already calls for disabling this.

@bozma88
Copy link

bozma88 commented Apr 7, 2021

Even if months ago I had same power consumption before-after sleep, now I am starting to experience your issue.

I am on 7500U 8GB 9360 FHD.

Before sleep: 0.6w
After sleep: 1.0w

Enabling-disabling thunderbolt in BIOS makes no difference.
Card reader disabled in BIOS (it adds another 0.5w of left enabled).
CPU base frequency, core and RAM power consumption are the same, even if total package power varies.

What I just discovered, and is 100% repeatable:

  • Boot laptop. Power consumption is LOW
  • Sleep laptop. Then wake. Power consumption is HIGH
    - [THIS IS THE IMPORTANT PART] Sleep laptop AND IMMEDIATELY BREAK SLEEP before it completes the process by pressing a key
  • Laptop will return to woken state but power consumption will be LOW

What does this mean?
That there is likely a device that, upon wake from sleep, gets restored to a high-consumpton state from the BIOS ACPI tables.
When putting laptop into sleep, some devices are put to sleep by the OS, others by ACPI.
By interrupting the sleep before it completes, maybe you don't trigger some ACPI code that incorrectly restores power state to a specific device.

Please try this and, if it is repeatable on your systems, we can continue searching for the cause.

Thank you!

@bozma88
Copy link

bozma88 commented Apr 7, 2021

I must add an important detail that I forgot to say:
You CANNOT interrupt the Sleep entering if you put the laptop to sleep by pressing FN-INS. That is an low-level sleep command and is controlled entirely by the BIOS.
You must put the laptop to sleep via the OS, so e.g. via the power menu.
This way, you can interrupt the sleep-entering (even after a fraction of a second) and you should observe the power consumption returning to LOW.

Please report!

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

No branches or pull requests

3 participants