xxxzc / xps15-9570-macos

macOS Monterey/Ventura on XPS15-9570 with OpenCore
194 stars 28 forks source link

GPU usage gets stuck at 1 GHz #46

Closed adityahota closed 3 years ago

adityahota commented 3 years ago

I'm on the latest version of the EFI, and after a few minutes of Safari usage, the GPU gets stuck at 1 GHz clock. I have verified this using Intel Power Gadget. Currently, I am on 10.15.3 but I have experienced this on 10.15.4, 10.15.5, and 10.15.6. Does anyone know why this happens/any workarounds for stopping it?

This issue causes the CPU voltage to increase, killing the battery life and making the laptop very hot.

9570, i7-8750H, 4K LCD

xxxzc commented 3 years ago

Removing igfxfw=2 set in boot argument might work.

https://github.com/xxxzc/xps15-9570-macos/blob/1a772d98a58e8f6b80b915580331e496b6026110/OC/config.plist#L544

https://github.com/xxxzc/xps15-9570-macos/blob/1a772d98a58e8f6b80b915580331e496b6026110/CLOVER/config.plist#L100

adityahota commented 3 years ago

Looks like that's made a difference. I've been using my laptop for a while now and it hasn't gotten stuck at 1 GHz. I'll keep you posted. Thank you!

xxxzc commented 3 years ago

GPU will stuck at 350MHz after one random sleep in previous version of WhateverGreen without igfxfw=2. I don't know whether the current version of weg fixes this issue or because of that boot-argument. Please observe it.

adityahota commented 3 years ago

I did encounter the issue of getting stuck at 350 Hz. It wouldn't go away until after a restart. I'll keep you posted.

adityahota commented 3 years ago

Looks like OC 0.6.0 was released today. I'll give Intel GuC a try and let you know how it goes.

adityahota commented 3 years ago

@xxxzc Could you take a look at this?

Maybe the boot argument for GuC is no longer needed.

xxxzc commented 3 years ago

I'm testing if iGPU will stuck at 350MHz without this parameter.

zombillano commented 3 years ago

Hi there, please try using WEG 14.0. We are having high GPU load after sleep, streaming and on idle over here. I am trying to find if it is a problem with latest WEG releases and I found that WEG 14.0 seems to be stable and without those issues. Also it'll be good if you can report your problem at the issue that @adityahota linked so we can draw their attention.

Your problem with stuck frequency may be based on a incorrect device-id parameter, I don't think it is related with the high GPU usage problem.

adityahota commented 3 years ago

Hey @zombillano, thanks for the update! I was having the same issue with 1.4.0 (stuck at 1 GHz when using iGPU for decoding). You are not using Intel GuC right (igfxfw=2 boot arg is not set for you)?

I don't seem to have an issue when waking from sleep (if my GPU gets stuck at 1 GHz, I need to sleep and wake it up to make it go back down to 0 GHz). But if I watch a video (basically scrolling through reddit causes the issue if there are videos that autoplay) it goes up to 1 GHz and gets stuck.

As for incorrect device-id, do you mean we are not using the correct AAPL,ig-platform-idin the config? I also get the 350 MHz bug randomly after a wake-up, and that does not go away until restarting (sleeping and re-waking does not help).

zombillano commented 3 years ago

I'm not using it. My computer has a UHD 620 whilst yours have UHD 630, so there's and slightly little difference. Try to inject device-id property on your config.plist file as stated over here. They claim it is supported since 10.14 BUT every setup is different. For example, I'm unable to have acceleration hardware with their recomended properties for UHD 620.

I also see you have a lot of properties injected for that device, why don't you start simple and delete all of them, then add only "APPL, ig-platform-id" (one recommended for your CPU architecture - Coffee Lake). I'm quite unsure if it corresponds to a mobile or desktop CPU, but give it a try with both, one at the time. If that doesn't work proceed to add device-id property too. Might take some trial and error but after not so many tries you should have the stuck frequency problem solved.

adityahota commented 3 years ago

Thanks @zombillano. I downgraded to WEG 1.4.0 and added device-id=0x3EA6 to my config (key = device-id, type = Data, value = A63E0000 in ProperTree). I slept/woke my computer about 15 times now and don't see any sign of the GPU getting stuck at 350 MHz.

