Undervolting 2080 Ti via NVML and Python Script
Hello, I recently installed Bazzite and have been enoying it so far, but I'm missing the ability to undervolt from Windows. I found a Reddit thread detailing how to achieve something that is effectively an undervolt, but I'm running into issues attempting it in Bazzite.
This is the post in question: https://www.reddit.com/r/linux_gaming/comments/1fm17ea/undervolting_nvidia_gpu_in_2024/lo7mo09/
I can't seem to figure out how I should install the NVIDIA Management Library API, so I am unable to run my script. Is there a particular way I should try to achieve this in Bazzite? Thanks in advance.
8 Replies
I've made a bit of progress on my own. I've managed to install
nvidia-ml-py
and pynmvl
, but when I run the script I get an error that states:
ModuleNotFoundError: No module named 'pynvml'
I'm at a bit of a loss since I know basically nothing about python, so I don't understand why it can't find the module even though I've installed it. I suppose at this point it's more of a python question than a Bazzite one
Perhaps I need to try and do this through Homebrew or Distrobox? I'm not too familiar with either of those, but I see that they're recommended for certain applicationsDid you have any luck? I came here following this same guide on my card and got stuck at the same point, was about to ask here - running the following script:
#!/usr/bin/env python
from pynvml import *
nvmlInit()
device = nvmlDeviceGetHandleByIndex(0)
nvmlDeviceSetGpuLockedClocks(device, 210, 1695) # Set GPU clock speeds
nvmlDeviceSetGpcClkVfOffset(device, 200) # Set GPC clock offset
nvmlDeviceSetPowerManagementLimit(device, 315000) # Set power limit in milliwatts
I get the result -
ModuleNotFoundError: No module named 'pynvml'
That's exactly where I got stuck before unfortunately. I've since moved away from Nvidia since I was able to get a 9070 XT, so I'm not working on it anymore. Best of luck though, hope you can get it working
You know I was saying to myself.. "they probably picked up an AMD". Enjoy! Hopefully the performance picks up quickly in linux for you.
have you guys tried installing the pypi package in question?
Unsure what exacaly it is
Yeah I think there's a nvidia python binding
That's probably what you're looking for, not too sure if it will work tho
I'm a little too fresh to understand how to do this, I was of the udnerstanding it was ml-py and pynmvl that was required, are you referring to something else?
Yeah that is the two required supposedly
Not too sure myself then, sorry
I know it's too late for you - but a similar function is now built into LACT - https://github.com/ilya-zlobintsev/LACT/issues/486
GitHub
Add Undervolting Support for Nvidia GPUs via LockedClocks and GpcCl...
Hello, I would like to request support for effective undervolting on Nvidia GPUs. Currently, Nvidia does not allow modifying the voltage of the graphics cards in the latest driver versions, but usi...