nvidia-settings failure: xserver not started?

Hi There,

Trying to overclock my two 1080 Ti GPUs, to do so, I set the GPU in persistence mode:

sudo nvidia-smi --persistence-mode=1
sudo nvidia-smi --power-limit=299

…Both commands are successful. But then, when I try either of the following commands:

nvidia-settings -a “GPUMemoryTransferRateOffset[3]=500”
nvidia-settings -a “GPUGraphicsClockOffset[3]=100”

I get:

Failed to connect to Mir: Failed to connect to server socket: No such file or directory
Unable to init server: Could not connect: Connection refused

ERROR: The control display is undefined; please run nvidia-settings --help for usage information.

I believe it has to do with a PATH variable not set correctly, because I am pretty sure I have all of the software I need to run this already installed (xorg, etc). So I don’t really know why it can’t find the server, or how to start the server, or why it’s refused.

I’ve heard this error may occur when a monitor is not connected to the computer, and to remedy this, I added the following command to the top of my script, but to no avail:

sudo nvidia-xconfig --connected-monitor=DFP

Any help you can provide in successfully getting the GPUMemoryTransferRateOffset and GPUGraphicsClockOffset variables set would be greatly appreciated! Thanks!

Here’s an update. Trying to run the command nvidia-settings gives the following error (same thing, pretty much):

Failed to connect to Mir: Failed to connect to server socket: No such file or directory
Unable to init server: Could not connect: Connection refused

ERROR: The control display is undefined; please run nvidia-settings --help for usage information.

So it appears that the control display is undefined, and that there is no server running. Next:

I get the following error when creating a NEW /etc/X11/xorg.conf file:

$ sudo nvidia-xconfig

Using X configuration file: “/etc/X11/xorg.conf”.

VALIDATION ERROR: Data incomplete in file /etc/X11/xorg.conf.
At least one Device section is required.

Package xorg-server was not found in the pkg-config search path.
Perhaps you should add the directory containing `xorg-server.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘xorg-server’ found

The last part suggests that an xserver is not being correctly referenced, and so nvidia-settings cannot find the server. Setting the PKG_CONFIG_PATH is at least one thing that I need to do. But I cannot find the path to ‘xorg-server.pc’, and indeed it seems that this isn’t installed on my computer.

Any suggestions?

normally nvidia-settings expects an X server to be running on your machine.

If that is not the case, I think it will complain.

Setting up an X server is distro-specific and is documented widely on the web.

Do you have an x server running? If you don’t know the answer to that, you probably need to learn what it is and how to answer that question.