# xorg / nvidia drivers and screen resolution



## cilia (May 15, 2011)

Since February I've got a problem with my FreeBSD box that I couldn't address properly then for lack of time. I do believe that started after an upgrade on the nvidia-drivers but, for the life of me, I can't be 100% sure.

In a nutshell, each time I `$ startx` with my usual user, the window manager opens with a 640x480 screen resolution, with no way to set it at 1680x1050 as the screen/graphic card combo should normally permit it. This being observed whether the window manager used is xfce or fluxbox.


```
FreeBSD enki.noway.out 8.0-RELEASE-p4 FreeBSD 8.0-RELEASE-p4 #0: Mon Jul 12 20:55:11 UTC 2010
root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
```


 dmesg 
 xorg.conf
 Xorg.0.log with nvidia-drivers
 Xorg.0.log with vesa drivers

What I've found in the Xorg.O.log, when starting X with both nvidia and vesa drivers:

```
(WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
```

And only with the nvidia driver:

```
(WW) May 15 10:24:37 NVIDIA(GPU-0): The EDID read for display device DFP-1 is invalid: the
(WW) May 15 10:24:37 NVIDIA(GPU-0):     checksum for EDID version 1 is invalid.
.../...
(==) May 15 10:24:37 NVIDIA(0): No modes were requested; the default mode "nvidia-auto-select"
(==) May 15 10:24:37 NVIDIA(0):     will be used as the requested mode.
(==) May 15 10:24:37 NVIDIA(0): 
(II) May 15 10:24:37 NVIDIA(0): Validated modes:
(II) May 15 10:24:37 NVIDIA(0):     "nvidia-auto-select"
(II) May 15 10:24:37 NVIDIA(0): Virtual screen size determined to be 640 x 480
(WW) May 15 10:24:37 NVIDIA(0): Unable to get display device DFP-1's EDID; cannot compute DPI
(WW) May 15 10:24:37 NVIDIA(0):     from DFP-1's EDID.
```

What I've tried so far (not particularly in that order):


reinstall the nvidia drivers `# make deinstall clean` and `# make install clean` with no results on this front whatsoever.
generating new xorg.conf with `# Xorg -configure`, `# nvidia-xconfig` or both doesn't change a thing either.
`$ startx` using the vesa driver. Now, that was interesting because the window manager did start with the expected resolution (1680x1050) but the desktop was out of the screen boundaries (with a black margin at the top).
expliciting the mode in the Screen -> Display SubSection in the xorg.conf in vain : 
	
	



```
Modes "1680x1050"
```


Now, some things I've found while trying to solve my problem that might be related:

```
$ nvidia-settings --glxinfo
ERROR : Cannot open display ''.
```


```
$ echo $DISPLAY

$ su root
# echo $DISPLAY
DISPLAY: Undefined variable
```

As for the related hardware:

 graphic card : Nvidia GTX 260
 Monitor : Viewsonic vg2230wm  (plugged via DVI)

I'm tempted to conclude that the nvidia driver can't detect properly the display modes available; but I can't make sense as for why?

Let me know if there's some other piece of information needed.


----------



## SirDice (May 16, 2011)

The Xorg.0.log is incomplete. But it looks like your monitor is sending bad EDID information. Try adding a monitor section with the correct frequencies and turn off DCC.


----------



## cilia (May 16, 2011)

SirDice said:
			
		

> The Xorg.0.log is incomplete. But it looks like your monitor is sending bad EDID information. Try adding a monitor section with the correct frequencies and turn off DCC.



Well, I did post a link to the complete log, you might have missed it : Xorg.0.log.

As for the frequencies, I had already set them on my xorg.conf :


```
Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Viewsonic"
    ModelName      "VG2230wm"
    HorizSync	   24-82
    VertRefresh    50-85
EndSection
```

Also, did you mean *DDC* instead of *DCC* ? And how do I turn it off ?


Anyway, I've continued to mess with the xorg.conf yesterday based on the Appendix B - X config Options provided with the nvidia drivers.

I recovered my expected 1680x1050 resolution by setting the IgnoreEDIDChecksum value :

```
Section "Device"
    Identifier     "Card0"
    Driver         "nvidia"
    VendorName     "nVidia Corporation"
    BoardName      "GT200 [GeForce GTX 260]"
    Option         "IgnoreEDIDChecksum" "DFP"
EndSection
```

However this feel like a workaround to a deeper problem, and this makes me wonder. 
The monitor is working just fine on a Windows boot or any live Linux distro that I've found on my desk. 
I don't understand why suddenly the EDID appear to be corrupted... Any hint to investigate the problem is welcome !


----------



## SirDice (May 16, 2011)

cilia said:
			
		

> I don't understand why suddenly the EDID appear to be corrupted.


No idea either but that's what it says in the log file.


----------



## wblock@ (May 16, 2011)

cilia said:
			
		

> I recovered my expected 1680x1050 resolution by setting the IgnoreEDIDChecksum value :
> 
> ```
> Section "Device"
> ...



Check the xorg log file on Linux.  Maybe they default to ignore.  Windows, there's no way of telling what it's doing.



> I don't understand why suddenly the EDID appear to be corrupted... Any hint to investigate the problem is welcome !



The monitor has a little ROM that contains the information.  They do go bad sometimes.  Connecting another monitor would show whether the problem is in the monitor or the video card or software.


----------



## olli@ (Oct 2, 2020)

cilia said:


> ```
> $ nvidia-settings --glxinfo
> ERROR : Cannot open display ''.
> ```
> ...



First start the X server (`startx` or whatever method you use), then open a terminal window, e.g. xterm.
Inside that window, the DISPLAY variable _should_ be set properly. If it isn’t, try `export DISPLAY=:0` (sh, zsh, ksh, bash) or `setenv DISPLAY :0` (tcsh), respectively. This should work because usually the default display is #0.
Then you should be able to run `nvidia-settings`. You can do this as normal user for testing purposes. If you intend to write changes back to the xorg.conf file, you must run it as root.
Go to the „X Server Display Configuration“ menu entry and select the desired resolution.


----------

