CodySchrank / gSwitch

macOS menu bar app that allows control over the gpu on dual gpu macbooks
MIT License
887 stars 46 forks source link

Starting a hungry processes switches to discrete GPU when it shouldn't #29

Closed realies closed 5 years ago

realies commented 5 years ago

Starting a hungry process switches to discrete GPU when integrated is forced (macOS 10.14.2 Beta 18C48a):

image

Quitting the process leaves the GPU at discrete with no way to switch back to integrated.

Edit: Seems like something with the states gets messed up as gfxCardStatus switches between modes without actually doing anything after this occurring.

Edit2: Sleeping and waking the device allows for the GPU to be changed again.

CodySchrank commented 5 years ago

Has this reoccured? I have no problems with macOS 10.14. Likewise I can't recommend using gfxCardStatus and gSwitch at the same time because they could compete for the gpu and cause undefined behavior.

realies commented 5 years ago

It seems it has, try running StarCraft 2.

kbcovingtonsr commented 5 years ago

Having the same issue. Works fine until Chrome kicks off a hungry process..

CodySchrank commented 5 years ago

Ok I will take a look.

CodySchrank commented 5 years ago

Everything is still working for me as expected but I'm on 10.14.1 not 10.14.2

@kbcovingtonsr Are you on macOS 10.14.2? I tried with chrome by going to google maps and it still switches back for me.

kbcovingtonsr commented 5 years ago

If I can make a suggestion:

Once the discreet GPU starts flaking on a Mac, it really never comes back (my situation). What would be most helpful would be a tool that permanently disables the discreet GPU.

kc

On Wed, Dec 5, 2018 at 1:51 PM Cody Schrank notifications@github.com wrote:

Ok I will take a look.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/CodySchrank/gSwitch/issues/29#issuecomment-444642737, or mute the thread https://github.com/notifications/unsubscribe-auth/AqKOKg3E_J_rlmxeWgUU_rDox5K1Wzgyks5u2DHegaJpZM4Yxrjr .

-- kc

kbcovingtonsr commented 5 years ago

I've got an older Early 2011 Macbook Pro. Apple chose to omit that class from their last major upgrade (though they support older Macbooks). So I'm stuck on High Sierra 10.13.6

On Wed, Dec 5, 2018 at 2:11 PM Keith Covington kbcovingtonsr@gmail.com wrote:

If I can make a suggestion:

Once the discreet GPU starts flaking on a Mac, it really never comes back (my situation). What would be most helpful would be a tool that permanently disables the discreet GPU.

kc

On Wed, Dec 5, 2018 at 1:51 PM Cody Schrank notifications@github.com wrote:

Ok I will take a look.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/CodySchrank/gSwitch/issues/29#issuecomment-444642737, or mute the thread https://github.com/notifications/unsubscribe-auth/AqKOKg3E_J_rlmxeWgUU_rDox5K1Wzgyks5u2DHegaJpZM4Yxrjr .

-- kc

-- kc

CodySchrank commented 5 years ago

@kbcovingtonsr There are ways to permanently disable the gpu. Check out https://apple.stackexchange.com/questions/166876/macbook-pro-how-to-disable-discrete-gpu-permanently-from-efi/285896#285896

realies commented 5 years ago

@CodySchrank, there isn't any instructions on how to revert the NVRAM reconfiguration. Can you confirm that you have tested gSwitch with GPU intensive applications such as SC2 and it works as expected?

kbcovingtonsr commented 5 years ago

Hi Cody,

Are you serious? Download Linux and then... That's why we need a tool.

kc

On Mon, Dec 10, 2018 at 3:06 PM Cody Schrank notifications@github.com wrote:

@kbcovingtonsr https://github.com/kbcovingtonsr There are ways to permamently disable the gpu. Check out https://apple.stackexchange.com/questions/166876/macbook-pro-how-to-disable-discrete-gpu-permanently-from-efi/285896#285896

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/CodySchrank/gSwitch/issues/29#issuecomment-445992300, or mute the thread https://github.com/notifications/unsubscribe-auth/AqKOKuAbw3rsY1AeevXOiKYo4VUjPp4pks5u3trLgaJpZM4Yxrjr .

-- kc

kbcovingtonsr commented 5 years ago

Hi Cody,

Not sure what SC2 is.. I'm simply using Chrome and keep an eye on the graphics card in the Activity Monitor. I can sometimes see it switch GPUs there just before my Mac locks up.

kc

On Mon, Dec 10, 2018 at 5:29 PM realies notifications@github.com wrote:

@CodySchrank https://github.com/CodySchrank, there isn't any instructions on how to revert the NVRAM reconfiguration. Can you confirm that you have tested gSwitch with GPU intensive applications such as SC2 and it works as expected?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/CodySchrank/gSwitch/issues/29#issuecomment-446027023, or mute the thread https://github.com/notifications/unsubscribe-auth/AqKOKn4oA3wEfPixq3eXXB2i7THeatPmks5u3vxmgaJpZM4Yxrjr .

-- kc

kbcovingtonsr commented 5 years ago

..that sounded harsh, didn't it? I didn't mean it that way. Appreciate your efforts Cody!

kc

On Thu, Dec 13, 2018 at 8:54 AM Keith Covington kbcovingtonsr@gmail.com wrote:

Hi Cody,

Are you serious? Download Linux and then... That's why we need a tool.

kc

On Mon, Dec 10, 2018 at 3:06 PM Cody Schrank notifications@github.com wrote:

@kbcovingtonsr https://github.com/kbcovingtonsr There are ways to permamently disable the gpu. Check out https://apple.stackexchange.com/questions/166876/macbook-pro-how-to-disable-discrete-gpu-permanently-from-efi/285896#285896

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/CodySchrank/gSwitch/issues/29#issuecomment-445992300, or mute the thread https://github.com/notifications/unsubscribe-auth/AqKOKuAbw3rsY1AeevXOiKYo4VUjPp4pks5u3trLgaJpZM4Yxrjr .

-- kc

-- kc

hughperkins commented 5 years ago

Random bystander hypothesis to what might be happening:

hughperkins commented 5 years ago

Actually, both gswitch and gfxcardstatus seem to have a bug in recenlty, since I updated to Mojave. But the bug in gswitch seems at least temporary. To reproduce:

CodySchrank commented 5 years ago

@hughperkins

"with gswitch, card switches for me to discrete for ~1-2 seconds, but then at least returns to integrated again..."

This is unfortunately as fast as I can make it in some instances. For some applications apple requires the dgpu to be accessed (if it exists) and then gswitch will notice this event and switch back to the igpu as fast as it can.

CodySchrank commented 5 years ago

It seems like there is not actually an issue here so I am closing this thread. It's not possible for the dgpu to never be accessed (and have it still accessible), apple simple doesn't have any API to prevent that at a high level. If you're looking for a solution where the dgpu is never used I suggest disabling it: https://apple.stackexchange.com/questions/166876/macbook-pro-how-to-disable-discrete-gpu-permanently-from-efi/285896#285896

hughperkins commented 5 years ago

Seems fair.

On Fri, Mar 8, 2019, 18:56 Cody Schrank notifications@github.com wrote:

Closed #29 https://github.com/CodySchrank/gSwitch/issues/29.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/CodySchrank/gSwitch/issues/29#event-2191451028, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHiqMBBi7Qey_tTIV4DCQFvmybyibkZks5vUvjEgaJpZM4Yxrjr .