sudo nvidia-xconfig -a --cool-bits=31 --allow-empty-initial-configuration
sudo systemctl restart lightdm.service
sudo DISPLAY=:0 XAUTHORITY=/var/run/lightdm/root/:0 nvidia-settings -a 'GPUFanControlState=1' -a 'GPUTargetFanSpeed=100'
This changes fan to 100% but over clock works the same way.
I found the answer here.
https://www.linuxquestions.org/questions/linux-general-1/how-to-run-nvidia-settings-remotely-4175599391/
Ok, but me and another guy are looking for an answer hot to set GPU fan speed to any custom value on Ubuntu 18.x Server, i.e. with no X, no GUI, no DE...
https://superuser.com/q/1398591/1004977
Could anyone please help us?
p.s. I found it, and it seems to be working solution for our case! https://bitcointalksearch.org/topic/m.24914477