NVIDIA graphic cards have gained popularity among machine learning researchers and practitioners as the base hardware for GPU computing. It is not uncommon to perform computation for linear algebra, image and video processing, machine learning (especially deep learning), graph analytics, and so forth on GPU. To adjust the fan speed during operation of the system you can use from a remote terminal, e.g.With advances in GPU technologies, performing complex computation is not an exclusive feat of multicore CPUs anymore. However, there should be no degradation if your follow these instructions and after a clean reboot. On one occasion during our experimentation we found severely degraded performance to less than 20%. If you are mining, confirm the hashing performance. If things do not work, check /tmp/rc.local.log and /tmp/gpufansetting.log for any errors. Reboot the system and keep your fingers crossed: sudo reboot. You will be able to see what happened in the log file /tmp/rc.local.log. To be able to debug your script you can add the following before the line you added. Run Script at Bootįinally we add a line to /etc/rc.local, before exit(0) to automatically run the script at boot. Don’t forget to replace the path /home/userid/gpufansetting by the path to your own script. 2) must be different from an already running server, and then export DISPLAY=:2, and a command to change a parameter: sudo nvidia-settings …Ī GPU that ran at 82C at fan speed 51% now runs at a much nicer 74C at fan speed 100%! Results will depend on your ambient temperature. sudo X :2 &, where the number following the colon (e.g. If you want to try it from your (remote ssh) terminal first without rebooting or running scripts, use e.g. Once started you can execute the commands that follow from the command line. The portion after the first systemctl starts Xorg. #terminating Xorg will reset fan speeds to default so do not terminate Xorg! Sudo systemctl set-default multi-user.target #set back to command line prompt after boot (optional) Nvidia-settings -a /GPUFanControlState=1 -a /GPUTargetFanSpeed=100 #not tested: isolate could be the better way than using set-default! # there may be better ways using an already running server, but this works. #make sure an Xorg server is running which you can connect to #a delay can be specified on the command line if not used from termonal session Optionally you can disable it at the end of the script by changing to multi-user.target which then give you your command line prompt on the terminal after reboot. It is also necessary to have graphical.target enabled to start an Xorg server. The script should not terminate Xorg, or the custom speed settings may revert to their defaults. This will probably need to be executed at boot. Fan speed configurationĬreate a script (named gpufansetting in this example) in your user home or somewhere convenient. Above command creates sections for each GPU in the system. If you want to set all cool-bits binary bits to ‘1’ to control other aspects of the GPU, you can just set –cool-bits=31. sudo nvidia-xconfig -enable-all-gpus -allow-empty-initial-configuration -cool-bits=7 Without the “cool-bits” option set to a proper value in the nf file, trying to set fan speeds will just not work. You can check any existing configuration file /etc/X11/nf for the coolbits setting, or just create a new one using the command below.
#UBUNTU 16.04 INSTALL CUDA 9 2018 INSTALL#
Make the script run on boot Install and Configure Xorgįirst we need to have Xorg installed and configured properly. Install Xorg and create nf configuration file Our post on Mining Pods using CentOS 7.4 with CUDA 9.1, covers the procedure for CentOS, and was tested with NVIDA FE GPU cards and some Zotac cards. The procedure was tested on Ubuntu 16.04.2 LTS with EVGA GTX 1050 Ti GPUs, on Ubuntu 16.04.3 LTS with EVGA and ASUS GTX 10 Ti GPUs. Unfortunately it appears that we cannot avoid installing and keeping running an Xorg server, just to change GPU settings and keep them that way. The following steps are needed to make this permanent, and without any display attached (a headless system.) This generally applies to datacenter and remote server environments.Ī simple search on the the Internet was not sufficient to make things work so here is a write-up that works.
The following assumes you installed Ubuntu Server without desktop environment, you do not want to run a desktop manager, and you need a command prompt after reboot. In high-performance computing applications when the system is in a datacenter, it is often preferable to run the fan at maximum speeds for lowest possible operating temperature to possibly prolong the life of the hardware. NVIDIA GPUs have fan speed profiles that control the fan to keep the noise to a minimum.