Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oc coreclock an memclock on linux #258

Open
konwin opened this issue Feb 8, 2022 · 7 comments
Open

oc coreclock an memclock on linux #258

konwin opened this issue Feb 8, 2022 · 7 comments

Comments

@konwin
Copy link

konwin commented Feb 8, 2022

Could you fix the OC function on linux? At the moment it is not possible to set the memclock to high values!
I'm using an external script to adjust powerlimit, p-state, coreclock, lock coreclock, memclock and to controll the fans which is running fine parallel to TBM, but if TBM restarts dag verification fails because the script doesn't know TBM need to verify dag and keeps all oc-clocks!
For the scirpt to work without password promt I just had to add myUSERNAME ALL=(ALL:ALL) NOPASSWD:/usr/bin/nvidia-smi to /etc/sudoers
It's using the following commands to set: [in brackets my values for 3060ti NLHR]

persistence-mode

sudo nvidia-smi --persistence-mode=1 --id="$GPUID" 1> /dev/null

powerlimit [65]

sudo nvidia-smi --id="$GPUID" -pl "$POWERDRAW" 1> /dev/null

PowerMizerMode

nvidia-settings --assign [gpu:$GPUID]/GPUPowerMizerMode=0 1> /dev/null

coreclock-offset (GPUGraphicsClockOffset "4" for RTX 3xxx, "3" for <= RTX 2xxx) [-500]

nvidia-settings --assign [gpu:$GPUID]/GPUGraphicsClockOffset["4"]="$CORECLOCK" 1> /dev/null

lock coreclock [850]

sudo nvidia-smi --id="$GPUID" -lgc "$LOCKCORECLOCK" 1> /dev/null

set memclock (GPUMemoryTransferRateOffset "4" for RTX 3xxx, "3" for <= RTX 2xxx) [2400]

nvidia-settings --assign [gpu:$GPUID]/GPUMemoryTransferRateOffset["4"]="$MEMCLOCK" 1> /dev/null

@sp-hash
Copy link
Owner

sp-hash commented Feb 8, 2022

Lower the clocks on one of the gpus in the rig. If the verification fails, the other gpus will copy the dag from the working gpu. You can even clock cards higher with this trick.

TBMiner 1.48 or greater is needed.

--lock-cclock [850,850] is doing the same thing on the coreclock.

@konwin
Copy link
Author

konwin commented Feb 8, 2022

But why not lowering the clock for dag verification and then clock them higher? I don't want to have one GPU running all the time with lower clocks!
Also --lock-mclock ist not working correctly. I can't get my cards to >8000MHz! Can you implement nvidia-settings --assign [gpu:$GPUID]/GPUMemoryTransferRateOffset["4"]="$MEMCLOCK" for mclock. Because this allows higher clocks!

@sp-hash
Copy link
Owner

sp-hash commented Feb 8, 2022

sure. thanks

@sp-hash
Copy link
Owner

sp-hash commented Feb 14, 2022

Tested on ubuntu 20.04 GPUMemoryTransferRateOffset has no effect. (rtx 2060)

@konwin
Copy link
Author

konwin commented Feb 14, 2022

for cards before RTX 3xxx it has to be "3" in nvidia-settings --assign [gpu:$GPUID]/GPUMemoryTransferRateOffset["3"]="$MEMCLOCK"

@sp-hash
Copy link
Owner

sp-hash commented Feb 14, 2022

On the 495.29.05 driver on a laptop, this option is not there

~$ nvidia-settings -q all | grep GPUMemory
Attribute 'GPUMemoryInterface' (xxx:1.0): 192.
'GPUMemoryInterface' is an integer attribute.
'GPUMemoryInterface' is a read-only attribute.
'GPUMemoryInterface' can use the following target types: X Screen, GPU.
Attribute 'TotalDedicatedGPUMemory' (xxx:1[gpu:0]): 5926.
'TotalDedicatedGPUMemory' is an integer attribute.
'TotalDedicatedGPUMemory' is a read-only attribute.
'TotalDedicatedGPUMemory' can use the following target types: GPU.
Attribute 'UsedDedicatedGPUMemory' (xxx:1[gpu:0]): 5558.
'UsedDedicatedGPUMemory' is an integer attribute.
'UsedDedicatedGPUMemory' is a read-only attribute.
'UsedDedicatedGPUMemory' can use the following target types: GPU.
Attribute 'GPUMemoryInterface' (xxx:1[gpu:0]): 192.
'GPUMemoryInterface' is an integer attribute.
'GPUMemoryInterface' is a read-only attribute.
'GPUMemoryInterface' can use the following target types: X Screen, GPU.

