Live data from Hacker News

MonitorControl: Control external monitor brightness and volume on your Mac

github.com

11–20 of 89 posts

Re: MonitorControl: Control external monitor brightness and volume on your Mac

#11
For a command-line option, ddcctl (https://github.com/kfix/ddcctl) works nicely in my experience, with a Dell Ultrasharp connected via USB-C.

I have a script hacked together to fetch the internal display's brightness once a minute and apply it, with a scaling factor, to the external, so that they're both effectively controlled by the laptop's ambient light sensor. It's really nice for working in a room with lots of windows.

A more batteries-included alternative, which appears to also provide brightness sync, is Lunar (https://lunar.fyi/). I haven't had a chance to try it, but the Github repo makes it look pretty solid.

Re: MonitorControl: Control external monitor brightness and volume on your Mac

#12
Wow, I didn't know this was even possible. It says the controls operate via DDC [1].

How do you know if your monitor, television, or project supports this? And does it depend on the connector used? (HDMI, DisplayPort, VGA?)

Does this work for most display peripherals, only newest/expensive ones, or something in between?

[1] https://en.wikipedia.org/wiki/Display_Data_Channel

Re: MonitorControl: Control external monitor brightness and volume on your Mac

#13
post #8

Great codebase. I stumbled on this while trying to figure out how to programmatically control screen brightness in a macOS app. Turns out that this is far more difficult than imagined. Even controlling just the built-in screen, something I assumed would be included in Apple's libraries, was not included. The source code in MonitorControl is very well written and commented and helped me catch the mistakes I was doing…

Doing anything on macOS is more difficult than I imagine it to be. For example, writing an alt-tab-type app, enumerating the list of apps and their windows. Good luck.

Re: MonitorControl: Control external monitor brightness and volume on your Mac

#14

Wow, I didn't know this was even possible. It says the controls operate via DDC [1]. How do you know if your monitor, television, or project supports this? And does it depend on the connector used? (HDMI, DisplayPort, VGA?) Does this work for most display peripherals, only newest/expensive ones, or something in between? [1] https://en.wikipedia.org/wiki/Display_Data_Channel

I also have absolutely no idea this was possible. Just tested it on my 2015 MBP with relatively cheap AOC 27" 4K and DisplayPort and it works perfectly!

Re: MonitorControl: Control external monitor brightness and volume on your Mac

#15

Wow, I didn't know this was even possible. It says the controls operate via DDC [1]. How do you know if your monitor, television, or project supports this? And does it depend on the connector used? (HDMI, DisplayPort, VGA?) Does this work for most display peripherals, only newest/expensive ones, or something in between? [1] https://en.wikipedia.org/wiki/Display_Data_Channel

Same. It looks like most of the heavy lifting comes from this library. There's a lot of commands available. https://github.com/reitermarkus/DDC.swift/blob/master/DDC/DD...

Re: MonitorControl: Control external monitor brightness and volume on your Mac

#17
post #4

On linux: `ddcutil setvcp 0x10 + ` to increase brightness (and - to lower it). Ymmv.

Alternatively, you could use kernel module to expose it as standard backlight control: https://milek7.pl/ddcbacklight/ddcci_bl.c

    insmod ddcci_bl.ko
    modprobe i2c-dev
    echo ddcci_bl 0x37 > /sys/bus/i2c/devices/i2c-2/new_device     (replace i2c-2 with bus number for your monitor)

Re: MonitorControl: Control external monitor brightness and volume on your Mac

#20

Wow, I didn't know this was even possible. It says the controls operate via DDC [1]. How do you know if your monitor, television, or project supports this? And does it depend on the connector used? (HDMI, DisplayPort, VGA?) Does this work for most display peripherals, only newest/expensive ones, or something in between? [1] https://en.wikipedia.org/wiki/Display_Data_Channel

It works for virtually all monitors on HDMI/DisplayPort/VGA. I guess not for TVs.

More specifically it is called MCCS: https://milek7.pl/ddcbacklight/mccs.pdf

Post reply on HN