Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Graphics card idle power usage in unraid server

Featured Replies

On 3/2/2021 at 3:41 PM, b0n3v said:

I edited the script provided by @mdsloop, now he working smooth, with cron run every 2 min.

 

VMnametocheck="Windows 10 Gaming"
stateofvm=$(virsh list --all | grep "$VMnametocheck" | awk 'NF{ print $NF }')
if [[ "$stateofvm" == "running"  ||  "$stateofvm" == "idle"  ||  "$stateofvm" == "paused" ]]; then
	echo "The $VMnametocheck VM is in $stateofvm state"
else
	echo "The $VMnametocheck VM is Shutted down! And now Nvidia GPU will go to power save state P8"
	nvidia-smi -pm 1
fi

 

 

Thanks for this work !

I discover just today my graphics cards used 18W all the time even with my Windows VM shutdown. Your script work perfectly in my case !

 

Have a great day.

  • 11 months later...
On 1/2/2023 at 10:24 AM, MeisterPilaf said:

Old Topic but maybe someone is interested in my Code:

 

# Get the number of GPUs
num_gpus=$(nvidia-smi --query-gpu=count --format=csv,noheader | awk 'NR==1 {sum+=$1} END {print sum}')

echo "Found $num_gpus GPUs."

# Iterate over the GPUs
for ((i=0; i< $num_gpus; i++)); do
  # Check if there are any processes running on GPU $i
  if nvidia-smi -i $i --query-compute-apps=pid --format=csv,noheader | grep -q '^[0-9]'; then
    echo "There are processes running on GPU $i."
  else
    echo "There are no processes running on GPU $i. Setting GPU $i to power save mode."
    nvidia-smi -i $i -pm 1
  fi
done

 

It first checks how many GPUS are installed and then if there are running processes. If not, Power save mode will be activated.

 

This worked for me on my Tesla P4. It was stuck at 1% being used by nothing, and kept idling at 24W, 800MHz GPU, 2000MHz Mem. This fixed it!

  • 2 months later...

What about AMD GPUs.. do they have this problem??

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.