Ubuntu – How to add a different monitor resolution to NVidia X Server Settings’ list

displaymultiple-monitorsnvidia-graphics-cardresolutionxubuntu

I've got two monitors connected to the same PC; one directly via DVI, the other through a KVM switch on a (blue) VGA cable.
I just installed Xubuntu 11.10 on it, installed the current nvidia drivers, and using the NVidia X Server Settings applet, I've configured them. I'm using a TwinView configuration, so that I can drag windows from one monitor to the other, etc.

The DVI-connected monitor is recognized correctly and set to 1024×768. The VGA-connected, however, lists a slew of resolutions, but not the correct one (1280×1024). I've now set it to 1280×960, but everything is slightly blurry since it's not the monitor's native resolution.
The listed resolutions are 1440×900, 1360×768, 1280×960, 1152×864, 1024×768, 832×624, 800×600, 720×450, 680×384, 640×480, 512×384.

Does anybody know how and where I can configure my machine so that the main monitor works at its native resolution?

Edit: This is currently the contents of my xorg.conf:

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 280.13  (buildmeister@swio-display-x86-rhel47-03.nvidia.com)  Wed Jul 27 17:15:58 PDT 2011

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 280.13  (buildd@yellow)  Fri Aug  5 12:31:28 UTC 2011

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"

    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "CRT-1"
    HorizSync       30.0 - 60.0
    VertRefresh     56.0 - 76.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "COMPAQ 1520"
    HorizSync       30.0 - 60.0
    VertRefresh     56.0 - 76.0
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GT 530"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GT 530"
    BusID          "PCI:1:0:0"
    Screen          1
EndSection

Section "Screen"

# Removed Option "metamodes" "DFP: nvidia-auto-select +1360+0, CRT: 1360x768_60 +0+0"
# Removed Option "metamodes" "CRT: 1280x960 +0+0, DFP: nvidia-auto-select +1360+0"
# Removed Option "metamodes" "CRT: 1280x960 +0+0, DFP: nvidia-auto-select +1280+0"
# Removed Option "TwinView" "1"
# Removed Option "metamodes" "CRT: 1280x960 +0+0, DFP: nvidia-auto-select +1280+192"
# Removed Option "TwinView" "0"
# Removed Option "metamodes" "CRT: 1280x960 +0+0"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "TwinView" "1"
    Option         "TwinViewXineramaInfoOrder" "CRT-1"
    Option         "metamodes" "CRT: 1280x960 +0+0, DFP: nvidia-auto-select +1280+192"
    SubSection     "Display"
        Depth       24
        Modes      "1280x1024" "1280x1024" "1152x864" "1024x768" "800x600" "640x480"
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "TwinView" "0"
    Option         "metamodes" "DFP: nvidia-auto-select +0+0"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Best Answer

Add it in xorg.conf directly or use nvidia-xconfig --mode=1280x1024

Related Question