Desk with two ultra-wide-screens
Linux

Add Unlisted screen resolution using xrandr

The problem

On my desctop computer I have 2 ultra-wide-screens from LG, one connected with HDMI, the other with DVI.
The HDMI screen works fine out of the box but the DVI screen gets recognized as a normal wide-screen. After some googling I found the solution to add the resolution manually to my Linux system.

Getting the right configurations using xrandr

first run

$ xrandr

this will give output like this:

Screen 0: minimum 320 x 200, current 5120 x 1080, maximum 8192 x 8192
HDMI1 connected 2560×1080+2560+0 (normal left inverted right x axis y axis) 677mm x 290mm
1920×1080 60.00*
1680×1050 59.88
1600×900 59.98

HDMI2 connected 2560×1080+0+0 (normal left inverted right x axis y axis) 677mm x 290mm
2560×1080 60.00*+
2560x1080_60.00 59.98
1920×1080 60.00 50.00 59.94 30.00 29.97
1920x1080i 60.00 50.00 59.94

to add 2560×1080 to HDMI1 first run the next command

$ cvt 2560 1080

sample output:

2560×1080 59.98 Hz (CVT) hsync: 67.17 kHz; pclk: 230.00 MHz
Modeline “2560x1080_60.00” 230.00 2560 2720 2992 3424 1080 1083 1093 1120 -hsync +vsync

now you need to use this output to test the resolution and than add the settings for use in the next sessions.

Test before configuring

testing:

$ xrandr –newmode “2560x1080_60.00” 230.00 2560 2720 2992 3424 1080 1083 1093 1120 -hsync +vsync

$ xrandr –addmode HDMI1 2560x1080_60.00
$ xrandr –output HDMI1 –mode 2560x1080_60.00

finalising the configuration

if it works you can add it to the xorg configuration

$ sudo vim /etc/X11/xorg.conf.d/40-monitor.conf

or

$ sudo vim /usr/share/X11/xorg.conf.d/40-monitor.conf

Section "Monitor"
Identifier "HDMI1"
Modeline "2560x1080_60.00"  230.00  2560 2720 2992 3424  1080 1083 1093 1120 -hsync +vsync
Option "PreferredMode" "2560x1080"
EndSection

I also posted this solution on stackexchange, as an answer to my own question.
For more information about the xrandr command you can take a look at the man page.

One Comment

  • Johne73

    Helpful info. Fortunate me I found your website by chance, and I’m shocked why this twist of fate did not took place earlier! I bookmarked it. kfdegbdfkekd

Leave a Reply

Your email address will not be published. Required fields are marked *