Ubuntu – Force refresh rate

nvidiaresolution

I want to make my monitor work at 59hz in 1920×1080 resolution because it flickers a bit at 60hz. Granted it is not in default options, so I need to forced it somehow. It was easy to do in windows, but in ubuntu I just can't do it, any option I try, like xrandr, just bounces of, because 1920×1080@59 is not supported by default. Is their some way to make it happen? My card is nvidia 9600gt with 310.32 drivers.

Using xrandr is give me this output:

Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 153 (RANDR) Minor opcode of failed
request: 18 (RRAddOutputMode) Serial number of failed request: 31
Current serial number in output stream: 32

Using xrandr -r 59 gives:

Rate 59.0 Hz not available for this size

I manage to change it to 1920×1080@59, but monitor rejected timing, so no luck for me. I wonder why it lets to work windows at 59hz?

If someone else will find this topic, I changed refresh rate by adding

Option "ExactModeTimingsDVI" "TRUE"

Before modeline command, so it looks like this:

Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Unknown"
HorizSync 30.0 – 81.0
VertRefresh 56.0 – 75.0
Option "DPMS"
Option "ExactModeTimingsDVI" "TRUE"
Modeline "1680x1050_60.00" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync EndSection

Best Answer

  • Calculate the needed modelines for your resolution

    cvt 1920 1080 59
    
  • Add this new mode for the monitor with xrandr

    xrandr --newmode "1920x1080_59.00"  {add what you got from cvt} -hsync +vsync
    
  • Add this new mode to the devices

    xrandr --verbose --addmode VGA-0  "1920x1080_59.00"
    
  • Activate the new mode

    xrandr --output VGA-0 --mode "1920x1080_59.00"
    

By the way ...

xrandr -r 59

might work but this might depend on the card and/pr xrandr version.


Also do not forget to check your monitor: some displays allow you to set the refresh rate with the buttons on the monitor.


Major opcode of failed request

The issue may be caused by the fact that the video card cannot read the EDID information from the monitor. In the device section of the xorg.conf, you can force the system not to use the edid information.

Section "Device"
<..>    
 Option         "UseEDID"   "FALSE"
EndSection

Another reason for the opcode error can be that the video driver does not allow non-edid modes (this is actually the default for current NVidia drivers). You might disable EDID as per above and that would work, but that is not optimal if your EDID information is actually correct, since you will lose things like monitor size information (expect wrong font sizes) and the default EDID modes reported by your monitor. Instead, use the following:

 Option         "ModeValidation"   "AllowNonEdidModes"

Another benefit with ModeValidation is that it allows more fine grained control (per output in case of multi-monitor setups); look in the NVidia driver readme for more information.


You can then add the modeline to Section "Monitor"

Section "Monitor"
Identifier     "Monitor0"
VendorName     "Unknown"
ModelName      "CRT-0"
HorizSync       28.0 - 55.0
VertRefresh     43.0 - 72.0
Option         "DPMS"
Modeline    "1920x1080_59.00"  {bunch of numbers from cvt} -hsync +vsync
EndSection

and the mode to Section "Screen".

SubSection     "Display"
    Depth       24
    Modes      "1920x1080_59"
EndSubSection