HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
kfix
ddcctl
C2016–2025
kfix / ddcctl

ddcctl

DDC monitor controls (brightness) for Mac OSX command line

15Distinct people
19Mentions
0Explicit recommenders
2KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

DDC monitor controls (brightness) for Mac OSX command line

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 12:45:45 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year19 dated mentions

Observed mentions: 2016-10-26 18:58:14 UTC to 2025-01-28 18:12:13 UTC.

0123452016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20162017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC101
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC110
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC202
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC101
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC505
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC202
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC505
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC110
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC000
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC101

What Hacker News says

19 sources
I received the same diagnostic in 2017, which coincided with the year I got my first external monitor for my MacBook. Headaches and eye pain became a more common occurence in the first weeks, until I stumbled upon ddcctl [0] and the fact that monitor brightness can be changed from the OS. That's when I developed the first version of Lunar (https://lunar.fyi) to adapt brightness automatically throughout the day based on the sun position in the sky. (reading the light sensor was not possible at the time) That combined with Night Shift (macOS native version of f.lux) fixed most of my problems. I also tried blue light filter glasses but the only effect they had was removing more money from my savings. I feel like this is just modern day snake oil for computer workers. In the end, what fixed all of my problems was a LASIK [1] operation (well a
Read the rest
ctually PRK because I had only a small abberation). I still recommend this to all my friends and relatives who are always complaining about their vision. It did change my life. I still cringe when someone turns on an overhead lightbulb though, I never use those in my home. Turns out this wasn't my astigmatism, it's just that most LED bulbs are simply too bright single point lights. I fit my home with TRADfri warm light lamps hidden behind sofa/door/desk [2], WLED-powered [3] LED strips and simple string lights (like you can see in the front page video on https://lowtechguys.com/volum/) [0] https://github.com/kfix/ddcctl [1] https://en.wikipedia.org/wiki/LASIK [2] https://www.ikea.com/gb/en/p/tradfri-remote-control-kit-smar... [3] https://kno.wled.ge/
In Ask HN: Best tips for reducing eyestrain while coding with astigmatism?
macOS apps which I share at https://lowtechguys.com/ bring me $7k/month on average at the moment, and it keeps growing. It started in 2017 when I shared the first free and open source version of Lunar (https://lunar.fyi/), an app for controlling monitors. At that time, there was only a command line for doing this stuff (https://github.com/kfix/ddcctl) and I wanted a more visual way of changing the brightness. So I learned Swift, learned how to bridge the ddcctl C code and call it from Swift, then made a rough interface and published it: https://www.producthunt.com/products/lunar#lunar-5 It turned out people did have a need for this and asked if they could donate. I set up a Buy me a Coffee page and in 4 years collected about $5k in donations. That's a lot of money for a Romanian. When Apple Silicon appeared, Lunar didn't work anymore beca
Read the rest
use the whole hardware arrangement and drivers were different, and there was no documentation on how to send I²C data. I took the plunge and quit my stressful job, bought an M1 MacBook and reverse engineered the I²C communication: https://alinpanaitiu.com/blog/journey-to-ddc-on-m1-macs/ Then published Lunar 4 as a Free version with a Pro paid upgrade. I was reluctant with this, didn't think anyone would buy it, but to this day I'm able to be unemployed and put my ideas into practice because of it.
In Ask HN: What is the best income stream you have created till date?
No worries! The same sentiment is what keeps me enthusiastic about programming day after day :) So computer monitors have support for a communication protocol called Display Data Channel which is normally used by the host (Mac, PC) to get info about supported resolutions, frame rates, signal timing etc. On top of that, a command interface has been created called MCCS or Monitor Control Command Set [1] which allows changing brightness, volume, input and a ton of other aspects of the monitor, by sending specific bytes through the cable. That cable can be HDMI, DisplayPort, Thunderbolt, VGA, DVI. It doesn’t matter, as long as it has dedicated wires to carry the I2C signal. I2C is the 2-wire communication protocol used by DDC, and it basically defines things like “a pulse of 5V (volts) of x milliseconds followed by 0V of y milliseconds means
Read the rest
the 0 bit. The 1 bit is represented by a pulse of 5V of 2x milliseconds”. It’s a bit more complex than that, also defining TCP-like features with data frames and ACK packets, but you get the idea. It’s something that both devices agree on so that they can send raw bytes using 5 volt pulses. I’ve created Lunar as an adaptive brightness app for macOS after finding out about a little CLI called ddcctl: https://github.com/kfix/ddcctl That’s where I learned how DDC packets look like, where to place the payload (brightness value between 0 and 100, input ID, etc) and how to write that to the monitor using the macOS I2C APIs. When Apple Silicon came out, none of that was possible anymore so I had to go looking around kernel assembly and private macOS frameworks for “the Apple Silicon way” of writing data through I2C. If you’re also curious how I learned that, it’s a very cool domain called “reverse engineering” and I learned it while working as a Malware Researcher at Bitdefender. A bit hard to get started, but so many gems to discover once you know how to open binaries in IDA/Hopper and look around their disassembled code. [1] https://milek7.pl/ddcbacklight/mccs.pdf
In HDMI Firewall
The goal for having the non-paid parts open source, is to share knowledge. I have to reverse engineer a lot of macOS internals and some hardware too to make some features possible. I don’t want to keep that for myself. This XDR thing makes an exception because it required a lot more RE work than I expected I’d like to get some publicity for it before open-sourcing and writing it up. I don’t think I can take advantage of the open source community here. The OSS community has largely chosen MonitorControl since it is fully open source, free and accepts contributions. I couldn’t have started Lunar without the open source ddcctl [0] project, and I want to give back as much as I can without jeopardizing sales and having to go back to a 9-to-5 job. [0] https://github.com/kfix/ddcctl
In Show HN: Lunar XDR Brightness control
I recall two things that people complained about with the Mac support - the USB-C charging was terrible because if you turn off the monitor it stops charging the laptop. I believe the same happens when the monitor sleeps. There is also this weird connectivity issue that happens if the mac with USB-C goes to sleep and the monitor is in use with another port. It keeps detecting/undetecting the USB-C port. I think it basically comes down to a lack of consistent power connection from the monitor to USB-C port. I knew about this problem and I just make sure my mac has a power brick plugged in. - the 2nd problem was that their isn't any Dell software for mac which means that all settings and switching is done through the buttons. Luckily, someone hacked this together. https://github.com/kfix/ddcctl Overall, the monitor is absolutely fantastic a
Read the rest
nd I would buy it again. I spent at least 40 hours researching monitors and looking for a high resolution (4kish), 32" or larger, IPS monitor. Everything else was either super expensive, out of stock/no longer made or had major problems.
In Ask HN: Favorite purchases of last two years?
You might want to check this out then: https://haim.dev/posts/2020-07-28-dual-monitor-kvm/ That was on HN earlier this year. Basically it's software that you run and set up to detect when certain peripherals connect/disconnect and have it switch the input on the monitor automatically. I've been using it and, while not always perfect, it actually works pretty well, especially considering the price. If you don't always want the monitor to switch inputs (sometimes I just want to quickly switch my keyboard/mouse to my laptop to do something but don't want to switch monitor inputs) you can also just set up shortcuts or scripts (I created an Alfred workflow, for example) and use something like https://github.com/kfix/ddcctl to switch monitor inputs.
In The beautiful Silent ThunderBolt-3 PC
Alongwith ddctrl (https://github.com/kfix/ddcctl), these aliases serve all my external monitor brightness needs: alias verydull="~/Software/ddcctl/ddcctl -d 1 -b 3 -c 15" alias dull="~/Software/ddcctl/ddcctl -d 1 -b 6 -c 35" alias decent="~/Software/ddcctl/ddcctl -d 1 -b 10 -c 40" alias medium="~/Software/ddcctl/ddcctl -d 1 -b 25 -c 50" alias bright="~/Software/ddcctl/ddcctl -d 1 -b 30 -c 50" alias morebright="~/Software/ddcctl/ddcctl -d 1 -b 35 -c 60" alias superbright="~/Software/ddcctl/ddcctl -d 1 -b 100 -c 80"
In Lunar – macOS utility to set brightness and volume on external monitors
Thank you for that! The built in Mac display brightness controls only seem to work for the Apple Cinema Displays - they do nothing on my Asus monitor. I just tried ddcctl ( https://github.com/kfix/ddcctl ) - and it worked perfectly over HDMI through a HDMI switch. I didn't even know what to look for - so this comment was a lot of help.
In Mac keyboard shortcuts
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.
In MonitorControl: Control external monitor brightness and volume on your Mac
On Mac, I wrote a config [1] which uses `ddcctl` [2] cli tool to sync both brightness and volume using keyboard buttons. It worked quite well, although I haven’t used it for a while. I guess similar idea could be extended for linux too. [1] https://github.com/prashnts/dotfiles/blob/master/etc/hammers... [2] https://github.com/kfix/ddcctl/blob/master/README.md Edit: Just noticed further down in the comments that an app exists for it now!
In VESA Publishes DisplayPort 2.0 Video Standard

Showing the 15 most recent of 19 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.