If you’ve tried experimented with Nvidia GPU overclocking on Linux using the nvidia-settings application, you’ll notice one pesky problem: the settings don’t stay set when you reboot. This is slightly annoying, and thankfully is easily fixed. Depending on your Linux distro, the settings can be applied at startup in one of a few ways. The first (Ubuntu Specific method) is rather simple. Write a script that applies your overclocking settings using command line arguments to the nvidia-settings program. Below is an example:

1
2
3
4
5
6
7
#!/bin/bash
 
#this will set overclocking settings for nvidia gpu
nvidia-settings -a GPUOverclockingState=1 #enable overclocking
nvidia-settings -a GPU3DClockFreqs=625,900 #set clocks
        #these settings apply to my 9800GT. 
        #You will want to tweak the clock settings to suit your own GPU.

Save this file somewhere and make sure it has executable permissions. Open the “Startup Applications” program that is bundled with Ubuntu, and create an entry for your overclocking settings. The “name” and “comments” section can be whatever you like, just make sure that your “command” line reads something like this:

sh /path/to/your/script.sh

Once this is applied, your overclocking settings should automatically be applied when you log in.

Another method is less distro specific. You can apply your settings by adding the lines (minus the very first one) from our script above into your /etc/profile file. This will do precisely the same thing, applying your overclocking settings whenever you log in.