Enable nvidia-persistenced for proper frequency scaling support


Recommended Posts

I've been toying around with steam-headless docker and the nvidia driver package for a bit. Without nvidia-persistenced started, as soon as `steam` runs within the docker the power state is P0 and never leaves it. Even after closing the docker down, the power state remains at P0, killing all handles with `fuser -kv /dev/dri/card0` also kills the unraid X server and leaves nothing to manage the power state, so it's still at P0 - at least until I `startx` which grabs the card again and shifts it back to P8. With the daemon running, steam doesn't lock it to P0 - instead the frequency scales dynamically as would be expected, initially going to P5 pulling 10w (instead of the 20w at P0 idle) and then eventually settling back down to P8 and pulling 5W or less.

Before starting nvidia-persistenced:
image.png.d7fd80df81c59e983e3f0b03dd080a73.png

After starting nvidia-persistenced:
image.png.cfcfbfc8b8c334bea30cbcd0859a7431.png

The effect is immediate as can be seen above. Killing the persistence daemon results in the power state being locked at wherever it was left until the next application requests a higher power state.


EDIT:

Turns out there is one more caveat to this, and maybe an undesired effect. The nvidia-persistenced keeps the driver loaded even with no application using it (so if zero processes are using the GPU) which does keep the power consumption higher than if there were no driver loaded at all. I don't know why this also allows the power state to drop for steam however. Just what happens in practice. I'm sure others can test and either validate or invalidate my findings.

Edited by Xaero
Link to comment
9 hours ago, Xaero said:

Just what happens in practice.

If you use your card only for Docker containers then simply put:

nvidia-persistenced

In your go file and you should be good to go to save power.

 

However if you are using your crad for Docker and some times in a VM them make sure to not put nvidia-persistemced in your go file because this can crash your server.

 

All above only applies if you are running Unraid not in GUI mode.

 

 

However if you are runnig Unraid GUI mode I would not recommend to use nvidia-persistenced.

Is it really true that steam-headless kills the GUI mode? Never heard of that before…

But if it‘s true that steam-headless kills the GUI then I would recommend for this special use case that you not boot into GUI mode and put nvidia-persistenced in the go file like mentioned above.

 


BTW this question would be also better shited in the Nvidia Driver plugin Support Thread since this is a plugin specific question…

Link to comment

It doesn't kill the unraid GUI, but it does latch the power state to P0 indefinitely as soon as steam starts within the docker. The only way I can get it back to a lower state is to kill everything using the card and then start a new x server (either in unraid or the docker) or by starting persistenced.

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.