@xxxzc if you get a chance, could you test this value for device-id out and see if you can reproduce the 350 MHz issue? You'll have to downgrade to WEG 1.4.0 because otherwise the 1 GHz stuck issue (same as @zombillano) will occur upon wakeup--this is a different issue than the GuC 1 GHz.

EDIT: when the laptop woke itself up (I guess due to power nap or a notification), GPU got stuck at 350 MHz again. Only a restart will fix it.

xxxzc commented 3 years ago

EDIT: when the laptop woke itself up (I guess due to power nap or a notification), GPU got stuck at 350 MHz again. Only a restart will fix it.

me too

Drowningfish223 commented 3 years ago

Hey guys!

I'm running an xps 7590 with a very similar repo to yours @xxxzc. I had the exact same issue with the iGPU locking to 350mhz after sleep, then locking to 1.15 ghz with GuC enabled. I downgraded to Whatevergreen 1.3.8, which is the earliest Whatevergreen that supports the GuC boot arg, and lilu 1.4.4.

Using those kexts and the igfxfw=2 boot arg, the issues have disappeared. iGPU power management works great. However, I've only done limited testing, so I'm not sure if those are the most recent versions of kexts that don't have issues. Considering the information about bad commits in this thread, I suspect that the latest whatevergreen release that will work is 1.4.0. 1.4.1 may work with the igfxnorpsc=1 boot arg, which disables RPS control (whatever that is). However, RPS control is disabled by default on 1.4.2 and the iGPU was still locking to 1.15 ghz for me.

With Big Sur coming out soon, I know that I'll eventually have to upgrade lilu at least. The Dortania guide says that versions of whatevergreen earlier than 1.4.1 need the boot arg "-disablegfxfirmware". I'm not sure what that boot arg does. I haven't tried it, as I'm waiting for the official big sur launch to upgrade. That said, if anyone wants to try big sur using Lilu 1.4.6+ with whatevergreen 1.3.8-1.4.0 with the necessary boot arg, it may work.

Hopefully I was helpful and we can figure out this issue. If you need any help, feel free to ask.

Good luck!

adityahota commented 3 years ago

Ooh interesting! I will give that a shot I was previously testing with WEG 1.3.8 but I don't think I had used the GuC boot flag.

tctien342 commented 3 years ago

@Drowningfish223 this is latest WhateverGreen build without RPS patch, can u test this?

I have sleep for 8 hours and wake up without having high freq issues

WhateverGreen.kext.zip

Drowningfish223 commented 3 years ago

@tctien342 Sure!

tctien342 commented 3 years ago

@tctien342 Sure!

With igfxfw=2, Big sur beta 8, still fine after 8 sleep cycle <3

Drowningfish223 commented 3 years ago

I started getting Safeforcewake kernel panics on Catalina, so I just upgraded to Big Sur. Haven’t had a problem since, even on the newest kext versions. I did have to inject the custom EDID to run at 48hz, which isn’t ideal. However, my power management issues seem to be fixed.

tiger511 commented 3 years ago

@tctien342 Sure!

With igfxfw=2, Big sur beta 8, still fine after 8 sleep cycle <3

With igfxfw=2 CPU will stuck at 1.05Ghz when you are using safari for a while. It's not related to sleep cycle.GPU frequency stuck at 350Mhz after waking up when you DON'T use that flag.

tctien342 commented 3 years ago

@tctien342 Sure!

With igfxfw=2, Big sur beta 8, still fine after 8 sleep cycle <3

With igfxfw=2 CPU will stuck at 1.05Ghz when you are using safari for a while. It's not related to sleep cycle.GPU frequency stuck at 350Mhz after waking up when you DON'T use that flag.

I already know this bug before, but the build i post above not face with it yet!! Current on Big Sur beta 9

Drowningfish223 commented 3 years ago

