customresolution
A CLI tool that creates custom EDID profiles for Linux. Generate custom screen resolutions and load them via the kernel's drm_kms_helper.edid_firmware parameter.
Installation
go install github.com/guillermo/customresolution@latest
Or build from source:
git clone https://github.com/guillermo/customresolution.git
cd customresolution
go build -o customresolution .
Usage
List Connected Displays
customresolution list
Shows all connected displays with their current EDID information:
DISPLAY STATUS RESOLUTION NAME MANUFACTURER
card1-DP-1 connected 2560x1440 Dell S2722QC DEL
card1-HDMI-A-1 disconnected - - -
card1-eDP-1 connected 1920x1080 Internal BOE
Generate Custom EDID
Create an EDID for a specific resolution:
customresolution generate --width 2560 --height 1440 --refresh 60 -o custom.bin
Or use a preset:
customresolution generate --preset ultrawide-1440 -o ultrawide.bin
Options:
-W, --width - Horizontal resolution in pixels
-H, --height - Vertical resolution in pixels
-r, --refresh - Refresh rate in Hz (default: 60)
-o, --output - Output filename
-p, --preset - Use a preset resolution
-n, --name - Custom monitor name in EDID
List Presets
customresolution presets
Available presets include:
| Name |
Resolution |
Refresh |
Description |
| 1080p |
1920x1080 |
60Hz |
Full HD |
| 1440p |
2560x1440 |
60Hz |
QHD |
| 4k |
3840x2160 |
60Hz |
4K UHD |
| ultrawide-1080 |
2560x1080 |
60Hz |
Ultrawide Full HD (21:9) |
| ultrawide-1440 |
3440x1440 |
60Hz |
Ultrawide QHD (21:9) |
| superwide |
5120x1440 |
60Hz |
Super Ultrawide (32:9) |
| 1080p144 |
1920x1080 |
144Hz |
Full HD 144Hz |
| 1440p144 |
2560x1440 |
144Hz |
QHD 144Hz |
Install EDID
Install the EDID binary to /lib/firmware/edid/ and get instructions:
sudo customresolution install custom.bin DP-1
This will:
- Copy the EDID to
/lib/firmware/edid/
- Show the kernel parameter to add
Parse Existing EDID
Inspect an EDID file:
customresolution parse custom.bin
customresolution parse --hex custom.bin # with hex dump
Kernel Configuration
After generating and installing an EDID, configure the kernel to use it:
GRUB (Permanent)
Edit /etc/default/grub:
GRUB_CMDLINE_LINUX="drm.edid_firmware=DP-1:edid/custom.bin"
Then run:
sudo update-grub
sudo reboot
Temporary (Until Reboot)
echo 'DP-1:edid/custom.bin' | sudo tee /sys/module/drm/parameters/edid_firmware
Multiple Displays
Separate multiple displays with commas:
GRUB_CMDLINE_LINUX="drm.edid_firmware=DP-1:edid/custom.bin,HDMI-A-1:edid/hdmi.bin"
Use Cases
- Force a specific resolution on displays that don't advertise it
- Override faulty EDID on cheap monitors/cables
- Create custom resolutions for retro gaming
- Test display drivers with specific timing parameters
- Work around scaling issues on HiDPI displays
How It Works
EDID (Extended Display Identification Data) is a data structure that displays send to graphics cards to describe their capabilities. This tool:
- Parses existing EDID from
/sys/class/drm/*/edid
- Generates valid 128-byte EDID structures with CVT timing
- Installs EDID to
/lib/firmware/edid/ for kernel loading
The generated EDID includes:
- Detailed timing descriptor with calculated CVT timings
- Display range limits
- Monitor name and serial
Requirements
- Linux with DRM/KMS drivers
- Go 1.21+ (for building)
- Root access (for install command)
License
MIT