Hacker News new | past | comments | ask | show | jobs | submit login

I've seen monitors with physical brightness/contrast buttons, but it's a difficult feature to search for. You have to see them in person or maybe look at their manuals before buying.

In the meantime, have you tried the DDC/CI protocol (https://en.wikipedia.org/wiki/Display_Data_Channel)? It's a software protocol for controlling real monitor brightness/contrast (as in, it commands the hardware, not just drawing gray overlays).

Windows: https://github.com/xanderfrangos/twinkle-tray

Mac: https://lunar.fyi/

Linux: https://github.com/ddccontrol/ddccontrol

On my computer, I bound the command line stuff to keyboard shortcuts. But the GUIs these days are probably even easier. I just tried TwinkleTray and it's way faster than using my monitor's hardware buttons and obnoxious OSD interface. And I double-checked that it does indeed change the actual brightness.

Dunno why operating systems don't just include this out of the box.




Lunar developer here. After working more than 5 years on this matter, I might have an idea why the OS doesn't include this by default.

Support for DDC is very spotty, with some monitors even crashing and losing video signal [1] on simple DDC commands, while others blocking DDC/CI completely [2] in favor of their "smart" features.

Other mainstream types of connections like DisplayLink don't support DDC in their UNIX drivers, and some converter chips like the MCDP29xx found inside the HDMI port of the Mac send wrong DDC signals.

It's been extremely exhausting to deal with users having these problems and blaming it on Lunar, while all I can say is "don't panic, nothing is broken, quit Lunar and power cycle your monitor".

I can't even imagine how it would be to deal with that on the multi-million users scale of an OS.

[1] https://lunar.fyi/faq#bad-ddc

[2] https://lunar.fyi/faq#brightness-not-changing


Thank you for that explanation!

If I remember correctly, I think I tried Lunar a few months ago and it didn't seem to have any impact (didn't crash, but didn't do anything). The same monitor can be controlled on Windows. I don't think I noticed the FAQ pages on the topic last time, so thanks for sharing that! I'll have to try it again for my work Mac and monitors.

The FAQ suggests that a lot of MacOS bugs and API limitations are preventing the commands from working properly. Do you think it might be possible to send those signals at a lower level over the wire, or does MacOS not let you do that? Sorry if that's a naive question... I don't know how that stuff works at all. (In fact, do I remember you discussing some of the challenges here on HN a while back...? Can't remember for sure)


Unfortunately we don't have access to lower level communication on macOS. Kexts (Kernel Extensions) have been deprecated and now need System Integrity Protection (SIP) to be disabled. Even with that, you wouldn't have a way to send raw I2C signals to the monitor like ddcctl does on Linux.

I do discuss these challenges regularly on HN, it's very possible you have read one of my comments.

Lunar provides a Raspberry Pi solution for cases where DDC is really needed and doesn't work from the Mac: https://lunar.fyi/#displaylink-control

The guide leans toward DisplayLink but in fact it works on any monitor, and it was the only solution for DDC when the first M1 Macs appeared: https://alinpanaitiu.com/blog/journey-to-ddc-on-m1-macs/#the...


Ah... thank you for all your work digging into that! Sorry it's such a pain :(

That Pi solution is really interesting. Does that mean monitors will generally accept DDC commands from inputs other than the active one? Like having the Pi connected to a second HDMI port lets you control brightness without switching inputs? That would be neat.

I wonder if there's some programmable dial type thing...


Yes, in my experience, most monitors do accept DDC commands even if the video signal comes from another input as long as the other input keeps the line busy.

For example, on the Pi this was not possible in past, we had to wait for the vc4-kms-v3d GPU driver to get this functionality. Thankfully it’s beta version coincided with the M1 release :)

There’s no DDC dial available, but it’s something I tried doing in the past using an ESP32 that gets Power-over-HDMI [1] and sends DDC through the I2C wires of the HDMI cable [2]

Unfortunately I had to put that on hold as I started a Mac app studio [3] which took most of my time away. (and I also realized I don’t have the means to sell and distribute a hardware project)

[1] https://www.hdmi.org/spec21sub/cablepower

[2] https://github.com/tttttx2/ddcvcp

[3] https://lowtechguys.com/


Thank you, this works great for my current monitor on Windows. This is a good replacement for what I need.


Glad it helps! I wish monitor manufacturers and operating systems would pay more attention to this kind of stuff.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: