I am the happy owner of an Intel NUC dual booting Windows 8.1 and Ubuntu, hooked up to a great-looking Apple LED Cinema Display. The only problem is that the Apple display comes with no physical controls for brightness and Ubuntu doesn't seem to be able to adjust it either. Being a geek I was anything but content with this situation. I finally found a solution to control the brightness using keyboard shortcuts.

Step 1 - control the brightness from the command line

We need a way to control the brightness of the display. There's a handy tool called acdcontrol to do that. Unfortunately it's not been maintained for over eight years and doesn't support the 27" Apple LED Cinema Display I own. After searching high and low I found a few posts mentioning that I had to modify its code but the proposed changes didn't work. After more digging around and some creative use of lsusb, dmesg and monkeying around with the code of acdcontrol I came up with this patched version that does work.

Download it and extract it into a folder. For example, using the Terminal:

$ tar xzf acdcontrol-0.4-PATCHED.tar.gz $ cd acdcontrol-0.4 $ rm acdcontrol # removes my pre-built binary which may not work for you $ make

After a second or so the acdcontrol binary will have been build. Now we need to put it somewhere in our PATH and make it execute with root privileges. Yes, it really does need the root privileges :(

$ sudo cp acdcontrol /usr/local/bin 
$ sudo chown root:users /usr/local/bin/acdcontrol 
$ sudo chmod 0755 /usr/local/bin/acdcontrol 
$ sudo chmod +s /usr/local/bin/acdcontrol

Make sure that your display's USB cord is plugged in to your computer. The brightness control, just like the iSight camera and audio input/output, is sent to your display over USB. If you have a Thunderbolt display make sure that it's plugged into a Thunderbolt port. If you have a Thunderbolt display plugged into a Mini DisplayPort port you're out of luck, sorry. Now run the following:

$ acdcontrol --detect /dev/usb/hiddev*

It should reply with something like

Apple Cinema and Studio Display Control Program.
Please, use --about switch to learn more 
hiddev driver version is 1.0.4 
hiddev driver version is 1.0.4 
/dev/usb/hiddev1: USB Monitor - SUPPORTED. Vendor= 0x5ac (Apple), Product=0x9226[Apple Cinema HD Display 27"

See the part I put in bold type, /dev/usb/hiddev1? It may be different for you. If nothing is detected you will not be able to control the monitor brightness.

Part 2 - writing a script to step through the brightness

acdcontrol has a major shortcoming: it assumes that the brightness only takes values 0-255 when in fact it takes values 0-1000. This means that its documented method for stepping the brightness up and down simply doesn't work and results in a display too dark to read in most circumstances. For this reason - and because my knowledge of C isn't good enough to modify acdcontrol itself - we need to write our own script to work around that. Put the following code into a new file /usr/local/bin/brightness

HIDDEV=`acdcontrol --detect /dev/usb/hiddev* | grep -Po "/dev/usb/hiddev[0-9]"`
BRIGHTNESS=`acdcontrol $HIDDEV | grep -E '=[[:digit:]]*' -o | grep -E '[[:digit:]]*' -o`
if [[ $# -lt 1 ]]
case "$1" in
        up )
        down )
        set )
        * )
                echo"Usage: $0 {up|down|set} value"
                echo"The value is usually in per mille (one tenth of percent). 
Depends on monitor type."
                echo"$0 up 50 Increase brightness by 5%"
                echo"$0 down 50 Decrease brightness by 5%"
                echo"$0 set 500 Set brightness to 50%"
if [[ $BRIGHTNESS -lt 10 ]]
if [[ $BRIGHTNESS -gt 1000 ]]
acdcontrol $HIDDEV $BRIGHTNESS> /dev/null

Now let's make it executable:

$ sudo chmod +x /usr/local/bin/brightness

You can now step the brightness up and down using our script. Let's try it out:

$ brightness up 500 
# It will make the monitor much brighter 
$ brightness down 500 
# It will make the monitor much darker

If the brightness doesn't change double check your HIDDEV line. The value after the equals sign must be the one you determined at the end of step 1!

Step 3 - keyboard shortcuts

Now for the final touch, adding keyboard controls. Assuming that you're using Unity, the default Ubuntu Desktop interface, you just need to open System Settings and click on the Keyboard icon. In there click on the Shortcuts tab.

At the bottom of the list there's a plus (+) button. Click on it. Set:

  • Name: Brightness up
  • Command: /usr/local/bin/brightness up 50

Click on the plus icon a second time and add another entry with:

  • Name: Brightness down
  • Command: /usr/local/bin/brightness down 50

Our custom actions appear under the "Custom..." category and have no keyboard shortcut assignments. Click on the Inactive label to the right of each shortcut and press the key combination you want to use. I use CTRL-SHIFT-ALT-plus and CTRL-SHIFT-ALT-minus for the brightness up and down command respectively. Now try using the shortcuts you specified a few times. You'll see that each time you use the shortcut there's a small brightness change in your display. That was it! Now your Ubuntu Desktop can control the brightness of your display easily through the keyboard.

What about Kubuntu?

You can set up custom shirtcuts from KDE logo, Application, Settings, System Settings, Shortcuts, Custom Shortcuts. You can create a new Command/URL global shortcut and assign the scripts mentioned above. As for the shortcuts, I found that META-F1 and META-F2 work best without causing conflicts. Why F1/F2? This is where brightness down/up can be found on a Mac keyboard :)


The acdcontrol utility has the supported USB vendor and device ID list hard-coded into it. I only have one Apple display to test with. It is possible that different generations of Apple displays may use a different USB device ID. In this case you'll need to modify the source code of the utility yourself.

