waydabber / BetterDisplay

Unlock your displays on your Mac! Flexible HiDPI scaling, XDR/HDR extra brightness, virtual screens, DDC control, extra dimming, PIP/streaming, EDID override and lots more!
https://betterdisplay.pro
18.76k stars 333 forks source link

Universal nits based brightness sync mapping system for synchronization #1393

Open jhildenbiddle opened 1 year ago

jhildenbiddle commented 1 year ago

I'd love to see BetterDisplay offer a simple form of multi-monitor brightness sync. I've tried Lunar Pro but found for all of its sophisticated controls and auto-adjusting brightness curves it simply does not do what I expect.

Here's my setup:

The brightness of these two displays matches when the MacBook Air is at 80% and the LG monitor is @ 100%. This is the brightness ratio I would like to maintain when adjusting the brightness of both displays. A conceptually simple way to accomplish this would be as follows:

  1. Allow specifying a max brightness level for each display. In my case, I would set the MBA to 80%.
  2. Allow specifying that max brightness levels can by applied 1) when connected to an external monitor (default) or 2) always. This will allow users to enjoy their laptop display at full brightness when not connected to other displays they are trying to sync brightness with.
  3. When increasing the brightness, ensure that all displays reach their max brightness at the same time.
  4. When decreasing the brightness, ensure that all displays should reach zero at the same time.

Unfortunately, this is not how brightness levels are adjusted as of BetterDisplay v1.3.10b:

- ↓1 ↓2 ↓3 ↓4 ↓5 ↓6 ↓7 ↓8 ↓9 ↓10 ↓11 ↓12 ↓13 ↓14 ↓15 ↓16
LG 100 94 88 81 75 69 62 56 50 44 38 31 25 19 12 6 0
MBA 80 75 69 62 57 50 44 38 32 25 19 12 6 0 0 0 0

This is how I would like to see BetterDisplay enforce max brightness and and adjust levels using my setup as an example:

Max ↓1 ↓2 ↓3 ↓4 ↓5 ↓6 ↓7 ↓8 ↓9 ↓10 ↓11 ↓12 ↓13 ↓14 ↓15 ↓16
LG 100 94 88 81 75 69 62 56 50 44 38 31 25 19 12 6 0
MBA 80 75 70 65 60 55 50 45 40 35 30 25 20 15 10 5 0

Thanks!

waydabber commented 1 year ago

Yes, you want to brightness-match displays, that's understandable. However supporting this and various other ways of brightness syncing (keep delta, factor in XDR/HDR upscaling, manage mismatching lower values - for DDC brightness only there is a low treshold, no dimming to zero - etc) makes syncing eventually complicated. :) I'll take a deep breath and dive into it eventually as it's continuously on my TODO list.

waydabber commented 1 year ago

Related to https://github.com/waydabber/BetterDisplay/issues/849

jhildenbiddle commented 1 year ago

Understood on the complexities. I have no doubt that if it was easy it would be done. :)

Appreciate your time and consideration, @waydabber. Keep up the great work and I'll keep my fingers crossed brightness sync gets added to the feature list eventually.

waydabber commented 5 months ago

Hmm. This is a bit more complicated than I thought as the syncing mappings are different for all two pairs of displays + for brightness it further depends on various factors like HDR is enabled or not, brightness upscaling is available or not etc. Need to think a bit about how to implement it in a way that makes sense. Tying everything to keyboard OSD steps do not make much sense as that won't work properly with sync.

waydabber commented 5 months ago

So what I should do is to create a syncing mapping section under "Groups" that can be generally used to affect syncing among source and target displays for various controls. There should be some additional specifiers (like HDR enabled/not etc) for a sync mapping. Syncing should then take the mappings into consideration when available for a source->target pair. Multi screen keyboard control should then be linked up with syncing (#2826) so that way the mapping will take effect when using keyboard for control.

Mapping should be bi-directional (probably).

waydabber commented 5 months ago

Thinking more about this, mapping is not really needed for anything besides Brightness. For brightness an universal nits based system (that can act as a common base for matching display brightness levels) is probably better. An optional table could be defined for every display that contains the nits curve, the app then can map brightness differences between any two displays this way. This should work both for syncing and keyboard control.

jhildenbiddle commented 5 months ago

Sounds good. Happy to take the concept for a test drive if/when it's ready. :)