{"slug": "nvidia-gpu-power-limits-for-linux-system", "title": "Nvidia GPU Power Limits for Linux System", "summary": "This article provides instructions for limiting the power draw of an NVIDIA GPU on a Linux system using the `nvidia-smi -pl` command. It explains how to check the current power limit, set a new limit (e.g., 370W), and verify the change, while also recommending driver persistence and a systemd service to automatically reapply the limit after a system reboot. The guide notes that the power configuration is lost on restart without this service and includes a disclaimer advising users to research before modifying GPU settings.", "body_md": "You can use the following commands to limit the maximum power allowed to your NVIDIA GPU when using linux systems.\nFirst, let's check how much power the GPU is allowed to draw and the current value:\nnvidia-smi -q -d POWER\nThis should return an output similar to this one:\n==============NVSMI LOG==============\nTimestamp : Fri Jul 12 17:27:17 2024\nDriver Version : 555.42.06\nCUDA Version : 12.5\nAttached GPUs : 1\nGPU 00000000:09:00.0\nGPU Power Readings\nPower Draw : 73.57 W\nCurrent Power Limit : 450.00 W\nRequested Power Limit : 450.00 W\nDefault Power Limit : 450.00 W\nMin Power Limit : 150.00 W\nMax Power Limit : 480.00 W\nPower Samples\nDuration : 2.36 sec\nNumber of Samples : 119\nMax : 75.79 W\nMin : 73.21 W\nAvg : 73.80 W\nGPU Memory Power Readings\nPower Draw : N/A\nModule Power Readings\nPower Draw : N/A\nCurrent Power Limit : N/A\nRequested Power Limit : N/A\nDefault Power Limit : N/A\nMin Power Limit : N/A\nMax Power Limit : N/A\nThen, to actually apply the desired limit you can use the command below:\nsudo nvidia-smi -pl 370\nIn this example we are setting the power limit to 370w, which is more than enough for games and should yield enough power for most Machine Learning workloads without setting your house on fire.\nOBS: Feel free to adjust this value based on your needs and don´t take my word as law, do some research before doing any changes to your GPU, I'm not responsible for any damages for your hardware.\nYou can check if the new limits have been applied by executing the POWER\ncommand again:\nnvidia-smi -q -d POWER\n==============NVSMI LOG==============\nTimestamp : Fri Jul 12 17:27:44 2024\nDriver Version : 555.42.06\nCUDA Version : 12.5\nAttached GPUs : 1\nGPU 00000000:09:00.0\nGPU Power Readings\nPower Draw : 32.89 W\nCurrent Power Limit : 370.00 W\nRequested Power Limit : 370.00 W\nDefault Power Limit : 450.00 W\nMin Power Limit : 150.00 W\nMax Power Limit : 480.00 W\nPower Samples\nDuration : 2.36 sec\nNumber of Samples : 119\nMax : 36.05 W\nMin : 31.43 W\nAvg : 33.08 W\nGPU Memory Power Readings\nPower Draw : N/A\nModule Power Readings\nPower Draw : N/A\nCurrent Power Limit : N/A\nRequested Power Limit : N/A\nDefault Power Limit : N/A\nMin Power Limit : N/A\nMax Power Limit : N/A\nThe recommended way to persist these changes to the system is to enable the driver persistence using the following command:\nsudo nvidia-smi -pm 1\nExpect this output:\nEnabled Legacy persistence mode for GPU 00000000:09:00.0.\nAll done.\nA known issue with this approach is that for some reason the power configuration is lost when you restart the machine, meaning you will need to re-apply this configuration everytime you start your computer, to avoid this, let's create a custom service to execute automatically.\nCreate a new file called /etc/systemd/system/nvidia-power-limit.service\nand paste the following content:\n[Unit]\nDescription=Set NVIDIA GPU Power Limit\n[Service]\nType=oneshot\nExecStart=/usr/bin/nvidia-smi -pl 370\n[Install]\nWantedBy=multi-user.target\nWARNING: Update the value to match your needs\nSave the file and enable the new service:\nsudo systemctl enable nvidia-power-limit.service\nThese instructions are based on the following blog post from LinuxConfig and I just reviewed if they were still valid and translated to something easier to access and remember, but they are the ones that deserve the credit and praise:", "url": "https://wpnews.pro/news/nvidia-gpu-power-limits-for-linux-system", "canonical_source": "https://gist.github.com/jctosta/b968a6edc592ad7d06d9c91bd0796024", "published_at": "2024-07-12 21:04:42+00:00", "updated_at": "2026-05-23 22:35:32.284219+00:00", "lang": "en", "topics": ["hardware", "developer-tools"], "entities": ["Nvidia", "Linux"], "alternates": {"html": "https://wpnews.pro/news/nvidia-gpu-power-limits-for-linux-system", "markdown": "https://wpnews.pro/news/nvidia-gpu-power-limits-for-linux-system.md", "text": "https://wpnews.pro/news/nvidia-gpu-power-limits-for-linux-system.txt", "jsonld": "https://wpnews.pro/news/nvidia-gpu-power-limits-for-linux-system.jsonld"}}