Unable to run nvidia-settings via SSH linux

I have X Server running and nvidia drivers installed on remote host (Debian) and local machone (Kali Linux).

When I SSH to remote host with ssh -X option, I can run any X app (like firefox, xclock, etc), except nvidia-settings. The command:

nvidia-settings --display=:10 --verbose=all

produces:

WARNING: NV-CONTROL extension not found on this Display.
ERROR: Unable to load info from any available system
ERROR: Unable to assign attribute <XX> specified on line <YY> of configuration file '~/.nvidia-settings-rc' (no Display connection).

I tried to run it as a root.

For that I added credentials to root user /.Xauthority:

  1. sudo -s
  2. xauth add $(xauth -f <NON_ROOT_USER_HOME_FOLDER>/.Xauthority list | tail -1)

Now I can execute any X Window app as a root, like xcalc, xclock, etc.

Nut when I run nvidia-settings --display=:10 --verbose=all, I have the same problem - no display detected:

(nvidia-settings:1122): dbind-WARNING **: 16:20:09.388: Couldn’t connect to accessibility bus: Failed to connect to socket /tmp/dbus-TyVgj6rszA: Нет такого файла или каталога (english: no such file or folder)
WARNING: NV-CONTROL extension not found on this Display.
ERROR: Unable to load info from any available system

Could you please advice what can cause the issue?

UPD: I have solve the issue.

The point is, that by default nvidia-settings utility queries and updates the settings of X-Server it is running at.

If you run nvidia-settings locally (where NVIDIA drivers are installed), you communicate with that local X-server. But when you run this command via SSH, nvidia-settings tries to query the host from which you are running SSH connection. In my case this host (my laptop) had Intel video driver - that is why I received the NV-CONTROL extension not found on this Display. message.

All I need to do is to indicate the X server which needs to be contolled by-Nvidia-settings utility. In my case it was display 0 (the 0-th display on the host where Nvidia driver is installed)

So, the right commant is:
nvidia-settings --display=:10 --ctrl-display=:0 [paraneters]

–display=:10 is the SSH display, you can get the correct number by typing echo $DISPLAY in SSH window
–display=:0 is the 0th display on the gost where Nvidia is installed