Arch Display Brightness and Night Mode
This setup controls laptop brightness with brightnessctl, external monitor hardware brightness with ddcutil, and blue light reduction with redshift. It is useful for an Arch Linux i3 workstation with one laptop screen and one or more external monitors.
Overview
Section titled “Overview”- Use brightnessctl for the laptop screen exposed under /sys/class/backlight.
- Use ddcutil for external monitors that support DDC/CI brightness control.
- Use redshift -O for manual blue light reduction across active X11 displays.
- Use redshift -x to reset the screen color temperature back to normal.
- Create one all-bright command to set laptop and external monitor brightness together.
- Keep brightness and night mode separate so they can be adjusted independently.
Install required tools
Section titled “Install required tools”Install brightnessctl for the laptop backlight, ddcutil and i2c-tools for external monitor brightness, and redshift for manual night mode.
sudo pacman -S brightnessctl ddcutil i2c-tools redshiftCheck laptop backlight device
Section titled “Check laptop backlight device”The laptop screen is controlled through a backlight device. The device name depends on the machine and GPU. Common examples include nvidia_0, intel_backlight, and amdgpu_bl0.
ls /sys/class/backlightbrightnessctlUse the detected device name when setting brightness explicitly. Replace nvidia_0 with the device name shown on your system.
brightnessctl -d nvidia_0 set 40%Enable external monitor DDC access
Section titled “Enable external monitor DDC access”External monitors are controlled through DDC/CI over i2c. Load the i2c-dev module before using ddcutil.
sudo modprobe i2c-devddcutil detectMap detected displays
Section titled “Map detected displays”- Use ddcutil detect to find the external monitor display numbers.
- External monitor 1 is usually controlled with ddcutil –display 1.
- External monitor 2 is usually controlled with ddcutil –display 2.
- The laptop display may appear as an invalid DDC display because laptop panels usually do not support DDC/CI.
- Use brightnessctl for the laptop display.
- Use ddcutil for each detected external monitor.
ddcutil detectCheck external monitor brightness
Section titled “Check external monitor brightness”VCP code 10 is the standard DDC/CI brightness control. Use getvcp before changing brightness to confirm monitor support.
ddcutil --display 1 getvcp 10ddcutil --display 2 getvcp 10Set external monitor brightness manually
Section titled “Set external monitor brightness manually”Set each external monitor brightness with ddcutil. The value is usually between 0 and 100. Add or remove display lines depending on how many external monitors are detected.
ddcutil --display 1 setvcp 10 40ddcutil --display 2 setvcp 10 40Create all-bright command
Section titled “Create all-bright command”Create one command that sets the laptop screen and external monitors to the same brightness value. Replace nvidia_0 with the laptop backlight device detected on your system. Add or remove ddcutil display lines depending on the number of external monitors.
nano ~/.local/bin/all-bright#!/usr/bin/env bash
VALUE="$1"
if [ -z "$VALUE" ]; then echo "Usage: all-bright 40" exit 1fi
brightnessctl -d nvidia_0 set "$VALUE%"
ddcutil --display 1 setvcp 10 "$VALUE"ddcutil --display 2 setvcp 10 "$VALUE"chmod +x ~/.local/bin/all-brightMake local scripts available in shell
Section titled “Make local scripts available in shell”The ~/.local/bin folder must be in PATH so all-bright can be called from any terminal.
grep -q 'HOME/.local/bin' ~/.bashrc || echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrcsource ~/.bashrccommand -v all-brightManual night mode with redshift
Section titled “Manual night mode with redshift”Use redshift in one-shot mode for manual blue light reduction. This changes color temperature across active X11 displays and can be reset manually.
redshift -O 3500redshift -xRedshift temperature reference
Section titled “Redshift temperature reference”- redshift -O 4500 gives a mild warm screen.
- redshift -O 4000 gives a moderate warm screen.
- redshift -O 3500 gives a clear night mode look.
- redshift -O 3000 gives a stronger orange night mode look.
- redshift -x resets the color temperature back to normal.
Daily usage
Section titled “Daily usage”Use these commands manually depending on the time of day and room lighting.
# Set all screens to a comfortable daytime brightnessall-bright 70
# Set all screens to a lower evening brightnessall-bright 40
# Enable manual night mode with reduced blue lightredshift -O 3500
# Disable night mode and return colors to normalredshift -x
# Evening setup with lower brightness and warmer color temperatureall-bright 40redshift -O 3500
# Daytime setup with higher brightness and normal color temperatureall-bright 70redshift -xTroubleshooting
Section titled “Troubleshooting”- If brightnessctl only changes the laptop screen, this is expected.
- If the explicit brightnessctl device does not exist, check the available device with ls /sys/class/backlight.
- If ddcutil detect does not show external monitors, load i2c-dev with sudo modprobe i2c-dev.
- If ddcutil works with sudo but not as normal user, add the user to the i2c group and log out and back in.
- If redshift changes color but not brightness, this is expected because redshift controls color temperature, not hardware brightness.
- If redshift does not affect all monitors, confirm the session is running on X11 and not Wayland.
ls /sys/class/backlightsudo modprobe i2c-devsudo usermod -aG i2c "$USER"echo "$XDG_SESSION_TYPE"