I am using Ubuntu 20.04 with 2 RTX 3070 GPUs, which I want to use for ETH mining, on an ASUS B250 Mining Expert motherboard. I have installed all needed software on a new Ubuntu 20.04 installation like this:
sudo -i
apt install nvidia-driver-460
nvidia-xconfig -a --cool-bits=28
reboot
- I checked my - /etc/X11/xorg.conffile and- coolbits = 28was written in all 3 GPUs, which is OK.
- I tested - nvidia-smiUndervoltage/Powerlimit (pl) for all GPUs, using:- nvidia-smi -pl 120- and it also works, since mining with T-Rex the power limit is seen, which is OK. 
- I tested - nvidia-serttingsfan for all GPUs like this:- nvidia-settings -a [gpu:0]/GPUFanControlState=1 nvidia-settings -a [fan:0]/GPUTargetFanSpeed=50- and it also works. The fans start at once running faster. 
- When I open the NVIDIA X Server Settings app, I can manually change under each GPU's PowerMizer option the values for Graphics Clock Offset and Memory Transfer Rate Offset. After pressing Enter the value becomes active. When mining with T-Rex, the Hash-Rate goes up, which is OK. 
So everything works fine, but I want to do all the above in an automated way using a shell script, which I have tried.
BUT:
Overclocking is not running with these commands from the terminal. Even the prompt answer is Attribute ... assigned ... as you can see below:
$ nvidia-settings -a GPUGraphicsClockOffset[3]=-500
Attribute 'GPUGraphicsClockOffset' (katzminer-desktop:0.0) assigned to value -500.
Attribute 'GPUGraphicsClockOffset' (katzminer-desktop:0.1) assigned to value -500.
Attribute 'GPUGraphicsClockOffset' (katzminer-desktop:0[gpu:0]) assigned to value -500.
Attribute 'GPUGraphicsClockOffset' (katzminer-desktop:0[gpu:1]) assigned to value -500.
$ nvidia-settings -a GPUMemoryTransferRateOffset[3]=2200
Attribute 'GPUMemoryTransferRateOffset' (katzminer-desktop:0.0) assigned to value 2200.
Attribute 'GPUMemoryTransferRateOffset' (katzminer-desktop:0.1) assigned to value 2200.
Attribute 'GPUMemoryTransferRateOffset' (katzminer-desktop:0[gpu:0]) assigned to value 2200.
Attribute 'GPUMemoryTransferRateOffset' (katzminer-desktop:0[gpu:1]) assigned to value 2200.
When I check the NVIDIA X Server Settings app, under each GPU's PowerMizer option, the value for GPUGraphicsClockOffset and GPUMemoryTransferRateOffset is still 0.
What am I doing wrong?
I also tried for each GPU without success:
nvidia-setttings -c :0 -a '[gpu:0]/GPUMemoryTransferRateOffset[3]=2200'
nvidia-settings -c :0 -a '[gpu:0]/GPUGraphicsClockOffset[3]=-500'
Do I need to use sudo before nvidia-settings?
Or do I need to set persistency mode before like this:
nvidia-smi --persistence-mode=1
Do I have to set PowerMizer-Mode too?
Is my installation of the NVIDIA drivers correct ? Because in a forum I also saw that users install the NVIDIA drivers this way:
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install ubuntu-drivers-common
sudo apt install nvidia-driver-460 
sudo reboot
All help is much appreciated.
 
     
    