Nvidia-settings: Unable to find display on any available system

I’ve been trying my best to get nvidia-settings to work, as I am trying to optimize my GeForce cards memory frequencies. I am using 7 cards - 6 from Ampere, 1 from Pascal. I’ve looked all over online, and have frequented this forum, in an attempt to figure out how to go about it to no avail.

I am attempting to do most of this work over SSH. I am aiming for headless, because I cannot be physically at the location of the machine frequently.

Using DISPLAY=:0 resulted in “Unable to find display on any available system”. This is after trying SSH forwarding (which resulted in a window that reported nothing but a “Help” and “Quit” button) and after redirecting the Xauthority to the active Xauthority listed in ps a | grep X.

Using prime-select nvidia results in;

Error: no integrated GPU detected.

Same applies for intel, on-demand options.

NVIDIA-SMI reports all as normal. Every card is reported and operating as anticipated.
It could be possible that the motherboard I am using (a board typically used for mining, the BTC-T37) could be affecting this, but I do not know. Constant purging and reinstalling later, and I am still at a loss.

Don’t use X forwarding, have an Xserver running on all gpus
Then correctly use DISPLAY and XAUTHORITY

Both of these solutions did not work. I had tried this only to get the same error.

Then you should make sure the Xserver is really running on the nvidia gpus and not on the on-board server graphics.

After much frustration… it appears the solution was sudo

sudo DISPLAY=:0 XAUTHORITY=/run/user/122/gdm/Xauthority nvidia-settings -q gpus -c :0

This was after ensuring that the nvidia-xconfig was used.

returned all available graphics cards… and now I can adjust frequencies and such.

Thank you for your rapid response.