My 27" 16:9 1920x1080 resolution Samsung S27D390 monitor showed up today. Sweet! Let's hook it up to my CentOS 7 box that I use for Ardour 3. Uh oh...1024x768 3:4? That's no good. Reboot. Ok, still the wrong resolution. Let's see what the video hardware is:
sudo lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09)
Ok, now what driver is it using:
lspci | grep VGA ; lsmod | grep "kms\|drm" ; find /dev -group video ; cat /proc/cmdline ; find /etc/modprobe.d/; glxinfo | grep -i "vendor\|rendering" ; grep LoadModule /var/log/Xorg.0.log
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09) drm_kms_helper 52758 1 i915 drm 297829 5 i915,drm_kms_helper i2c_core 40325 5 drm,i915,i2c_i801,drm_kms_helper,i2c_algo_bit /dev/fb0 /dev/dri/card0 /dev/dri/controlD64 BOOT_IMAGE=/vmlinuz-3.10.0-123.9.3.el7.x86_64 root=/dev/mapper/cl_new--host--3-root ro rd.lvm.lv=cl_new-host-3/swap rd.lvm.lv=cl_new-host-3/root vconsole.font=latarcyrheb-sun16 crashkernel=auto vconsole.keymap=us rhgb quiet LANG=en_US.UTF-8 /etc/modprobe.d/ direct rendering: Yes server glx vendor string: SGI client glx vendor string: Mesa Project and SGI OpenGL vendor string: Intel Open Source Technology Center [ 5172.685] (II) LoadModule: "dri2" [ 5172.685] (II) LoadModule: "glamoregl" [ 5172.686] (II) LoadModule: "glx" [ 5172.686] (II) LoadModule: "intel" [ 5172.686] (II) LoadModule: "modesetting" [ 5172.686] (II) LoadModule: "fbdev" [ 5172.686] (II) LoadModule: "vesa" [ 5172.687] (II) LoadModule: "fbdevhw" [ 5172.705] (II) LoadModule: "fb" [ 5172.705] (II) LoadModule: "dri2" [ 5172.736] (II) LoadModule: "evdev"
That's the Intel i915 driver, which is totally appropriate for my Asus P8H77-V motherboard. So...right driver, wrong resolution.
Let's hack!
First, let's figure out some settings. Since I know my monitor's optimal resolution is 1920x1080 at 60Hz:
cvt 1920 1080 60
# 1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz Modeline "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
Ok, for versatility let's figure out the other 16:9 resolutions between 720 & 1080.
cvt 1280 720 60
# 1280x720 59.86 Hz (CVT 0.92M9) hsync: 44.77 kHz; pclk: 74.50 MHz Modeline "1280x720_60.00" 74.50 1280 1344 1472 1664 720 723 728 748 -hsync +vsync
cvt 1368 768 60
# 1368x768 59.88 Hz (CVT) hsync: 47.79 kHz; pclk: 85.25 MHz Modeline "1368x768_60.00" 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsyn
cvt 1600 900 60
# 1600x900 59.95 Hz (CVT 1.44M9) hsync: 55.99 kHz; pclk: 118.25 MHz Modeline "1600x900_60.00" 118.25 1600 1696 1856 2112 900 903 908 934 -hsync +vsync
Now that we have some numbers, and knowing that my screen could load at "VGA1" or "VGA-0" let's add the settings to "/etc/gdm/Init/Default" right after the "OLD_IFS=$IFS" line:
xrandr --newmode "1280x720_60.00" 74.50 1280 1344 1472 1664 720 723 728 748 -hsync +vsync xrandr --addmode VGA-0 "1280x720_60.00" xrandr --output VGA-0 --mode "1280x720_60.00" xrandr --newmode "1280x720_60.00" 74.50 1280 1344 1472 1664 720 723 728 748 -hsync +vsync xrandr --addmode VGA1 "1280x720_60.00" xrandr --output VGA1 --mode "1280x720_60.00" xrandr --newmode "1368x768_60.00" 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync xrandr --addmode VGA-0 "1368x768_60.00" xrandr --output VGA-0 --mode "1368x768_60.00" xrandr --newmode "1368x768_60.00" 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync xrandr --addmode VGA1 "1368x768_60.00" xrandr --output VGA1 --mode "1368x768_60.00" xrandr --newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900 903 908 934 -hsync +vsync xrandr --addmode VGA-0 "1600x900_60.00" xrandr --output VGA-0 --mode "1600x900_60.00" xrandr --newmode "1600x900_60.00" 118.25 1600 1696 1856 2112 900 903 908 934 -hsync +vsync xrandr --addmode VGA1 "1600x900_60.00" xrandr --output VGA1 --mode "1600x900_60.00" xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync xrandr --addmode VGA-0 "1920x1080_60.00" xrandr --output VGA-0 --mode "1920x1080_60.00" xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync xrandr --addmode VGA1 "1920x1080_60.00" xrandr --output VGA1 --mode "1920x1080_60.00"
After a reboot, I find that 1920x1080 has some weird overscan with black bars on the sides of the screen, but all the other resolutions work just fine. Cruising along at 1368x768 is not so bad! However, in the name of thoroughness, does anybody haved ideas on how to get 1920x1080 going without overscan?