NVIDIA proprietairy diver: how to activate SLI and runing nvidia-settings as root gives an error

Hi,
because of an error in a commercial application (a game) i contacted the developers support team and basically got the answer to try to activate SLI in my nvidia proprietairy diver. This should be done by typing:

sudo nvidia-settings

this way i would be able to store the nvidia configuration in a file at:
/etc/X11/xorg.conf
The next step would be to edit the file to activate SLI

Here are my problems:

  • typing: nvidia-settings (without sudo) starts the normal nividia settings GUI but i cannot save the configuration at this destination because iam not root
  • typing the command with sudo gives the following error:
ERROR: The control display is undefined; please run `nvidia-settings --help` for usage information.

then, if i remember correctly, is not it so that opensuse/kde does not need the xorg.conf anymore? so a manipulation in such a file would not activate SLI at all because it would be ignored right?
So apart from the problems above, how can i activate SLI then?

Hi
You can add it to the 50-device.conf file in /etc/X11/xorg.conf.d or if you have an /etc/X11/xorg.conf file, the device section;


Option "SLI" "string"

Where;
|0, no, off, false, Single|Use only a single GPU when rendering|
|---|---|
|1, yes, on, true, Auto|Enable SLI and allow the driver to automatically select the appropriate rendering mode.|
|AFR|Enable SLI and use the alternate frame rendering mode.|
|SFR|Enable SLI and use the split frame rendering mode.|
|SLIAA|Enable SLI and use SLI antialiasing. Use this in conjunction with full scene antialiasing to improve visual quality.
|



Which ever file is referring to the nvidia driver.

Of course not.
But you could save it into your home directory and then copy it to /etc/X11 using “sudo” or similar.

  • typing the command with sudo gives the following error:
ERROR: The control display is undefined; please run `nvidia-settings --help` for usage information.

You cannot run GUI application as root with sudo on openSUSE (at least not in the default configuration).
Use “kdesu” instead, that’s designed to do that.

then, if i remember correctly, is not it so that opensuse/kde does not need the xorg.conf anymore?

xorg.conf is deprecated since years. Nowadays Xorg should figure out everything automatically, and if you want to configure anything yourself snippets in /etc/X11/xorg.conf.d/ are preferred.

But, an xorg.conf is still respected if it exists. For more details see also “man xorg.conf”.

so a manipulation in such a file would not activate SLI at all because it would be ignored right?

No. As written above, xorg.conf will still be used by X if it exists.
But KDE’s kscreen might ignore/override it AFAIK, especially in multi-monitor configurations.
So if the xorg.conf doesn’t seem to work like intended, try to disable the “KScreen2” service in “Configure Desktop”->“Startup and Shutdown”->“Service Management”.

And apart from that, when you want to run a GUI application as root, you use either kdesu or gnomesu depending on what desktop you use. But you forgot to tell us which desktop you use. Same as you forgot to tell us which version of openSUSE you use >:(

Thanks i just saved the file at ~ and then copied it using sudo to the /etc/X11 directory, this even solved my problem with the game.
At first i wanted to change the files in /etc/X11/xorg.conf.d/ but all of them where empty, i mean just text comments but no commented out default settings
of something i just could use as template for my settings so i was unsure what i can write where and gave up.

Yes.
You put single sections of an xorg.conf into separate files in /etc/X11/xorg.conf.
Of course your settings (SLI in particular) are not in there already. They are included in the standard xorg packages and have no idea at all about the nvidia driver and its options.

The default files have most things commented out, as nowadays there should be no need for configuration normally. Xorg should be able to figure out everything automatically.

But as I said, it is perfectly file to use an xorg.conf. It is respected if it is there.
The new preferred way is to just provide the necessary snippets in /etc/X11/xorg.conf.d/ though.
Advantage: you only configure the things you need to configure, the rest is still determined automatically.

that is nice, i will try that when i am at home, thank you.

TBH, I wouldn’t bother.
If you used nvidia-settings to create an xorg.conf, just use that xorg.conf.

OTOH, as malcomlewis already wrote, you could add the SLI option to /etc/X11/xorg.conf.d/50-device.conf (you could also use a different filename like 50-mydevice.conf if you wanted to, the filename doesn’t matter). You have to uncomment all other lines in there first though. It needs to contain a full “Section”, just a line with the SLI option is not enough.
So something like this should work (not tested!):

Section "Device"
  Identifier "Default Device"

  Driver "nvidia"
  Option "SLI" "true"
EndSection

It should be possible to just take the corresponding Section from the generated xorg.conf though of course.

And if you make some mistake so X doesn’t start, just select “Recovery Mode” in the boot menu’s “Advanced Options”, this uses a completely different Xorg configuration, and undo/fix your changes.