I didn't know about this bug, but I haven't had any power management problems on the latest big sur public beta (I think it's beta 4?)

tctien342 commented 3 years ago

@Drowningfish223 maybe big sur already fix this bug!

adityahota commented 3 years ago

Things are running very well on the latest BS beta. Once VoltageShift gets updated and we can undervolt, things will only get better.

I hope the 48 Hz bug can be fixed (though there does not appear to be much progreee on the Acidanthera bug tracker). Not sure what’s going on there.

Drowningfish223 commented 3 years ago

Wait a minute, I’m running the latest public beta and undervolting with voltage shift works great for me. The only issue is that offsets don’t stick after sleep, so I set the launchd to update the offsets every 10 minutes. I had that issue an Catalina, too. Do you have the same problem?

6A49CDAB-7CD3-4074-93CB-B48A4AA49FE5

What doesn’t work is combojack, so I have to use Bluetooth headsets when the laptop isn’t plugged in. Does combojack work for you?

adityahota commented 3 years ago

Hmm it might have been because I was using an older version of VoltageShift. I’ll give it a shot again, thanks for letting me know!

I haven’t given ComboJack a try yet but I can look at it tomorrow and let you know if it works. It worked for me in dev beta 1 but I only started using Big Sur again with beta 9.

tiger511 commented 3 years ago

I already know this bug before, but the build i post above not face with it yet!! Current on Big Sur beta 9

i highly doubt its been fixed in Big Sur. Does your Frequency reach 1Ghz when in load?

tctien342 commented 3 years ago

@tiger511 yes, it does <3 Screen Shot 2020-10-08 at 10 10 42

p/s: dont know but in big sur, everything work perfectly include hibernation

adityahota commented 3 years ago

~@Drowningfish223 how did you install VoltageShift? Is the kext in /L/E or on your OpenCore EFI?~ I realized I hadn't copied it into my EFI partition lol. It's working now!

ComboJack works for me by the way.

@tctien342 how did you test hibernation? Just let the Mac drain in sleep over time?

tiger511 commented 3 years ago

@tiger511 yes, it does <3 Screen Shot 2020-10-08 at 10 10 42

p/s: dont know but in big sur, everything work perfectly include hibernation

for hibernation are you using hibernationfixup and RTCmemoryfixup? is there any special configuration in config.plist of OC?

tctien342 commented 3 years ago

@Drowningfish223 how did you install VoltageShift? Is the kext in /L/E or on your OpenCore EFI?

@tctien342 how did you test hibernation? Just let the Mac drain in sleep over time?

Yep, i let it sleep overnight and it go to hiberation, it completely shutdown in morning! When i open lid, it auto bootup without touching power button and boot into mac os, the boot process dont show apple logo!

Booting process video

@tiger511 yes, it does <3 Screen Shot 2020-10-08 at 10 10 42 p/s: dont know but in big sur, everything work perfectly include hibernation

for hibernation are you using hibernationfixup and RTCmemoryfixup? is there any special configuration in config.plist of OC?

I only use hibernationfixup

tiger511 commented 3 years ago

I only use hibernationfixup

Thanks for the info.I'll try Big Sur once the final version is released. I think it will be in a week or so.

imraan-go commented 3 years ago

Not experiencing this issue in Big Sur anymore. Looks like it's fixed.

adityahota commented 3 years ago

Agreed, looks like it was fixed in Big Sur!

abbasabidi85 commented 5 months ago

I'm on macOS Ventura 13.2 and I have been facing this issue where GFX REQ is stuck at 0.3 GHZ without any boot args, I'm on latest WhateverGreen.kext and the idle power consumption is 1.5 watts, it's not reducing not matter what i do, the scheduler is, Host Preemptive because GuC doesn't load even with the boot arg, and if i use -igfxrpsc=1 then GFX REQ is stuck at 1GHZ with 0.2 watts of increment in total PKG.

CPU- Kaby Lake i5 7200U CPUFriend works fine the CPU frequencies on idle are Core MAX- 2.3 GHZ Core Avg- 0.6GHZ Core Min-0.4GHZ Core Req-0.6GHZ Dell Vostro 3568

And one more thing, when i boot Windows via OpenCore it consumes 1.5 watts like macOS but when i boot Windows via Windows Boot Manager it consumes 0.5 to 0.7 watts at idle. I think it's related to whatever green.