CodySchrank / gSwitch

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

Save last used state after disconnecting monitor #16

Closed CodySchrank closed 5 years ago

CodySchrank commented 6 years ago

An external monitor requires the dgpu and changes the program to dynamic switching. I need to figure out how to detect when an external monitor is unplugged in order to restore the last used state.

schlomo commented 5 years ago

How about adding a mode that monitors the dependencies and switches back to internal only if there are no dependencies for some time, like 30 seconds? That way you don't have to monitor for specific events but solve the generic case of returning to the internal only mode after a forced switch to dynamic switching.

hughperkins commented 5 years ago

How about, it sounds like you can detect when the monitor is plugged in, and know which device it is? So:

CodySchrank commented 5 years ago

The initial comment was really just a mental note for myself but I appreciate your responses! I forgot about this issue, but I encountered it the other day and it annoyed me so I'll fix it lol.

@hughperkins Yep that's pretty much exactly how I'll do it. Thanks for doing all the thinking for me ;)