Code Monkey home page Code Monkey logo

dcc-ci-monitor-brightness-control's Introduction

Simple brightness control

This is a simple application to set monitor brightness on Windows desktop PCs. Many monitors allow sending commands using DDC/CI, a standard from all the way back in 1998.

Usage notes

Recent Windows versions do not by default display icons in the notification area (aka. system tray).

In Windows 11 you will have to open Taskbar settings, open “Other system tray icons” and enable the brightness_slider.exe item. You’ll probably want to do this after installing the executable in its final position.

In older versions the icon will show up in the overflow area.

Putting utilities like this over there is officially frowned upon, and the official recommendation is to use a task bar icon. But guess where the volume control is. In the system tray it goes.

If you want to run this on start-up, the old trick of dropping a shortcut in "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup" still works. (you can open this folder by entering shell:startup in the Run dialog.)

Building

This project depends on JUCE, see the JUCE CMake documentation on how to find it. If you don’t have a system-wide JUCE install you can clone their repository and set USE_JUCE_DIR to the path to the checkout.

Technical notes

This uses the Low-Level Monitor Configuration Functions in the Windows API to send VCP codes to your monitors using DDC/CI commands. There are also High-Level Monitor Configuration Functions but they work only if your monitor reports one of a few specific supported MCCS versions.

You can find the standard somewhere, or ask VESA kindly if you can have a copy, but the relevant part for us is that code 0x10 sets the brightness, and code 0x12 sets the contrast.

The brightness is always set to the same percentage for all monitors, which may not mean they actually get the same brightness, but for now no compensation for that was implemented yet. For the contrast setting you can specify which level counts as ‘neutral’ (i.e. using the full panel brightness, but with no clipped highlights).

Monitor support

This works with all monitors I tested. The oldest one probably from around 2010.

So why does Windows normally only show a brightness slider for laptop screens? For one thing, the OEM knows which screen is in that laptop and can provide some known working thing, somewhere. Probably the write cycle thing doesn’t apply to laptop screens. Maybe this is broken for sufficiently many monitors that Microsoft decided it is not worth the trouble ¹. Who knows.

Write cycles

There is some speculation that monitors may store these settings in EEPROM. This may only be rated for 100,000 write cycles. That is a bit more than 50 per day, for 5 years. If you are the type of person who tinkers around with these settings, you will easily achieve that rate. The same goes for some widget that measures ambient light and updates the brightness.

I don’t know if this is an actual thing, but still, there is always some risk in doing uncommon things like this.


¹ There is precedent for this. Windows 95 did not issue halt instructions to save CPU power, this was because it would cause many laptops to lock up.

dcc-ci-monitor-brightness-control's People

Contributors

roelandschoukens avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.