CodySchrank / gSwitch

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

App incorrectly handles multi-user enviroment #11

Closed randyoo closed 5 years ago

randyoo commented 6 years ago

If a specific mode is selected ("integrated only", for example), and then another user launches the gSwitch app, a "hungry" app will immediately cause the discrete GPU to become active. Obviously, "integrated only" mode can't be selected again until the dependency is resolved. Expectation is that launching another instance of the app (by another user) doesn't cause a change in the selected mode. (selected mode of dynamic, integrated only, or discrete only should be global across users)

CodySchrank commented 6 years ago

You raise a good point, it should be global. I haven't tested a multi-user scenario yet, but I will check this out.

CodySchrank commented 6 years ago

Yeah I see what you mean.

I think the bigger problem is that there should never be two instances of gSwitch running.

CodySchrank commented 6 years ago

Specifically, how did you launch the app with two different users? By logout, or terminal or what?

randyoo commented 6 years ago

On this machine, under System Preferences, Users & Groups, Login Options, "Show Fast User Switching" is enabled. With that menu, multiple users can share the same machine, each with their own segregated desktop instance.

Speculation here, but I assume that the ideal implementation would be a UI process that communicates with a backend process. The UI process could be launched by different users, and each of those UI processes would communicate with the same backend process.

CodySchrank commented 6 years ago

Ok thanks for letting me know. I'm going to fix some other problems first but I'll get to this one eventually.

CodySchrank commented 5 years ago

I'm still not sure how this was an issue because I was never able to reproduce it. The app seems to work fine for me with different users but I will leave the issue open

CodySchrank commented 5 years ago

Modes can be forced now so this is a nonissue.