I went through a lot of sites trying to solve the problem where my second monitor would not show the correct resolution and it isn't detected automatically. So one monitor was labeled as "Samsung SB200" while the other was "CRT-0". In the case they both are recognized, follow this link (http://www.thegeekstuff.com/2009/08/ubuntu-tips-how-to-setup-dual-monitor/)
The following is for the scenario where you have one recognized monitor and the other isn't recognized properly. I have tried setting ModeLines manually to no avail in this case.
You need to know the native resolution and refresh rate of the monitor, and you will need to make modifications to the xorg config file. (make sure to update to newest nvidia drivers with this link: http://www.binarytides.com/install-nvidia-drivers-ubuntu-14-04/)
- Create a new xorg.conf file by removing the existing one and using nvidia-xconfig
sudo rm /etc/X11/xorg.conf
sudo nvidia-xconfig
- Reboot computer (or restart the x server loading the new settings.. easier to reboot)
- Open Nvida X Server Settings and save the configuration of the working monitor to file
- X Server Display Configuration
- Select the recognized monitor, in my case "Samsung S22B300"
- Save to X Configuration file at /etc/X11/xorg.conf with merge with existing file option selected
- Edit the xorg.conf file, manually adding in the settings for the unrecognised monitor by
sudo gedit /etc/X11/xorg.conf
- Copy the following sections
Section "Monitor" Identifier "Monitor0" VendorName "Unknown" ModelName"Samsung S22B300" HorizSync 30.0 - 81.0 VertRefresh 56.0 - 75.0 Option "DPMS" EndSection Section "Device" Identifier "Device0" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName"GeForce GTX 570" EndSection Section "Screen" Identifier "Screen0" Device "Device0" Monitor"Monitor0" DefaultDepth24 Option "Stereo" "0" Option "metamodes" "DVI-I-1: 1920x1080 +0+0, DVI-I-0: nvidia-auto-select +1920+0" Option "SLI" "Off" Option "MultiGPU" "Off" Option "BaseMosaic" "off" SubSection "Display" Depth 24 EndSubSection EndSection
- Change to the following and paste it underneath the original copy.
- Make sure to change the identifiers so there won't be a conflict
- Make sure to change the Model Number to reflect the unrecognised monitor "CRT-0"
Section "Monitor" Identifier "Monitor1" VendorName "Unknown" ModelName"CRT-0" HorizSync 30.0 - 81.0 VertRefresh 56.0 - 75.0 Option "DPMS" EndSection Section "Screen" Identifier "Screen1" Device "Device0" Monitor"Monitor1" DefaultDepth24 Option "Stereo" "0" Option "metamodes" "DVI-I-1: 1920x1080 +0+0, DVI-I-0: nvidia-auto-select +1920+0" Option "SLI" "Off" Option "MultiGPU" "Off" Option "BaseMosaic" "off" SubSection "Display" Depth 24 EndSubSection EndSection
- Reboot Computer
- Go to Nvidia X Server Settings and Change resolution of both monitors to the native one. DO NOT set the resolution to be higher than the native resolution.