Must change refresh rate after every reboot

xrandr is broken for my monitor and the only way to change it’s refresh rate to 120hertz is using the nvidia-settings gui, however inspite of saving the changes to the xorg.conf file the refresh rate reverts to 60hertz after every reboot.

So I was wondering if there is a way to change the refresh rate using nvidia-settings cli options, in order to create a cron job to do so after every reboot.

Thanks in advance for any help you can provide.

It sounds like you probably have a desktop environment such as GNOME overriding your refresh rate settings. It’s a little surprising that xrandr doesn’t work. Can you describe the problem in more detail?

With nvidia-settings, the easiest option is to use the CurrentMetaMode attribute to switch the configuration. For example, if you desired mode is 1920x1080 at 120 Hz, the command would be

nvidia-settings --assign=CurrentMetaMode="1920x1080_120"

[Edit: that should be 1920x1080_120, not 1920x1080_60 obviously]

Here you can see the refresh rate is already set to 120hertz because I’ve already done so using nivida-settings:

xrandr
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
DVI-I-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 509mm x 286mm
   1920x1080     60.00 + 119.98*  109.95    99.93  
   1680x1050     59.95  
   1440x900      59.89  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x720      60.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   640x480       75.00    59.94

However if I try to switch it to 120hertz using xrandr instead of nvidia settings I get the following error:

xrandr -r 119.98
Rate 119.98 Hz not available for this size

I’ve reported this bug here:
https://bugs.freedesktop.org/show_bug.cgi?id=89098
not sure if it’s the right place.

But your command does change the refresh rate via cli, thanks alot for the help.

xrandr -r uses the old RandR 1.1 interface. Does it work if you use the newer RandR 1.2 interface?

xrandr --output DVI-I-1 --mode 1920x1080 --refresh 120

xrandr 1.2 does work!

I’ve added both

xrandr --output DVI-I-1 --mode 1920x1080 --refresh 120

and

nvidia-settings --assign=CurrentMetaMode="1920x1080_120"

to my user and root’s crontab to no avail, my refresh rate still reverts to 60hertz after every reboot.

It seems GNOME overrides the refresh rate settings like you said, is there a way to work around this ?

Let’s fix GNOME instead? The first step is for you to file a bug in bugzilla.gnome.org with all these details.

Do you have file ~/.config/monitors.xml, in past refresh rate was configured there. Though I haven’t used gnome since 2006…

This will get fixed in GNOME: Bug 655041 – missing refresh rate selection

Thank this works. I have been fighting with this issue for a day, and everyone online has had these over the top suggestions.(“Just hack the kernel, recode Xwindows, and solder this new chip onto your GFX board!”)

lol

For anyone who just wants their refresh rate saved persistently across reboots, use this method.

Mint 18.1 serena
GeForce GTX 970