X11 Monitors – Handle Unlisted Screen Resolution

monitorsmulti-monitorresolutionx11xorg

On my new computer I have 2 screens connected on the igpu of a i7 processor, 1 using hdmi. the other using dvi. Both screens are the same but the one connected using hdmi has a wrong resolution inside X, and it can't be selected inside the settings. How can this be solved?

Best Answer

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 2560x1080+2560+0 (normal left inverted right x axis y axis) 677mm x 290mm 
   1920x1080     60.00*  
   1680x1050     59.88  
   1600x900      59.98  
...

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

to add 2560x1080 to HDMI1 first run the next command

$ cvt 2560 1080

sample output:

2560x1080 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.

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

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