HOWTO: Get NVIDIA On Linux To Use Custom Resolutions Over DVI

NVIDIA LogoLinux Logo Half

You want something easy? Cut the EDID pin on a VGA cable, hook up your monitor, configure xorg.conf to whateve resolution you want, and call it a day.

You want something scary? Do the same with a DVI or HDMI cable and witness the NVIDIA driver do everything in its power keep you from falling down and skinning your knees like you’re 2 years old.

The problem stems from the fact that digital flat panels have one native resolution. Well, actually, this would be a problem if these monitors didn’t have internal scalers. So now the problem becomes: What device scales better — your NVIDIA GPU or your flat panel? Chances are most people wouldn’t be able to tell. Some might be annoyed that their flat panel just steches everything without regard to aspect ratio.

But what if you actually want to run at a “non-native” resolution because you’re using an HDTV whose actual native resolution is 1368×768, whose actual native resolution is never reported at all, but reports the max 1920×1080 as it’s native resolution?

Here’s the slew of options you need:

Option “UseEDID” “False”
Tells the driver not to use modes that the display device reports it can use
Option “UseEDIDFreqs” “False”
Tells the driver to ignore frequency ranges reported over EDID.
Option “ExactModeTimingsDVI” “True”
IMPORTANT! Tells the driver to use timings as-is. Otherwise, it tries to find a best-fit resolution instead. If you leave EDID enabled while connected to an HDTV, you’ll get a 1368×768 resolution scaled to 1920×1080 resolution. If you disable EDID modes, the driver will fall back to 640×480 and then reject your custom resolution as being too large.
ModeValidation NoDFPNativeResolutionCheck
Tells the drive not to check resolutions agains the reported native resolution. This comes into play when UseEDID is false since the driver will fall back on 640×480 and then reject your custom resolution as too large.
ModeValidation other
Nothing special to note here as these would be used even if you were using a VGA connection.
Section "Device"
	Identifier	"DVI0"
	Option		"UseDisplayDevice"	"DFP-0"
	Driver		"nvidia"
	Option		"UseEDID"		"False"
	Option		"UseEDIDFreqs"		"False"
	Option		"ExactModeTimingsDVI"	"True"
	Option		"ModeValidation"	"NoDFPNativeResolutionCheck, NoEdidModes, NoMaxPClkCheck, NoVertRefreshCheck, NoHorizSyncCheck, NoEdidMaxPClkCheck"
	Option		"NoLogo"		"True"
	Option		"DPI"			"144 x 144"
EndSection
About these ads