DDC was afaik never officially supported, and whatever they did with the connection path means that there's enough reports of "crash whole OS trying to change brightness of display"
That's not necessary. There is ddcci-dkms which can be built against the running kernel and signed as all the other modules. I use it on both Ubuntu (via shim + grub) and Arch (via direct boot).
This allows controlling the screen brightness from the usual places (gnome power menu thingy or via light for the i3 crowd). See the Arch Linux Wiki for more info [0].
An eye saver with this ultra lightweight 16" USB-C travel monitor I picked up.
On resume from suspend the monitor always dims down to some ridiculously low setting, and without `ddcutil` I'd have to manually adjust the brightness via hardware toggle. As a workaround for the limitation of the monitor I just have a bash script that invokes `ddcutil` on resume from suspend - wonderful :)
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 in my very hacky solution.
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.
The famous Dropbox Mac finder hack. It may have been mythologized a little, as Rajiv Eranki was probably the genius hacker who figured it out.
> Here’s that rare Steve Jobs story, one that’s never been told, about the company that got away. Jobs had been tracking a young software developer named Drew Houston, who blasted his way onto Apple’s radar screen when he reverse-engineered Apple’s file system so that his startup’s logo, an unfolding box, appeared elegantly tucked inside. Not even an Apple SWAT team had been able to do that.
> Rajiv Eranki (early employee, no longer at Dropbox) did much of the reverse-engineering required to get the our file overlay icons onto files in the Finder, and also to get us into context menus.
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.
I did recently write a script to read the room brightness value from a Hue Light Sensor and adjust my external monitor brightness, with some smoothing applied. It was triggered by being stuck at home like everyone else.
Funny how similar thought processes can be sometimes. I’m now up to motorising my blinds so that the light sensor also controls the blinds to keep the room at the same light level through the day.
Not all that similar, I think. I did mine precisely so I can always keep the blinds open and also not get eyestrain.
I miss the roof deck at work. This time of year, weather and meeting schedule permitting, I'd typically spend somewhere between four and sixteen hours a week up there, enjoying the heat and watching ospreys, gulls, and the occasional peregrine while I waited for builds or test runs or whatever.
I think like many folks lately, I seem to have developed a touch of agoraphobia this year. But I need to at least be able to see outside, or I start to forget I exist.
Thanks for mentioning Lunar! I'm the developer of the app.
I've had a lot of feedback on it and users really helped me to fix most of the use cases so please give it a try. It has a lot of options to make it work just the way you want.
And if it doesn't, feel free to send me feedback. I'm still developing new features for it like weather aware adaptive brightness (for less brightness on those cloudy days), an external USB light sensor (for Mac Minis, clamshell mode Macbooks or even Hackintoshes) and a new curve fitting algorithm to better adapt the 0-100 curve when you adjust the brightness manually.
Would you expect Gatekeeper on High Sierra to just refuse to run a current build outright, without even the usual bypass options? I'm not sure if my IT department has been continuing the war against its own users, or maybe I've just put off updating too long.
Lunar is signed and notarized with a paid developer certificate so I don’t think gatekeeper could block it in anyway.
It’s possible that in High Sierra you are missing the Swift 5 runtime. You can find details about this in the troubleshooting section of the GitHub readme.
That did the trick, thanks! Weird that the error details would talk about code signing when the problem was a missing runtime, but go figure.
I've switched over to using Lunar as of this morning, following the runtime install. Unfortunately, it looks like today's going to be cloudy straight through, so I don't know that I'll get the best opportunity to see the app strut its stuff right away. That said, the UX has been very solid thus far, and I like the extensive configurability even if I have no intention of using more than about 5% of it.
No, but the only thing in it that isn't trivial or already discussed is the invocation for getting the internal display's current brightness values, which is this:
I wasn't sure if a Lenovo Monitor Plugged in via VGA to a Dell Dock to my MBP 13" would support DDC.
MonitorControl wasn't able to control my Brightness, it just set it to lowest level. This made me realise that there was some support to DDC, I tried trouble shooting using ddctl which was able to set the values, but not poll it.
Finally tried Lunar (https://lunar.fyi/) and it works like a charm. It's more of a set it and forget approach and has a unique UI.
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!
I don't have a touchbar mac to test, but does it work with external non-apple displays? Via Karabiner you can configure keys to change the external display brightness. Works great on a Thunderbolt Display. Completely ignores my Dell / LG.
The main reason why I think this wouldn't work is because in the display properties there's no brightness slider for non Apple external displays. There is one for Apple displays.
Oh wow great, I hope this works for me too! I have an LG 4K screen and the LG tool to change brightness and contrast is really terrible, it has some stupid built-in fake Picture in Picture mode which is constantly flashing red borders around the screen when you use it. And the UI is really bad and slow.
This little menubar control looks like just what I wanted.
Edit: Yes it works great! On my LG24UD58. Perfect!
Unfortunately it doesn't seem to work with my Eizo L568 but that's ancient. And I think it had some special USB-based control method. But really glad to be able to get rid of the LG software now.
PS: You have to enable the contrast with a tickbox, otherwise that slider is not shown.
The iMac light sensor controls the brightness of both monitors automatically. You can even insert a fixed offset to match the absolute brightness of both monitors.
But my Mac has no brightness sensor (it's a mini). I use the screen with my PC and a raspberry pi as well so I couldn't use an iMac, though I have one at the office (if I ever go back there...). It's really a shame they got rid of the target display function, this would have been perfect :(
You could try Lunar[1] for that issue. It supports any number of monitors and contains a workaround that seems to also work with multiple identical monitors that can't be uniquely identified through their EDID data.
There are still some issues with some multiple port docks but so far that only turned out to be hardware related.
I'm the developer of Lunar so feel free to ask any questions about it.
If this works for you, please also give Lunar[1] a try! It's free, and has a handy mode where it can sync your already adaptive built-in brightness to the external monitors.
I'm the developer of Lunar so feel free to ask any questions about it.
I have often wondered if you could exploit a monitor over the DDC bus sending i2c commands. There have just got to be memory corruption bugs in the display controller code.
They probably also typically have some flash memory, so perhaps one could permanently reprogram a monitor after the exploit?
Could monitors be malicious and exploit vulnerabilities in computers by sending corrupted data over the DDC bus?
The crazy thing is that computers send +5V over the DDC bus to the monitor so that they are able to read data even if the monitor is powered off and not connected to the mains! So, simply connecting something to the computer's display port could be enough.
Not if only someone could figure out how to make external monitors on mac actually work consistently. Macos still tends to not pick up the correct refresh rate or even the monitor itself.
OMG, thank you so much danso and all the developers of this app! This is the biggest inconvenience and overall PITA docking my MBP, it annoys me constantly on a daily basis. just tried it out, it's like my prayers were answered!
You could try Lunar[1] for that. It syncs your builtin monitor brightness to all your external monitors. As long as you have adaptive brightness enabled on your Macbook, the external monitors will also be adaptive.
Does anyone have trouble with their Macbook recognizing an external display? I have a new 2020 Macbook Pro and it struggles to recognize my Samsung display. I often have to reboot the Mac for it to be recognized.
I’ve got issues where macOS sees both monitors but won’t send output to both every time I come out of sleep. Like one of the displays will turn on like it has signal, then hang for a second and go back to sleep, repeat. I use a program called disable monitor, which shows all the profiles for the display. For some reason when one doesn’t connect it goes into the first profile for the resolution/refresh rate/color depth, then I manually select the third and it connects right away
I wonder wether there's some problem with the usb-c alternate modes and their implementations / drivers.
Below are a bunch of my experiences with this which shows that behaviours are all over the place which kind of excludes an outright broken OS or piece of equipment. To me it looks much more like a compatibility issue.
I don't own a usb-c mac, but I've never had any problems whatsoever with my 2013 retina, always works perfectly even with 4k@60Hz screens.
I have a desktop PC which exhibits the same kind of weird behaviour you have. It has a thunderbolt 3 / usb-c / dp connector which is downright awful.
I've managed to connect an Apple thunderbolt display to it with official tb2 -> tb3 adapter, it works well most of the time. Put the computer to sleep though and the screen never comes back on. Sometimes it doesn't detect the USB ports on it either. Mostly works if I force the thunderbolt mode to DisplayPort only in the bios.
I've next connected a regular usb-c monitor to it (DP alternate mode + usb2 for peripherals). Works great in bios. Mostly works on Linux. On windows it turns off when getting to the login screen. I don't know how, but I've managed to get it to work exactly once. When I turned the computer back on the next morning, it was again off on the windows login screen. The monitor IS detected, it shows up in the Display Preferences if I connect it to both usb-c and display port. It just won't turn on.
On Linux, it kinda works. I would say there's a 50/50 chance it won't detect it at 60 Hz. Sometimes, if it works at 60Hz, if the display goes to sleep it won't come back on at 60Hz. I guess at least there is some output, so it's got that going over windows.
I found an option on the bios to enable "high speed display output". No idea what exactly that means, it didn't do anything.
This same screen works perfectly with a usb-c (no thunderbolt) laptop on linux. Never had any issue, always detected as 4k@60Hz.
For those on Windows there's Twinkle Tray, works remarkably well. It has the ability to set timers, which I set to dim my monitor at night and increase the brightness during the day.
88 comments
[ 4.2 ms ] story [ 152 ms ] threadThis allows controlling the screen brightness from the usual places (gnome power menu thingy or via light for the i3 crowd). See the Arch Linux Wiki for more info [0].
Arch : ddcci-driver-linux-dkms (aur)
Ubuntu : ddcci-dkms
[0] https://wiki.archlinux.org/index.php/Backlight#External_moni...
On resume from suspend the monitor always dims down to some ridiculously low setting, and without `ddcutil` I'd have to manually adjust the brightness via hardware toggle. As a workaround for the limitation of the monitor I just have a bash script that invokes `ddcutil` on resume from suspend - wonderful :)
No one else in my house cares though.
Saved me from buying a new monitor or something silly like getting an iMac. Seriously weird why they don't just support DDD/CI natively.
https://github.com/robilic/DockHand
> Here’s that rare Steve Jobs story, one that’s never been told, about the company that got away. Jobs had been tracking a young software developer named Drew Houston, who blasted his way onto Apple’s radar screen when he reverse-engineered Apple’s file system so that his startup’s logo, an unfolding box, appeared elegantly tucked inside. Not even an Apple SWAT team had been able to do that.
> Rajiv Eranki (early employee, no longer at Dropbox) did much of the reverse-engineering required to get the our file overlay icons onto files in the Finder, and also to get us into context menus.
https://www.forbes.com/sites/victoriabarret/2011/10/18/dropb...
https://www.quora.com/Many-articles-about-Drew-Houston-say-t...
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.
Funny how similar thought processes can be sometimes. I’m now up to motorising my blinds so that the light sensor also controls the blinds to keep the room at the same light level through the day.
I miss the roof deck at work. This time of year, weather and meeting schedule permitting, I'd typically spend somewhere between four and sixteen hours a week up there, enjoying the heat and watching ospreys, gulls, and the occasional peregrine while I waited for builds or test runs or whatever.
I think like many folks lately, I seem to have developed a touch of agoraphobia this year. But I need to at least be able to see outside, or I start to forget I exist.
[1]: https://storage.googleapis.com/ta-share/2020-07-10.11.01.02....
I've had a lot of feedback on it and users really helped me to fix most of the use cases so please give it a try. It has a lot of options to make it work just the way you want.
And if it doesn't, feel free to send me feedback. I'm still developing new features for it like weather aware adaptive brightness (for less brightness on those cloudy days), an external USB light sensor (for Mac Minis, clamshell mode Macbooks or even Hackintoshes) and a new curve fitting algorithm to better adapt the 0-100 curve when you adjust the brightness manually.
It’s possible that in High Sierra you are missing the Swift 5 runtime. You can find details about this in the troubleshooting section of the GitHub readme.
Here is the link where you can download an installer for that: https://support.apple.com/kb/DL1998?locale=en_US
I've switched over to using Lunar as of this morning, following the runtime install. Unfortunately, it looks like today's going to be cloudy straight through, so I don't know that I'll get the best opportunity to see the app strut its stuff right away. That said, the UX has been very solid thus far, and I like the extensive configurability even if I have no intention of using more than about 5% of it.
Strong recommend, and definitely worth a coffee!
MonitorControl wasn't able to control my Brightness, it just set it to lowest level. This made me realise that there was some support to DDC, I tried trouble shooting using ddctl which was able to set the values, but not poll it.
Finally tried Lunar (https://lunar.fyi/) and it works like a charm. It's more of a set it and forget approach and has a unique UI.
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
More specifically it is called MCCS: https://milek7.pl/ddcbacklight/mccs.pdf
The main reason why I think this wouldn't work is because in the display properties there's no brightness slider for non Apple external displays. There is one for Apple displays.
This little menubar control looks like just what I wanted.
Edit: Yes it works great! On my LG24UD58. Perfect! Unfortunately it doesn't seem to work with my Eizo L568 but that's ancient. And I think it had some special USB-based control method. But really glad to be able to get rid of the LG software now.
PS: You have to enable the contrast with a tickbox, otherwise that slider is not shown.
The iMac light sensor controls the brightness of both monitors automatically. You can even insert a fixed offset to match the absolute brightness of both monitors.
But my Mac has no brightness sensor (it's a mini). I use the screen with my PC and a raspberry pi as well so I couldn't use an iMac, though I have one at the office (if I ever go back there...). It's really a shame they got rid of the target display function, this would have been perfect :(
If you have Swift experience please check the issues of the repo. Need assistance with the identical monitors issue, it’s there for two years already.
There are still some issues with some multiple port docks but so far that only turned out to be hardware related.
I'm the developer of Lunar so feel free to ask any questions about it.
[1] https://lunar.fyi
I didn't even know it was a thing and thought there was a special chip in the Apple screens to be able to control your screen from your computer.
I'm the developer of Lunar so feel free to ask any questions about it.
[1] https://lunar.fyi
They probably also typically have some flash memory, so perhaps one could permanently reprogram a monitor after the exploit?
The crazy thing is that computers send +5V over the DDC bus to the monitor so that they are able to read data even if the monitor is powered off and not connected to the mains! So, simply connecting something to the computer's display port could be enough.
This might not work with all monitors.
[1] https://lunar.fyi
Below are a bunch of my experiences with this which shows that behaviours are all over the place which kind of excludes an outright broken OS or piece of equipment. To me it looks much more like a compatibility issue.
I don't own a usb-c mac, but I've never had any problems whatsoever with my 2013 retina, always works perfectly even with 4k@60Hz screens.
I have a desktop PC which exhibits the same kind of weird behaviour you have. It has a thunderbolt 3 / usb-c / dp connector which is downright awful.
I've managed to connect an Apple thunderbolt display to it with official tb2 -> tb3 adapter, it works well most of the time. Put the computer to sleep though and the screen never comes back on. Sometimes it doesn't detect the USB ports on it either. Mostly works if I force the thunderbolt mode to DisplayPort only in the bios.
I've next connected a regular usb-c monitor to it (DP alternate mode + usb2 for peripherals). Works great in bios. Mostly works on Linux. On windows it turns off when getting to the login screen. I don't know how, but I've managed to get it to work exactly once. When I turned the computer back on the next morning, it was again off on the windows login screen. The monitor IS detected, it shows up in the Display Preferences if I connect it to both usb-c and display port. It just won't turn on.
On Linux, it kinda works. I would say there's a 50/50 chance it won't detect it at 60 Hz. Sometimes, if it works at 60Hz, if the display goes to sleep it won't come back on at 60Hz. I guess at least there is some output, so it's got that going over windows.
I found an option on the bios to enable "high speed display output". No idea what exactly that means, it didn't do anything.
This same screen works perfectly with a usb-c (no thunderbolt) laptop on linux. Never had any issue, always detected as 4k@60Hz.
The same monitor and same PC over DP: no problem.
I have a laptop with a Ryzen 3 and a 1660ti, so it might be the Nvidia graphics that is enabling this.
[0] https://smile.amazon.com/Cable-Matters-Multiport-DisplayPort...