Adjusting External Monitor Brightness on Ubuntu 25.04: A Comprehensive Guide

Screenshot From 2025 04 18 23 01 12

When working with external monitors on Ubuntu, adjusting the brightness of the external monitor connected to your laptop can often be a challenge, especially when traditional methods fail or when you’re working with specific hardware like NVIDIA GPUs or USB-C to HDMI adapters. Many users struggle with issues such as brightness settings not being adjustable or xrandr and ddcutil commands failing, even when everything seems to be set up correctly.

After installing the latest Ubuntu 25.04 Plucky Puffin, I found myself in a similar situation where my external monitor’s brightness was already at its lowest, yet it was still too bright for many users, leading to frustration. In this guide, we will explore multiple ways to adjust the brightness of your external monitor on just-launched Ubuntu 25.04 and add a special focus on the Xorg solution—an option that could save the day when everything else fails.

( Skip to Method 3 if you want a simple solution – Also check that Bonus Github Script )

Method 1: Using xrandr (Basic Brightness Control)

One of the most common methods to adjust brightness on Ubuntu is through xrandr, which allows users to manipulate various display properties directly from the terminal. For external monitors, you can try the following:

xrandr --output HDMI-A-0 --brightness 0.7

However, xrandr’s --brightness option has limited effectiveness, especially for certain monitors and drivers. It doesn’t directly change the hardware brightness but simulates brightness by adjusting the display’s gamma, which may not always work as expected.

It also usually doesn’t work these days on Ubuntu Wayland versions.

Method 2: Using ddcutil (DDC/CI Communication)

If you need to adjust hardware brightness (as in the actual brightness level controlled by the monitor), ddcutil is a great tool, provided your monitor supports DDC/CI (Display Data Channel/Command Interface). You can install it using the following command:

sudo apt install ddcutil

Once installed, you can attempt to adjust the brightness using ddcutil:

ddcutil setvcp 0x10 50

Unfortunately, this method doesn’t always work due to compatibility issues between the software, the monitor, and the connection type (such as USB-C to HDMI). You might encounter errors like:

DDCRC_READ_ALL_ZERO

Method 3: Switching to Xorg (A Potential Solution)

If traditional methods like xrandr and ddcutil fail, switching to Xorg could be a game-changer. By default, many modern Ubuntu systems use Wayland as the display server. However, Xorg might offer better compatibility with certain monitors, especially when it comes to adjusting external monitor brightness.

Why Switch to Xorg?

  • Better compatibility with legacy hardware and drivers.
  • Improved handling of external monitors and DDC/CI.
  • If your external monitor is not behaving as expected under Wayland, switching to Xorg can help address issues related to brightness control.

How to Switch to Xorg ( Recommended APproach )

Switching to Xorg on Ubuntu is simple. Follow these steps:

  1. Log Out from your current session.
  2. On the login screen, click on the gear icon (⚙️) down in the bottom right corner and select Ubuntu on Xorg.
  3. Log back in.

Alternatively, if you want to make Xorg the default display server:

  1. Edit the GDM configuration file: sudo nano /etc/gdm3/custom.conf
  2. Uncomment (remove the #) the line that says WaylandEnable=false.
  3. Save and exit the file, then reboot your system: sudo reboot

After switching to Xorg, you should see improved compatibility with xrandr, ddcutil, and other display tools, particularly for external monitors.

What Worked After Switching to Xorg

After switching to Xorg, I found that the xrandr command worked properly, but I had to first determine the correct monitor identifier. I used the following command to list all connected monitors:

xrandr | grep connected

This showed me the monitor I needed to target. Once I had the correct output identifier, I was able to adjust the brightness successfully:

xrandr --output HDMI-A-0 --brightness 0.7

Additionally, I found that xgamma could be used to adjust the gamma of the display. This is useful for fine-tuning the color and brightness in a different way, though it’s more of a gamma correction tool rather than a direct brightness control. To adjust the gamma, you can use the following command:

xgamma -display :0 -gamma 0.5

This command adjusts the gamma to 0.5, effectively darkening the screen (or brightening, depending on the value). While it doesn’t directly control the monitor’s brightness, it’s a good option for tweaking the overall appearance.

Persisting xrandr and xgamma Settings Across Reboots

Unfortunately, both xrandr and xgamma settings are temporary and will not survive a reboot or logout by default. When you log out or reboot, the display settings are reset, and you’ll need to reapply them after logging in again.

Workaround for Persistence:

To make these settings persist across reboots or logouts, you can create a startup script to automatically apply the settings when you log in. Here’s how you can do it:

  1. Open a terminal and create a new script file: vi ~/set_display_brightness.sh
  2. Add the xrandr and/or xgamma commands to this script. For example: #!/bin/bash
    xrandr --output HDMI-A-0 --brightness 0.7
    You have to find your monitor name by running the command xrandr | grep connected ( For me, it’s HDMI-A-0 ) – WARNING – Don’t use 0 as the brightness value – your screen will go Black.
  3. Save the file and close the editor.
  4. Make the script executable: chmod +x ~/set_display_brightness.sh

Set the Script to Run on Startup

You can configure Ubuntu to run this script automatically when you log in:

  1. Press Alt + F2, type gnome-session-properties, and press Enter to open the Startup Applications Preferences.
  2. In the Startup Applications Preferences, click Add to add a new startup program.
  3. In the Name field, enter something descriptive, such as Set Display Brightness.
  4. In the Command field, enter the full path to the script, like: /home/yourusername/set_display_brightness.sh
  5. Click Add, then Close.

Now, each time you log in, the script will run automatically and set your brightness settings to your preferences.

BONUS: A Bash Script to Create a System Tray Icon to Adjust Brightness ( for Ubuntu on Xorg only ) – Github link.

image

Save your eyes.

Exit mobile version
%%footer%%