Depending on your monitor, 50Hz display modes can be a bit difficult to get working. Here are some tips based on my own experiences.
Not all steps are necessary to perform on all systems. If the display announces it’s support for 50hz modes properly, many of these steps are uneccessary. Mentioned configuration values applies to xorg.conf.
FS-UAE will automatically enable full video sync when it detects (through xrandr) that your display is running @50Hz. This does not always work on Linux with nVIDIA (official) drivers.
The display may actually run at 60Hz even if you have created a custom 50hz modeline and switched to that mode. To check the actual refresh rate, run this in a terminal:
export __GL_SYNC_TO_VBLANK=1 glxgears
glxgears will then (after a few seconds) print the actual refresh rate to the console.
Problem 1: nVIDIA drivers lie about refresh rates when “Dynamic Twin View” is enabled. You will then typically see refresh rates (when running the xrandr command) beginning at 50, then always increasing by 1 (51, 52, 53, 54, …). If you want correct refresh rates here, you must disable dynamic twin view:
Option "DynamicTwinView" "False"
Problem 2: Even with DynamicTwinView disabled, xrandr can still report a refresh rate of 50hz while it is in reality is 60Hz (This is related to the nVIDIA driver’s concept of frontend and backend resolution).
The following options will tell the nVIDIA driver to allow 50Hz backend modes in some cases where it would otherwise map your frontend custom modelines to a 60hz backend resolution:
Option "ExactModeTimingsDVI" "True" Option "ModeValidation" "AllowNon60HzDFPModes"
This option can also help, at least if you are creating modes with are not using the display’s native resolution:
Option "FlatPanelProperties" "Scaling=Native"
Lastly, you may have a problem where your custom 50Hz modelines are just ignored by the drivers, even though you know your display can run at 50Hz at a specific
resolution. One reason for this is that display EDID information contains limits for vertical refresh, which are often wrong. For instance, my own monitor will happily display 1920×1080@50hz, but the EDID information says that the minimum vertical refresh is 56Hz, which causes the nVIDIA drivers to ignore the modeline.
You can luckily override this:
Option "UseEdidFreqs" "False" HorizSync 30-83 VertRefresh 46-76
If you have problems getting your modeline to be recognized, this option will help by logging at lot of information regarding modeline validation to Xorg.0.log.
Option "ModeDebug" "True"
Here is a complete example provided for reference (my own xorg.conf file actually):
Section "Monitor" Identifier "Default Monitor" Option "UseEdidFreqs" "False" Option "ExactModeTimingsDVI" "True" ModeLine "1920x1080_50_0" 148.50 1920 2448 2492 2640 1080 1084 1089 1125 +HSync +VSync HorizSync 30-83 VertRefresh 46-76 EndSection Section "Device" Identifier "Default Device" Driver "nvidia" Option "DynamicTwinView" "False" Option "ModeValidation" "AllowNon60HzDFPModes" Option "ModeDebug" "True" Option "FlatPanelProperties" "Scaling=Native" Option "UseEvents" "True" EndSection Section "Screen" Identifier "Default Screen" Monitor "Default Monitor" Device "Default Device" DefaultDepth 24 Subsection "Display" Depth 24 Modes "1920x1080_60_0" "1920x1080_50_0" EndSubsection EndSection
Lately the config syntax has changed a little bit, so i had to make small modifications to make 50Hz still work on newer nvidia driver version:
Option “ModeValidation” “AllowNon60HzDFPModes” is not recognized any more.
I had to add:
Option “ModeValidation” “AllowNonEdidModes; NoVertRefreshCheck”
Option “VertRefresh” “DFP-0: 50-75”
Right now my Device section looks like this:
Section “Device”
Identifier “Device0”
Driver “nvidia”
VendorName “NVIDIA Corporation”
Option “DynamicTwinView” “False”
Option “ModeValidation” “AllowNonEdidModes; NoVertRefreshCheck”
Option “VertRefresh” “DFP-0: 50-75”
EndSection
Regards,
Mario.
You are right, I get the following in my Xorg.0.log:
(WW) NVIDIA(GPU-0): Unrecognized ModeValidation token "AllowNon60HzDFPModes";
.Strangely enough I still get 50 Hz modes, but I have to use
nvidia-settings -a CurrentMetaMode=1920x1080_50_0
to change to it, does not work with xrandr. Perhaps it will work with xrandr if I add NoVertRefreshCheck…Great Post i could finally override the refresh rate with following xorg.conf:
Section “Monitor”
Identifier “Monitor0”
VendorName “Unknown”
ModelName “Unknown”
HorizSync 30-83
VertRefresh 46-76
Option “DPMS”
Option “UseEdidFreqs” “False”
Option “ExactModeTimingsDVI” “True”
Modeline “1680x1050_60” 147.14 1680 1784 1968 2256 1050 1051 1054 1087 -HSync +Vsync
Modeline “1440x900_60” 106.47 1440 1520 1672 1904 900 901 904 932 -HSync +Vsync
Modeline “1280x800_60” 83.46 1280 1344 1480 1680 800 801 804 828 -HSync +Vsync
Modeline “1680x1050_50” 120.21 1680 1776 1952 2224 1050 1051 1054 1081 -HSync +Vsync
Modeline “1440x900_50” 87.41 1440 1512 1664 1888 900 901 904 926 -HSync +Vsync
Modeline “1280x800_50” 68.56 1280 1336 1472 1664 800 801 804 824 -HSync +Vsync
EndSection
Section “Device”
Identifier “Device0”
Driver “nvidia”
VendorName “NVIDIA Corporation”
Option “DynamicTwinView” “False”
Option “ModeValidation” “AllowNon60HzDFPModes”
EndSection
Section “Screen”
Identifier “Screen0”
Device “Device0”
Monitor “Monitor0”
DefaultDepth 24
SubSection “Display”
Depth 24
Modes “1680x1050_60” “1440x900_60” “1280x800_60” “1680x1050_50” “1440x900_50” “1280x800_50”
EndSubSection
EndSection
And with nvidia-settings -a CurrentMetaMode=1680x1050_50
Finally it works on latest nvidia driver!
Hi, I’m happy for you. Amiga emulation without 50Hz/vsync is… not the same! Also glad my post could be of help. I banged my head for quite some time until I got it working 😉 Also, I recently updated to Ubuntu 13.04, but it seems the refresh rate still cannot be switched simply with xrandr. Oh well, vidia-settings -a CurrentMetaMode still works fortunately.