nvidia-settings outputs incorrect xorg.conf

Hey all, I’ve got a little problem. I finally managed to get nvidia-settings to permit me to set my display up correctly (note: If you have 2 monitors, one of which can handle its native resolution @ 75Hz, and another which can only handle 1024x768@70Hz, nvidia-settings will default to locking both monitors to 1024x768@75Hz… this threw me for awhile since the driver defaulted to a lower refresh rate to enable both monitors to run at their native resolution (the sane choice), but nvidia-settings seemed to not be willing to permit me to set those resolutions at all). However, I cannot save my settings. I apply them, and they work perfectly. I then save the xorg.conf… which is completely incorrect.

Attached is the xorg.conf which it generates. Running nvidia-settings --load-config-only has no effect, I have to go in and manually re-set the settings every time I reboot.

My setup when things are working properly:
24" 1920x1200@75Hz Sceptre monitor on the right (I am fine with it running at 60Hz tho, and it is currently)
21" 1680x1050@60Hz ViewSonic monitor on the left (capable of running at 75Hz but only at 1024x768)
nVidia GTX 570 with both monitors connected via DVI
Linux Mint 14, Cinnamon version
Latest non-beta nVidia drivers (I think)

The xorg.conf that nvidia-settings generates only has information for 1 monitor, specifically the 24" Sceptre. In the Screen section, however, it references both DFP-0 and DFP-3. When this file is in place during boot, I end up with both monitors in 1024x768@75Hz and the physical order of the monitors swapped. The odd thing is that when I first installed the nvidia drivers, it automatically used all of the correct settings (set previously in the nouveau driver it defaulted to).

So, how can I make it so that I do not have to manually change my display settings every time I reboot? Any help is greatly appreciated!

Hmm, I see no way to attach a file right now. Perhaps I have to do it in a post-posting edit? The file is short, I will just paste its contents below:

Section “ServerLayout”
Identifier “Layout0”
Screen 0 “Screen0” 0 0
InputDevice “Keyboard0” “CoreKeyboard”
InputDevice “Mouse0” “CorePointer”
Option “Xinerama” “0”

Section “Files”

Section “InputDevice”

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


Section “InputDevice”

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


Section “Monitor”

# HorizSync source: edid, VertRefresh source: edid
Identifier     "Monitor0"
VendorName     "Unknown"
ModelName      "Sceptre X24WG"
HorizSync       31.5 - 80.0
VertRefresh     56.2 - 75.0
Option         "DPMS"


Section “Device”
Identifier “Device0”
Driver “nvidia”
VendorName “NVIDIA Corporation”
BoardName “GeForce GTX 570”

Section “Screen”

Removed Option “metamodes” “DFP-0: 1024x768 +0+0, DFP-3: 1024x768 +1024+0”

Identifier     "Screen0"
Device         "Device0"
Monitor        "Monitor0"
DefaultDepth    24
Option         "Stereo" "0"
Option         "nvidiaXineramaInfoOrder" "DFP-0"
Option         "metamodes" "DFP-0: 1920x1200 +1680+0, DFP-3: 1680x1050 +0+0"
SubSection     "Display"
    Depth       24


Few things…

First, check your /var/log/Xorg.0.log for warnings (WW) or errors (EE). Especially look for any problems reading EDID info.

Do your displays support EDID? Or, are your displays connected via D-Sub or with a D-Sub adapter that doesn’t pass EDID info? If the driver can’t determine the appropriate HorizSync / VertRefresh values, you may have to manually add them to the xorg.conf file.

Finally, you can try the following.

  1. Make a backup of your xorg.conf file.
  2. In the “Screen” section at the bottom, change the “nvidiaXineramaInfoOrder” option to “DFP-3” if you want the ViewSonic to be the primary display, or leave it at “DFP-0” if you want the Sceptre to be the primary display.
  3. Add the following option:
    Option “MetaModeOrientation” “DFP-0 RightOf DFP-3”
  4. Comment out the “metamodes” option and try something like this:
    Option “MetaModes” “DFP-3: 1680x1050_60, DFP-0: 1920x1200_75”

(I believe you can still specify refresh rates with the underscore option. I don’t think you need the offsets if you use the MetaModeOrientation option.)

Sounds like there could be a bug in nvidia-settings if it’s not outputting the xorg.conf correctly. You are running the application with sudo?

On older driver versions, I was able to use two displays at different resolutions and refresh rates on a GTX 570, however it might have required running at highest clocks (I don’t remember if that’s true or not).

Thanks very much for your reply! Both monitors do indeed support EDID, and as they are connected via DVI, the EDID is able to be retrieved. I looked through my xorg.0.log file and there are no warnings or errors recorded (other than a couple warnings about my keyboard, completely unrelated).

I do think there is a bug in nvidia-settings (and yes, I have run it with sudo, though if I run it from the menu Mint asks me to provide a password, so I presume it is using sudo in the background… I ran it from the terminal with sudo just to see if that would change things tho and got the same behavior). It clearly understands the settings properly, but at some point when it goes to translate its in-memory record of the settings into an xorg.conf file, something goes amiss. I will give the edits you recommend a whirl. I was surprised not to find a warning or something when the driver was loading the xorg.conf as it sees the MetaMode line which specifies the proper resolutions, yet it does not use them and defaults to 1024x768 on boot. Strange. I am guessing this might be because there is nothing in the file defining DFP-3 yet the metamode line refers to it, but I would have expected a warning about that at least if not an error.

I hope eventually to run 3 27" monitors off of this GTX 570 by using the DisplayPort connection, though I will have to use a DP-to-dual-link-DVI converter. That won’t be for awhile yet, but would you expect any problems with such a setup? Is there perhaps a limitation in the hardware that won’t let me drive such large monitors 3 at a time?

What version of nvidia-settings do you have?

dpkg -s nvidia-settings

If you conclude there’s a bug you can post the bug report log as described in the sticky on the forum.

The GTX 570 doesn’t support more than two simultaneous displays. You can SLI two cards to get three or more displays, however the three displays can’t span a single desktop. Instead you would have to have at least two separate X screens. This limitation exists on Windows as well I believe.

Kepler-based cards can support up to four simultaneous displays, however, with up to all four spanning a single desktop.

What desktop environment are you using? Can you please check /var/log/Xorg.0.log for lines containing ‘Setting mode “blah”’? Some desktop environments, most notably GNOME, are notorious for changing the screen configuration when you log in.

Please attach a bug report log, which should help clear up some of this. The forum currently has a bug where you can’t attach an nvidia-bug-report.log.gz file, but you should be able to if you rename it to nvidia-bug-report.log.gz.jpg.