Software & AppsOperating SystemLinux

How To Change Nvidia GPU Fan Speed in Ubuntu

Ubuntu 6

Controlling the fan speed of your Nvidia GPU on an Ubuntu system can help optimize its performance and prevent overheating. This article will guide you through several methods to achieve this, including using nvidia-xconfig, nvidia-settings commands, creating an Xorg configuration file, and the nvclock tool.

Please note that not all GPUs support fan speed adjustments, so some methods may not work for your specific GPU model.

Quick Answer

To change the Nvidia GPU fan speed in Ubuntu, you can use methods such as nvidia-xconfig and NVIDIA X Server Settings, nvidia-settings command, creating an Xorg configuration file, or using the nvclock tool. These methods allow you to enable fan speed control and adjust the fan speed according to your preferences. However, please note that not all GPU models support fan speed adjustments.

Using nvidia-xconfig and NVIDIA X Server Settings

The nvidia-xconfig utility is a robust tool that can configure an X server configuration file for the NVIDIA X driver.

  1. Configure the X Server Open the terminal and run the following command:
    sudo nvidia-xconfig
    This command will create a new X server configuration based on the current system setup.
  2. Enable Fan Speed Control To enable fan speed control, you need to set the cool-bits option to 4. Run the following command:
    sudo nvidia-xconfig --cool-bits=4
    The cool-bits option enables various unsupported features, and setting it to 4 allows manual fan control.
  3. Adjust Fan Speed After restarting your computer, open the NVIDIA X Server Settings from the Dash. You should find the option to change the fan speed under the Thermal Settings.

Using nvidia-settings command

The nvidia-settings command allows you to configure the Nvidia graphics driver from the command line.

  1. Enable Fan Speed Control Like in the previous method, enable fan speed control by setting the cool-bits option to 4:
    sudo nvidia-xconfig --cool-bits=4
  2. Identify the GPU Run the following command to list all GPUs:
    nvidia-smi
    Note the GPU number from the output of this command.
  3. Adjust Fan Speed You can adjust the fan speed by running the following command (replace 0 with your GPU number and 55 with the desired fan speed):
    nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUTargetFanSpeed=55"
    The GPUFanControlState parameter enables (1) or disables (0) the GPU fan speed control. The GPUTargetFanSpeed parameter sets the target fan speed.

Creating an Xorg configuration file

Creating an Xorg configuration file can also enable fan speed control.

  1. Create the Configuration File Open the terminal and run the following command to create a file named /etc/X11/xorg.conf.d/11-nvidia-coolbits.conf:
    sudo nano /etc/X11/xorg.conf.d/11-nvidia-coolbits.conf
  2. Configure the File In the file, paste the following content:
    Section "OutputClass"
     Identifier "nvidia"
     MatchDriver "nvidia-drm"
     Driver "nvidia"
     Option "Coolbits" "4"
    EndSection
    Save the file and log out, then log back in. Run nvidia-settings, and you should see the fan speed control options.

Using nvclock

nvclock is a small utility that allows users to overclock Nvidia based video cards on Linux machines.

  1. Install nvclock Install nvclock by running the following command:
    sudo apt-get install nvclock
  2. Adjust Fan Speed Open the terminal and run the following command to set the fan speed to 80% (adjust the value as needed):
    nvclock -f -F 80
    The -f option forces the application of new values, and the -F option sets the fan speed.

Remember to adjust the fan speed values according to your preferences and the specific requirements of your system. Always monitor your GPU temperature to prevent overheating and ensure optimal performance.

In conclusion, controlling the fan speed of your Nvidia GPU on Ubuntu can be achieved through various methods. It’s essential to understand each method and choose the one that best fits your needs and technical expertise. Happy tweaking!

Can I adjust the fan speed of any Nvidia GPU on Ubuntu?

Not all GPUs support fan speed adjustments, so it’s possible that some methods may not work for your specific GPU model. It’s recommended to check the official documentation or forums for your GPU model to determine if it supports fan speed control.

What is the purpose of the `cool-bits` option?

The cool-bits option enables various unsupported features, including manual fan control. By setting it to 4, you allow the fan speed control functionality to be accessed.

How can I identify the GPU number for the `nvidia-settings` command?

You can use the nvidia-smi command to list all GPUs and note the GPU number from the output. Replace 0 in the nvidia-settings command with the appropriate GPU number.

Can I adjust the fan speed using the `nvclock` tool on any Nvidia GPU?

The nvclock tool is designed to overclock Nvidia GPUs, but it also allows users to adjust the fan speed. However, it’s always recommended to check the official documentation or forums for your GPU model to determine if it is compatible with nvclock and supports fan speed adjustments.

How do I monitor my GPU temperature?

There are various tools available to monitor GPU temperature on Ubuntu, such as nvidia-smi, sensors, or graphical tools like psensor. These tools provide real-time temperature readings and can help you ensure that your GPU is operating within safe temperature limits.

Leave a Comment

Your email address will not be published. Required fields are marked *