NVIDIA GPU wont sleep (P8) after 6.9 upgrade


Recommended Posts

I've upgraded to 6.9 und installed the NVIDIA driver. All transcoding and other GPU related tasks are all working fine. However since the update, my GPU refuses to sleep when it isn't being used. According to the GPU statistics plugin, it stays in the P0 power state, even when there is nothing using it.

 

I had previously set up the "nvidia-smi_persistence_mode" user script to force the GPU to sleep, and though it still runs every hour, it seems to make no difference:

#!/bin/bash
gpupstate=$(nvidia-smi --query-gpu="pstate" --format=csv,noheader);
gpupid=$(nvidia-smi --query-compute-apps="pid" --format=csv,noheader);
if [ "$gpupstate" == "P0" ] && [ -z "$gpupid" ]; then fuser -kv /dev/nvidia*; fi;

 

Has anyone else had any luck getting this to work?

  • Upvote 1
Link to comment
  • 2 weeks later...
1 hour ago, SimplePete said:

Did you ever get this to work? I cannot get it into the P8 state either.

 

I use the following script that loads via user scripts plugin at the start of the array:

#!/bin/bash
nvidia-smi -pm 1

 

makes my gt 710 go to P8 reliably when not used by plex.

  • Like 2
  • Thanks 1
Link to comment
On 3/23/2021 at 8:19 PM, 1812 said:

 

I use the following script that loads via user scripts plugin at the start of the array:


#!/bin/bash
nvidia-smi -pm 1

 

makes my gt 710 go to P8 reliably when not used by plex.

 

It works! My 1070 now goes from P0 at 33W to P8 at 13W at idle (no transcoding in Jellyfin). I and my electric bill thank you!

  • Like 1
Link to comment
  • 9 months later...
  • 3 months later...
  • 8 months later...

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.

  • Thanks 1
Link to comment

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.