While undervolting a CPU is straightforward, undervolting the dGPU is a bit trickier.
You can't directly undervolt the dGPU, but what you can do is overclock the frequency which results in any given frequency running at a lower voltage, thus effectively undervolting.
I have read first about this in this comment. u/Jr712 then provided more details in a post How I stopped my XPS 15 7590 GPU from throttling.
As described in the post, on Windows this can be done with MSI Afterburner. I would like to ask those of you who are more knowledgeable for instructions how can this be done on Linux.
I have read about this in some places, but as I have never done this before, I am not certain I will get what I want.
Here are some sources I have looked at:
- How to overclock Nvidia graphics cards on Linux
In the video, there is actually a slide bar where I could undervolt directly. Should I instead do that? (Although in the comments someone says that "Nvidia is not allowing voltage control on Linux for new gen cards") - How can I overclock a graphics card from within Ubuntu?
I know that overclocking is controlled via Coolbits
And as pointed out in Enabling overclocking:
The Coolbits option can be easily controlled with the nvidia-xconfig, which manipulates the Xorg configuration files:
nvidia-xconfig --cool-bits=*value*
But the above links set different levels: 12
vs. 28
.
Also, I'd like to learn more about:
What are the risks? Especially for CUDA usage (e.g. wrong calculations)?
I can read in Enabling overclocking:
Warning: Overclocking might permanently damage your hardware. You have been warned.
This leads me to the next question:
What is the "safe" range for overclocking?
If I overclock the dGPU, should I offset also the mem clock? By how much?
The procedure you are describing to enable the overclock is correct. Usually I prefer to directly edit the configuration file in the X11 folder but there should be no difference in the two methods. I suggest to edit the coolbits to the value of 28.
If you wish to undervolt your GPU it will be less stable at high clock rates. Only in some special cases an undervolt enables extra clock rate (e.g. when the voltage is too high and causes overheating). In your case If you want to undervolt you should not increase the clock rate, you should leave it as default or lower a little bit until the system is stable.
Keep in mind that not all Nvidia GPUs are able to change the voltage, especially notebook GPUs won't allow voltage tweaking.
If you want to stop throttling of the GPU you should lower the temperatures by ramping up the fans rpm and possibly allow an higher power usage if the option is enabled in the nvidia-settings menu.
The possible risks of overclocking are:
For some simple testing +100 MHz on the Core clock and +300/500 MHz for the VRAM are a safe starting point.