Dreaming-Codes / nvidia_oc

A simple command line tool to overclock Nvidia GPUs using the NVML library on Linux. This supports both X11 and Wayland.
https://crates.io/crates/nvidia_oc
MIT License
49 stars 1 forks source link

Add voltage changes support #12

Closed dougg0k closed 1 month ago

dougg0k commented 1 month ago

Hi,

Can you add voltages setting support?

Current offered options seems to be related to frequency only.

It would make easy to undervolt the gpu with it.

Dreaming-Codes commented 1 month ago

I'll check if NVML provides a way to do that soon™

dougg0k commented 1 month ago

https://github.com/jacklul/nvml-scripts/tree/master/nvml-undervolt

Dreaming-Codes commented 1 month ago

jacklul/nvml-scripts@master/nvml-undervolt

As the author says

This is a simple script to setup an undervolt on Linux by shifting the curve up using an offset and then locking the max clock. Currently there is no straightforward way to achieve this as there is no voltage/curve control on Linux so this is my hacky scripted method.

This requires extensive configuration, which many users may find difficult to understand. Additionally, it depends on a daemon, whereas I want this tool to be a one-time run.

dougg0k commented 1 month ago

A daemon could be a --flag as optional. But sure.

dougg0k commented 1 month ago

Also, this tool, doesnt seem to do anything more than you already can do with nvidia-smi. Maybe offering different functionality would increase the tool usefulness.

Can't you achieve the same thing just with nvidia-smi --persistence-mode=1 --power-limit=200 --lock-gpu-clocks=offset,max --lock-memory-clocks=offset,max

Something related to this issue. To watch voltage watch -n 1 'nvidia-smi -q -d VOLTAGE'

[Unit]
Description=NVIDIA OC Service

[Service]
Type=oneshot
ExecStart=/usr/bin/nvidia-smi --persistence-mode=1 --power-limit=200 --lock-gpu-clocks=offset,max --lock-memory-clocks=offset,max
User=root

[Install]
WantedBy=multi-user.target