Fan control ubuntu
Found the solution. I had to run the following first and restart
sudo nvidia-xconfig -a --cool-bits=28
But I have another question. After reboot, The GPU control the FAN automatically. Then If I set the fan speed manually via
nvidia-settings -a '[gpu:0]/GPUFanControlState=1' -a '[fan:0]/GPUTargetFanSpeed=99'
It works as it should. But when I set
nvidia-settings -a '[gpu:0]/GPUFanControlState=0'
afterward, now the Nvidia X Server Settings does not update the FAN Speed although it is possible to see in Nvidia-smi that the fan speed is still changing.
By the way I updated to 440 driver.