@konwin
Copy link
Author

konwin commented Feb 14, 2022

I also don't get it as an option (ubuntu 21.04, driver 495.46, 10x 3060ti):

~$ nvidia-settings -q all | grep GPUMemory
Attribute 'GPUMemoryInterface' (xxx:0.0): 256.
'GPUMemoryInterface' is an integer attribute.
'GPUMemoryInterface' is a read-only attribute.
'GPUMemoryInterface' can use the following target types: X Screen, GPU.
Attribute 'GPUMemoryInterface' (xxx:0.1): 256.
'GPUMemoryInterface' is an integer attribute.
'GPUMemoryInterface' is a read-only attribute.
'GPUMemoryInterface' can use the following target types: X Screen, GPU.
Attribute 'GPUMemoryInterface' (xxx:0.2): 256.
'GPUMemoryInterface' is an integer attribute.
'GPUMemoryInterface' is a read-only attribute.
'GPUMemoryInterface' can use the following target types: X Screen, GPU.
Attribute 'GPUMemoryInterface' (xxx:0.3): 256.
'GPUMemoryInterface' is an integer attribute.
'GPUMemoryInterface' is a read-only attribute.
'GPUMemoryInterface' can use the following target types: X Screen, GPU.
Attribute 'GPUMemoryInterface' (xxx:0.4): 256.
'GPUMemoryInterface' is an integer attribute.
'GPUMemoryInterface' is a read-only attribute.
'GPUMemoryInterface' can use the following target types: X Screen, GPU.
Attribute 'GPUMemoryInterface' (xxx:0.5): 256.
'GPUMemoryInterface' is an integer attribute.
'GPUMemoryInterface' is a read-only attribute.
'GPUMemoryInterface' can use the following target types: X Screen, GPU.
Attribute 'GPUMemoryInterface' (xxx:0.6): 256.
'GPUMemoryInterface' is an integer attribute.
'GPUMemoryInterface' is a read-only attribute.
'GPUMemoryInterface' can use the following target types: X Screen, GPU.
Attribute 'GPUMemoryInterface' (xxx:0.7): 256.
'GPUMemoryInterface' is an integer attribute.
'GPUMemoryInterface' is a read-only attribute.
'GPUMemoryInterface' can use the following target types: X Screen, GPU.
Attribute 'GPUMemoryInterface' (xxx:0.8): 256.
'GPUMemoryInterface' is an integer attribute.
'GPUMemoryInterface' is a read-only attribute.
'GPUMemoryInterface' can use the following target types: X Screen, GPU.
Attribute 'GPUMemoryInterface' (xxx:0.9): 256.
'GPUMemoryInterface' is an integer attribute.
'GPUMemoryInterface' is a read-only attribute.
'GPUMemoryInterface' can use the following target types: X Screen, GPU.
Attribute 'TotalDedicatedGPUMemory' (xxx:0[gpu:0]): 7976.
'TotalDedicatedGPUMemory' is an integer attribute.
'TotalDedicatedGPUMemory' is a read-only attribute.
'TotalDedicatedGPUMemory' can use the following target types: GPU.
Attribute 'UsedDedicatedGPUMemory' (xxx:0[gpu:0]): 5000.
'UsedDedicatedGPUMemory' is an integer attribute.
'UsedDedicatedGPUMemory' is a read-only attribute.
'UsedDedicatedGPUMemory' can use the following target types: GPU.
Attribute 'GPUMemoryInterface' (xxx:0[gpu:0]): 256.
'GPUMemoryInterface' is an integer attribute.
'GPUMemoryInterface' is a read-only attribute.
'GPUMemoryInterface' can use the following target types: X Screen, GPU.
Attribute 'TotalDedicatedGPUMemory' (xxx:0[gpu:1]): 7982.
'TotalDedicatedGPUMemory' is an integer attribute.
'TotalDedicatedGPUMemory' is a read-only attribute.
'TotalDedicatedGPUMemory' can use the following target types: GPU.
Attribute 'UsedDedicatedGPUMemory' (xxx:0[gpu:1]): 4957.
'UsedDedicatedGPUMemory' is an integer attribute.
'UsedDedicatedGPUMemory' is a read-only attribute.
'UsedDedicatedGPUMemory' can use the following target types: GPU.
Attribute 'GPUMemoryInterface' (xxx:0[gpu:1]): 256.
'GPUMemoryInterface' is an integer attribute.
'GPUMemoryInterface' is a read-only attribute.
'GPUMemoryInterface' can use the following target types: X Screen, GPU.
Attribute 'TotalDedicatedGPUMemory' (xxx:0[gpu:2]): 7982.
'TotalDedicatedGPUMemory' is an integer attribute.
'TotalDedicatedGPUMemory' is a read-only attribute.
'TotalDedicatedGPUMemory' can use the following target types: GPU.
Attribute 'UsedDedicatedGPUMemory' (xxx:0[gpu:2]): 4957.
'UsedDedicatedGPUMemory' is an integer attribute.
'UsedDedicatedGPUMemory' is a read-only attribute.
'UsedDedicatedGPUMemory' can use the following target types: GPU.
Attribute 'GPUMemoryInterface' (xxx:0[gpu:2]): 256.
'GPUMemoryInterface' is an integer attribute.
'GPUMemoryInterface' is a read-only attribute.
'GPUMemoryInterface' can use the following target types: X Screen, GPU.
Attribute 'TotalDedicatedGPUMemory' (xxx:0[gpu:3]): 7982.
'TotalDedicatedGPUMemory' is an integer attribute.
'TotalDedicatedGPUMemory' is a read-only attribute.
'TotalDedicatedGPUMemory' can use the following target types: GPU.
Attribute 'UsedDedicatedGPUMemory' (xxx:0[gpu:3]): 4957.
'UsedDedicatedGPUMemory' is an integer attribute.
'UsedDedicatedGPUMemory' is a read-only attribute.
'UsedDedicatedGPUMemory' can use the following target types: GPU.
Attribute 'GPUMemoryInterface' (xxx:0[gpu:3]): 256.
'GPUMemoryInterface' is an integer attribute.
'GPUMemoryInterface' is a read-only attribute.
'GPUMemoryInterface' can use the following target types: X Screen, GPU.
Attribute 'TotalDedicatedGPUMemory' (xxx:0[gpu:4]): 7982.
'TotalDedicatedGPUMemory' is an integer attribute.
'TotalDedicatedGPUMemory' is a read-only attribute.
'TotalDedicatedGPUMemory' can use the following target types: GPU.
Attribute 'UsedDedicatedGPUMemory' (xxx:0[gpu:4]): 4957.
'UsedDedicatedGPUMemory' is an integer attribute.
'UsedDedicatedGPUMemory' is a read-only attribute.
'UsedDedicatedGPUMemory' can use the following target types: GPU.
Attribute 'GPUMemoryInterface' (xxx:0[gpu:4]): 256.
'GPUMemoryInterface' is an integer attribute.
'GPUMemoryInterface' is a read-only attribute.
'GPUMemoryInterface' can use the following target types: X Screen, GPU.
Attribute 'TotalDedicatedGPUMemory' (xxx:0[gpu:5]): 7982.
'TotalDedicatedGPUMemory' is an integer attribute.
'TotalDedicatedGPUMemory' is a read-only attribute.
'TotalDedicatedGPUMemory' can use the following target types: GPU.
Attribute 'UsedDedicatedGPUMemory' (xxx:0[gpu:5]): 4957.
'UsedDedicatedGPUMemory' is an integer attribute.
'UsedDedicatedGPUMemory' is a read-only attribute.
'UsedDedicatedGPUMemory' can use the following target types: GPU.
Attribute 'GPUMemoryInterface' (xxx:0[gpu:5]): 256.
'GPUMemoryInterface' is an integer attribute.
'GPUMemoryInterface' is a read-only attribute.
'GPUMemoryInterface' can use the following target types: X Screen, GPU.
Attribute 'TotalDedicatedGPUMemory' (xxx:0[gpu:6]): 7982.
'TotalDedicatedGPUMemory' is an integer attribute.
'TotalDedicatedGPUMemory' is a read-only attribute.
'TotalDedicatedGPUMemory' can use the following target types: GPU.
Attribute 'UsedDedicatedGPUMemory' (xxx:0[gpu:6]): 4957.
'UsedDedicatedGPUMemory' is an integer attribute.
'UsedDedicatedGPUMemory' is a read-only attribute.
'UsedDedicatedGPUMemory' can use the following target types: GPU.
Attribute 'GPUMemoryInterface' (xxx:0[gpu:6]): 256.
'GPUMemoryInterface' is an integer attribute.
'GPUMemoryInterface' is a read-only attribute.
'GPUMemoryInterface' can use the following target types: X Screen, GPU.
Attribute 'TotalDedicatedGPUMemory' (xxx:0[gpu:7]): 7982.
'TotalDedicatedGPUMemory' is an integer attribute.
'TotalDedicatedGPUMemory' is a read-only attribute.
'TotalDedicatedGPUMemory' can use the following target types: GPU.
Attribute 'UsedDedicatedGPUMemory' (xxx:0[gpu:7]): 4957.
'UsedDedicatedGPUMemory' is an integer attribute.
'UsedDedicatedGPUMemory' is a read-only attribute.
'UsedDedicatedGPUMemory' can use the following target types: GPU.
Attribute 'GPUMemoryInterface' (xxx:0[gpu:7]): 256.
'GPUMemoryInterface' is an integer attribute.
'GPUMemoryInterface' is a read-only attribute.
'GPUMemoryInterface' can use the following target types: X Screen, GPU.
Attribute 'TotalDedicatedGPUMemory' (xxx:0[gpu:8]): 7982.
'TotalDedicatedGPUMemory' is an integer attribute.
'TotalDedicatedGPUMemory' is a read-only attribute.
'TotalDedicatedGPUMemory' can use the following target types: GPU.
Attribute 'UsedDedicatedGPUMemory' (xxx:0[gpu:8]): 4957.
'UsedDedicatedGPUMemory' is an integer attribute.
'UsedDedicatedGPUMemory' is a read-only attribute.
'UsedDedicatedGPUMemory' can use the following target types: GPU.
Attribute 'GPUMemoryInterface' (xxx:0[gpu:8]): 256.
'GPUMemoryInterface' is an integer attribute.
'GPUMemoryInterface' is a read-only attribute.
'GPUMemoryInterface' can use the following target types: X Screen, GPU.
Attribute 'TotalDedicatedGPUMemory' (xxx:0[gpu:9]): 7982.
'TotalDedicatedGPUMemory' is an integer attribute.
'TotalDedicatedGPUMemory' is a read-only attribute.
'TotalDedicatedGPUMemory' can use the following target types: GPU.
Attribute 'UsedDedicatedGPUMemory' (xxx:0[gpu:9]): 4957.
'UsedDedicatedGPUMemory' is an integer attribute.
'UsedDedicatedGPUMemory' is a read-only attribute.
'UsedDedicatedGPUMemory' can use the following target types: GPU.
Attribute 'GPUMemoryInterface' (xxx:0[gpu:9]): 256.
'GPUMemoryInterface' is an integer attribute.
'GPUMemoryInterface' is a read-only attribute.
'GPUMemoryInterface' can use the following target types: X Screen, GPU.

but it works (2450=8025 effective clock):
~$ nvidia-settings --assign [gpu:9]/GPUMemoryTransferRateOffset["4"]="2450"

Attribute 'GPUMemoryTransferRateOffset' (xxx:0[gpu:9]) assigned value 2450.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants