Skip to content

Improve multi-user compatibility (BetterDisplay running in multiple instances under different users) #1705

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

Closed
taprobane99 opened this issue Mar 29, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request in progress Implementing released Released
Milestone

Comments

@taprobane99
Copy link

when the new disconnect built-in display when an external display is connected option is ticked, and then I switch to a different user also with that option ticked, the built in display continually switches on and off forever.

@waydabber
Copy link
Owner

Yeah, the two BetterDisplay processes probably start fighting who gets control. It is advised to disable connection management in case of the secondary user if possible. But will look into it how this could be solved.

@waydabber waydabber changed the title Disconnect built-in display bug in multi-user setup - bug Multi-user support for display disconnect feature (with multiple BetterDisplay instances running) Mar 30, 2023
@waydabber waydabber added the enhancement New feature or request label Mar 30, 2023
@waydabber waydabber changed the title Multi-user support for display disconnect feature (with multiple BetterDisplay instances running) Improve multi-user compatibility (BetterDisplay running in multiple instances under different users) May 8, 2023
@waydabber
Copy link
Owner

Some forms of brightness control interfere when the app is running in multiple instances under different users.

@waydabber
Copy link
Owner

waydabber commented May 12, 2023

The issue here is mostly with colortable manipulation and virtual screens but there are other issues. Any alterations should be disabled if the user that is running the app instance does not have the console.

The official way to check for this is to check kCGSessionOnConsoleKey in CGSessionCopyCurrentDictionary() (https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPMultipleUsers/Concepts/FastUserSwitching.html) - however it is probably not the best idea to do this on every slight change due to the overhead.

An other option (I am leaning towards this) is to simply prevent the app from running in multiple instances by adding LSMultipleInstancesProhibited to the app's properties.

@waydabber
Copy link
Owner

waydabber commented May 12, 2023

What I'll do is to put a kCGSessionOnConsoleKey check for events but also cache value so I won't recheck every time but only every 5 seconds or so if needed.

@waydabber waydabber self-assigned this May 12, 2023
@waydabber waydabber added in progress Implementing internal pre-release Enable internal pre-releases under Settings/Applications/Updates labels May 12, 2023
@waydabber waydabber added this to the v1.4.11 milestone May 12, 2023
@waydabber waydabber added released Released and removed internal pre-release Enable internal pre-releases under Settings/Applications/Updates labels May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request in progress Implementing released Released
Projects
None yet
Development

No branches or pull requests

2 participants