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.
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
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
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.