A user-friendly controller for adjusting brightness, contrast, and input source of external monitors via DDC/CI on Linux
๐ฅ Installation โข ๐ Usage โข โ๏ธ Configuration โข ๐ค Contributing
๐๏ธ Multiple Interfaces
- Command-line interface with intuitive commands
- Modern GUI with real-time sliders and system tray integration
- Background service for global hotkeys and automation
๐ Profile Management
- Pre-configured profiles: Day (bright), Night (dim), Gaming (max brightness)
- Custom profile creation from current monitor settings
- Automatic profile application on system startup
โจ๏ธ Global Hotkeys
Ctrl + Alt + 1/2/3
: Switch between profiles instantlyCtrl + Alt + โ/โ
: Quick brightness adjustment (+/-10%)- Fully customizable key combinations
๐ฅ๏ธ Multi-Monitor Support
- Automatic detection of DDC/CI compatible monitors
- Individual control per monitor via bus addressing
- Batch operations across all connected displays
๐ Quick Presets
- One-click presets in GUI: Day, Night, Gaming modes
- Percentage-based controls (0-100%) for easy adjustment
- Real-time feedback and error handling
Ubuntu/Debian:
sudo apt update
sudo apt install ddcutil i2c-tools
Arch Linux:
sudo pacman -S ddcutil
Fedora:
sudo dnf install ddcutil
- Monitor with DDC/CI support (most modern displays)
- DisplayPort or HDMI connection (recommended)
- I2C communication capability
# Add user to i2c group
sudo usermod -a -G i2c $USER
# Load i2c-dev module
sudo modprobe i2c-dev
echo 'i2c-dev' | sudo tee /etc/modules-load.d/i2c.conf
# Reboot or re-login to apply changes
# Clone and run the installation script
git clone https://github.com/philling-dev/monitor-brightness-control.git
cd monitor-brightness-control
chmod +x install.sh
./install.sh
The script automatically:
- โ Installs system dependencies
- โ Sets up I2C permissions and udev rules
- โ Installs the Python package
- โ Creates desktop entries
- โ Configures systemd service (optional)
# Install via pip
pip install monitor-brightness-control
# Or install from source
git clone https://github.com/philling-dev/monitor-brightness-control.git
cd monitor-brightness-control
pip install -e .
Monitor Detection:
# Detect available monitors
monitor-control detect
# Show detailed monitor information
monitor-control info
Brightness Control:
# Get current brightness
monitor-control brightness
# Set brightness to 80%
monitor-control brightness --value 80
# Control specific monitor (use bus number from detect)
monitor-control brightness --bus 4 --value 60
Contrast Control:
# Get current contrast
monitor-control contrast
# Set contrast to 75%
monitor-control contrast --value 75
Launch GUI:
monitor-gui
GUI Features:
- ๐๏ธ Real-time brightness and contrast sliders
- ๐ฏ Quick preset buttons (Day/Night/Gaming)
- ๐ System tray integration with minimize-to-tray
- ๐ Automatic monitor detection and refresh
- โก Instant feedback and error notifications
Start Background Service:
# Start service manually
python -m monitor_control.service start
# Check service status
python -m monitor_control.service status
Default Hotkeys:
Combination | Action |
---|---|
Ctrl + Alt + 1 |
Apply Day profile (80% brightness) |
Ctrl + Alt + 2 |
Apply Night profile (20% brightness) |
Ctrl + Alt + 3 |
Apply Gaming profile (100% brightness) |
Ctrl + Alt + โ |
Increase brightness (+10%) |
Ctrl + Alt + โ |
Decrease brightness (-10%) |
Configuration files are stored in ~/.config/monitor-control/
:
{
"auto_apply_on_startup": true,
"default_profile": "day",
"hotkeys_enabled": true,
"hotkeys": {
"day_profile": ["ctrl", "alt", "1"],
"night_profile": ["ctrl", "alt", "2"],
"gaming_profile": ["ctrl", "alt", "3"],
"brightness_up": ["ctrl", "alt", "up"],
"brightness_down": ["ctrl", "alt", "down"]
}
}
Contains saved profiles with brightness and contrast settings for each monitor. Profiles are automatically created and can be customized through the GUI or CLI.
Connection Type | Compatibility | Notes |
---|---|---|
โ DisplayPort | Full Support | Recommended for best compatibility |
โ HDMI | Full Support | Modern displays work well |
Limited Support | Digital DVI may work | |
โ VGA | Not Supported | Analog connections don't support DDC/CI |
- โ Ubuntu 20.04+ / Linux Mint 20+
- โ Debian 11+
- โ Fedora 35+
- โ Arch Linux / Manjaro
- โ openSUSE Leap/Tumbleweed
- ๐งช Other distributions (community tested)
# Install ddcutil package
sudo apt install ddcutil # Ubuntu/Debian
sudo pacman -S ddcutil # Arch Linux
sudo dnf install ddcutil # Fedora
# Test ddcutil directly
ddcutil detect
# Check I2C permissions
ls -la /dev/i2c-*
groups $USER # Should include 'i2c'
# Reload I2C module
sudo modprobe -r i2c_dev && sudo modprobe i2c_dev
# Add user to i2c group and reboot
sudo usermod -a -G i2c $USER
sudo reboot
- โ Enable DDC/CI in monitor's OSD menu
- โ Switch monitor to "PC" mode (not "Console" mode)
- โ Try DisplayPort cable instead of HDMI/DVI
- โ Update monitor firmware if available
# Enable user service
systemctl --user enable monitor-control.service
systemctl --user start monitor-control.service
# Check status
systemctl --user status monitor-control.service
A desktop entry is automatically created at:
~/.local/share/applications/monitor-control.desktop
This adds "Monitor Control" to your application menu.
src/monitor_control/
โโโ __init__.py # Package initialization
โโโ ddc.py # DDC/CI interface with ddcutil
โโโ cli.py # Command-line interface
โโโ gui.py # PyQt6 graphical interface
โโโ profiles.py # Profile management and hotkeys
โโโ service.py # Background service
- DDCController: Low-level ddcutil wrapper with error handling
- ProfileManager: Saves/loads monitor configurations and settings
- HotkeyManager: Global keyboard shortcut handling
- MonitorControlService: Background daemon for automation
We welcome contributions! Here's how you can help:
- ๐ด Fork the repository
- ๐ Create a feature branch (
git checkout -b feature/amazing-feature
) - ๐ป Commit your changes (
git commit -m 'Add amazing feature'
) - ๐ค Push to the branch (
git push origin feature/amazing-feature
) - ๐ Open a Pull Request
git clone https://github.com/philling-dev/monitor-brightness-control.git
cd monitor-brightness-control
python -m venv venv
source venv/bin/activate
pip install -e .
pytest # Run tests
If this project was helpful to you, please consider supporting its development:
To donate, copy the address below:
1Lyy8GJignLbTUoTkR1HKSe8VTkzAvBMLm
This project is licensed under the MIT License - see the LICENSE file for details.
- ๐ ddcutil - The foundation tool for DDC/CI communication
- ๐ง The Linux community for making advanced monitor control possible
- ๐งช Contributors and testers who help improve compatibility
- ๐ Monitor input source switching
- ๐ Time-based automatic profiles
- ๐ Ambient light sensor integration
- ๐ Web interface for remote control
- ๐ Limited macOS support exploration
- ๐ฑ Application-specific profiles
- ๐ REST API for automation
Star โญ this repository if it helped you!
Report Bug โข Request Feature โข Documentation