Brightness control requires a USB connection between your computer and display, obviously. With older Apple displays this is as simple as connecting the USB cord of your display to your computer. With the Thunderbolt display you only have one Thurderbolt cord which transfers both the video signal and the USB data. If your computer has a Thunderbolt port and you connect it there it will work. If your computer has a Mini DisplayPort you will get video output normally but all USB-related features, including brightness control, iSight camera and audio, will not work. There's no workaround for that.

Ubuntu Desktop has brightness controls and options under the Displays section of the system configuration. These will still not work. Ubuntu is not aware of the need to use acdcontrol for Apple displays. That's why we had to go through these steps to get brightness controls working in the first place.

18 thoughts on “Apple display brightness controls in Ubuntu Desktop”

  1. Wednesday, 08 November 2017 07:17
    I am using a 24in Apple display, but it doesn't automatically turn off on my Ubuntu 16.04.3 even I have set up energy saving options. Any idea?
    1. Wednesday, 08 November 2017 08:17
      If you connect a different monitor does it turn off?
  2. Sunday, 12 November 2017 02:47
    The link to the patched version of acdcontrol is broken. Would you mind reposting? I'd love to give this solution a try.
    1. Sunday, 12 November 2017 07:22
      I have updated the link. Can you please retry now?
      1. Sunday, 12 November 2017 19:24
        Thank you for restoring the link, Nicholas. It worked perfectly. Thank you also for the very clear directions. Incredibly useful!
        1. Sunday, 12 November 2017 19:31
          You're welcome :)
  3. Thursday, 16 November 2017 10:43
    I have a Apple Cinema HD Display 27" 2013. This worked for me on Kubuntu 16.04:

    git clone https://github.com/warvariuc/acdcontrol
    cd acdcontrol
    sudo python3 acdcontrol.py /dev/usb/hiddev1 65000

    hiddev driver version is 1.0.4
    Found supported product 9227 (Apple Cinema HD Display 27" 2013) of vendor 05ac (Apple).

    I didn't use any bash wrappers or c code (directly), it uses Python 3, which can be apt-get installed as python3 or similar.
  4. Wednesday, 04 April 2018 17:26
    What about support for 23" Cinema Display. driver version 1.0.4 returns 'Product 9223 is not supported.'
  5. Monday, 23 April 2018 09:42
    Thank you man! Worked like a charm for my 27" Cinema Display, minidisplay port version. And thanks for walking us through. Cheers from sunny south of France!
  6. Monday, 20 February 2017 17:54
    Hey man! This is really awesome because you found the right balance between showing a solution and having the user work through it - so he can actually learn from it!

    I use two 24" displays on my Shuttle barebone PC where I run Lubuntu 16.04.

    Now, I have two things to say. Firstly, in
    $ sudo chmod 0755 usr/local/bin/acdcontrol
    and the following line, there is a root

    Secondly, my devices show up, BUT are unsupported. The message I get after
    acdcontrol --detect /dev/usb/hiddev*

    Apple Cinema and Studio Display Control Program. Please, use --about switch to learn more

    hiddev driver version is 1.0.4

    /dev/usb/hiddev0: USB Monitor - UNSUPPORTED. Vendor= 0x5ac (Apple), Product=0x9236

    hiddev driver version is 1.0.4

    /dev/usb/hiddev1: USB Monitor - UNSUPPORTED. Vendor= 0x5ac (Apple), Product=0x9236

  7. Monday, 20 February 2017 18:33
    Hey, I found the solution. I deleted
    and installed this one (probably unpatched and fine with my 24" monitors: https://github.com/warvariuc/acdcontrol. You said your skript was usefull because the original acdcontrol had false values in its code. This does not seem to be the case for the fork I downloaded, thus I now use
    acdcontrol /dev/usb/hiddev0 200
    to adjust. Be aware that the github manual is missing the
    -part of the directory. Thank you very much, again! I use this setup for two years now and was never able to really set the brightness right.

    1. Tuesday, 21 February 2017 07:20
      Thanks for the heads up on the typo. I have fixed it now :)

      The 24" monitors seem to have been older than the codebase I was using. Likewise my 27" was too new. To be fair, that code was abandoned years ago. My fork only addressed the one missing monitor I own. I'm glad you found a version with your monitor. I had to go through the C code without knowing enough C :D
      1. Sunday, 12 November 2017 10:49
        That's the most interesting way of learning a language! :)
        1. Sunday, 12 November 2017 11:10
          True that, if you're actually interested in learning a programming language instead of getting something mundane done without driving yourself crazy :x
  8. Wednesday, 27 May 2020 06:53

    Thanks a lot for this post! Surprisingly enough, it helps also with monitors other than Apple or Samsung. For example, I'm using an LG UltraFine 27MD5KL with Linux.

    So now the monitor finally works with one single Thunderbolt, 5k60 and brightness control. \o/

    1. Wednesday, 27 May 2020 07:01

      That's great news! I knew about ddcutil but didn't have a monitor that supports the protocol. My only monitor with real brightness control is the Apple Cinema Display. I'm glad that you are trying to get a patch into ddcutil, it will help a lot having native control of the display instead of going through an external tool and scripts every time :)

      1. Wednesday, 27 May 2020 07:18

        It would be definitely awesome to have some desktop integration for these brightness controls one day, but it looks like the USB HID protocols are not well documented and differ from model to model and sometimes even change with firmware updates (at least on LG), which is somewhat annoying. At this point I'm happy about any brightness control, because the monitor came with its backlight set so low that it was hard to read. (And it has no control buttons on it, not even a switch.)