Locking your graphics card's clocks to a fixed speed or range can make benchmarking more consistent, keep a local AI or render job at a predictable speed, or rein in boost behaviour. NVIDIA's command-line tool nvidia-smi can do this with the -lgc (lock GPU clocks) and -lmc (lock memory clocks) options, and it can undo them with -rgc and -rmc. This guide is based on NVIDIA's official nvidia-smi documentation. Support varies by GPU and driver, so we don't quote any performance or power results.
Before you start
Supported GPUs: NVIDIA lists GPU clock locking (-lgc) and both reset commands as supported on Volta and newer GPUs. Older cards won't work.
Admin rights: NVIDIA's documentation says the lock and reset commands require root. On Linux, run them with sudo. On Windows, open Terminal or Command Prompt as administrator.
Know your limits: locking clocks isn't the same as overclocking, but don't force clocks your card isn't designed to run. Check your card's supported clocks first (see step 1).
Have a way back: note the reset commands in step 4 before you change anything.
Step 1: Check current and supported clocks
Run nvidia-smi -q -d CLOCK to see the current clocks. NVIDIA's documentation lists the Clocks section (current graphics, SM, memory and video clocks) and a Max Clocks section, which it describes as the maximum frequency each part of the GPU is designed to run at, in MHz.
To see which clock values your card supports, run:
nvidia-smi -q -d SUPPORTED_CLOCKS
You can also use nvidia-smi --query-supported-clocks= with fields listed by nvidia-smi --help-query-supported-clocks. If a value shows "N/A", NVIDIA says that device or environment doesn't support that information.
If you have more than one GPU, add -i followed by the GPU's index, UUID or PCI bus ID to target one card. NVIDIA recommends UUID or PCI bus ID for consistency, because index order isn't guaranteed to stay the same between reboots.
Step 2: Lock the GPU (core) clock
Use -lgc (or --lock-gpu-clocks) with a minimum and maximum clock in MHz:
nvidia-smi -i 0 -lgc 1500,1500
NVIDIA's own example uses 1500,1500 to lock to a single speed. You can also give a range, such as -lgc 1200,1800, or a single value. NVIDIA describes the values as the closest desired locked clock speed, so the card may not land on exactly the number you type.
NVIDIA lists an optional --mode setting. Mode 0 is the default and gives the highest frequency accuracy the hardware supports. Mode 1 uses closed-loop controllers and can improve performance per watt for some applications, but NVIDIA says the accuracy may be slightly lower.
Step 3: Lock the memory clock (optional)
Use -lmc (or --lock-memory-clocks) with a minimum and maximum memory clock in MHz, for example:
nvidia-smi -i 0 -lmc 5100,5100
Run nvidia-smi -lmi (--lock-memory-clocks-info) first. NVIDIA says it shows whether your GPU supports memory clock locking at all, and whether it's applied at runtime or only after the GPU is next initialised ("deferred"). Not every card supports runtime memory locking. NVIDIA notes that -lmc doesn't work on Hopper-based GPUs, which need --lock-memory-clocks-deferred instead.
Step 4: Check it worked, then reset
Run nvidia-smi -q -d CLOCK again while your app or game is running. Clocks can still drop. NVIDIA's documentation says the Clocks Event Reasons section shows factors that are reducing clock speeds, such as power or thermal limits. Our GPU throttling guide explains how to read it.
To return to normal behaviour, run:
Don't use the old -ac option
Older guides often use -ac (applications clocks). NVIDIA now marks this option as deprecated and says it will be removed in a future CUDA release. NVIDIA recommends -lgc and -lmc instead.
If you want to cut power use rather than fix clock speeds, see how to set a GPU power limit with nvidia-smi or how to undervolt a GPU. To record clocks over time, use how to log GPU usage with nvidia-smi. For a graphical tool, see how to overclock a GPU with MSI Afterburner.