nvidia-xconfig doesnt do what i want it to, nor does nvidia-settings

The PrimaryGPU option should be added to the file /usr/share/X11/xorg.conf.d/10-nvidia.conf not 10-nvidia-drm-outputclass.conf. Did you try that?

Like Oxyged said, if you want to switch to nvidia, the PrimaryGPU option is missing, also you need to create the .desktop files as in my initial post
https://forums.developer.nvidia.com/t/nvidia-xconfig-doesnt-do-what-i-want-it-to-nor-does-nvidia-settings/107883/7?u=generix

Hello guys. I make almost the same and i succeed. I am using openbox + slim, without a DE. So with slim it worked for me. I put the line:

xrandr --setprovideroutputsource modesetting NVIDIA-G0; xrandr --auto

in /etc/xdg/openbox/autostart file and it worked for me. But I want to use the lightdm instead of slim and it doesn’t want to work. It’s starts with a black display.
For lightdm i made a bash file optimus-nvidia-gpu.sh and i put this options in /etc/lightdm/lightdm.conf file:

display-setup-script=/usr/share/optimus-nvidia-gpu.sh
greeter-setup-script=/usr/share/optimus-nvidia-gpu.sh
session-setup-script=/usr/share/optimus-nvidia-gpu.sh

also I tried to put the xrandr options in ~/.xinitrc, /etc/lightdm/Xsession and I made the optimus.desktop launcher in /etc/xdm/autostart/

nothing doesn’t work.

But when I am starting openbox wit the startx command it’s starting with the right (Nvidia) gpu but it’s starting in wayland session. But I need this to work in X11 session.

so the question is, how to make lightdm + openbox to start with the right (nvidia) gpu in x11-wayland session

Did you use the correct lightdm config section?
https://wiki.archlinux.org/index.php/NVIDIA_Optimus#LightDM
you could also change the script to run

xrandr --listproviders >/var/tmp/providers.txt

and then check if the providers are there at all.

oh. I just moved this config lines under the section [Seat:*]

display-setup-script=/usr/share/optimus-nvidia-gpu.sh
greeter-setup-script=/usr/share/optimus-nvidia-gpu.sh
session-setup-script=/usr/share/optimus-nvidia-gpu.sh

and now is perfect :) thank you!

Dear Generix,

I really appreciate all the help you have been offering folks.
I am in a similar situation (I think) and I have been unable to solve it with the above advice.

nvidia-settings yields
ERROR: Unable to load info from any available system
(nvidia-settings:3476): GLib-GObject- CRITICAL **: 23:49:17.890: g_object_unref: assertion ‘G_IS_OBJECT (object)’ failed
** Message : 23:49:17.894: PRIME: No offloading required. Abort
** Message : 23:49:17.894: PRIME: is it supported? no

glxinfo | grep render yields
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
direct render ing: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)
GLX_MESA_multithread_makecurrent, GLX_MESA_query_ render er,
OpenGL render er string: Intel® Iris™ Plus Graphics 655

nvidia-smi yields
±----------------------------------------------------------------------------+
| NVIDIA-SMI 455.38 Driver Version: 455.38 CUDA Version: 11.1 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 GeForce RTX 208… Off | 00000000:0B:00.0 Off | N/A |
| 18% 32C P8 17W / 250W | 53MiB / 7979MiB | 0% Default |
| | | N/A |
±------------------------------±---------------------±---------------------+
| 1 GeForce RTX 208… Off | 00000000:0C:00.0 Off | N/A |
| 18% 30C P8 3W / 250W | 5MiB / 7982MiB | 0% Default |
| | | N/A |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 1165 G /usr/lib/xorg/Xorg 51MiB |
| 1 N/A N/A 1165 G /usr/lib/xorg/Xorg 4MiB |
±----------------------------------------------------------------------------+

My best guess is that GLX is configured to use the intel instead of nvidia hardware, but I can’t figure out how to fix it. Do you have any suggestions?

Thank you very much. nvidia-bug-report.log.gz (423.4 KB)

@ikauvar
You’re running a dual RTX2080 setup, no AMD or Intel igpu involved, you should have rather opened a new thread.
Are you running the glxinfo command over ssh?

Thanks for the response. I’m new to this forum – happy to start a new thread if that’s better.
Yes, over ssh – I only have remote access to this machine.

Yes, please open a new thread and tell what you’re trying to achieve. No need to fill other people’s inboxes with a completely different topic.

And I also did think that there was a default Intel gpu involved, since prime-select shows intel as an option, and glxinfo shows Intel® Iris™ Plus Graphics 655, but I may be confused. prime-select query returns nvidia, though.

I have a problem again with this Nvidia driver. I want to load only nvidia gpu and I did all what was needed. I have arch + openbox + lightdm. So when I just run startx openbox session is starting with Nvidia gpu loaded, but when I am starting lightdm openbox session is starting with AMD gpu. xrnadr --listproviders shows me only one provider “modesetting” sometime is starting with Nvidia and sometime no. I understand that lightdm have some troubles with loading the sh script…

Generix can you explain what I need to do please? Slim and GDM si loading the Nvidia gpu correct, but lightdm doesn’t want to make it.

With Arch, you’ll have to make sure that the nvidia kernel modules are added to the initrd. Otherwise, the driver is loaded too late to be picked up by Xorg.

Hey @generix, sorry to bother here on this topic but just a quick question related to it, I have an ASUS A15 with AMD Ryzen 7 4900H and Nvidia RTX 2060 running with Manjaro 20.2 GNOME and Garuda Linux GNOME… and I have tried a lot of things and I search online about the option to have the HDMI port and laptop’ screen running with AMD and the USB type C with Nvidia, is that even possible on Linux?, because what I have read is that is not currently possible on Linux with the current state of Nvidia drivers.

You will need a kernel >=5.6 which Manjaro should have ootb and then use the config from top of the thread. Should only need minor adjustments for manjaro.

On second read, I guess you’d rather asked for the output sink feature, that’a work-in-progress, please see this thread:
https://forums.developer.nvidia.com/t/ryzen-7-gtx-1660ti-blank-screen-on-external-outputs-in-hybrid-graphics-mode/157800?u=generix

1 Like

Thanks @generix for the answer, I have a better idea of what is happening now. Probably I will report this to Manjaro or Garuda developers maybe they can patch it on future releases I don’t know, maybe I will try the solution but I think is not very convenient. For Now I have uninstalled the Nvidia driver since it was draining my battery and I wasn’t using it anyways and I have gave up with the displayport because without the Nvidia driver it doesn’t even get recognized by the AMD iGPU.

Hi,

I installed four NVIDIA GPUs (1e30) Quadro RTX 8000 and followed all the major steps needed to enable nvidia and cuda drivers which include the following:

- Enable nvidia in early KMS with GRUB and initramfs
BOOT_IMAGE=/boot/vmlinuz-5.4.0-70-generic root=UUID=2669e54b-187c-4de6-a661-0c2eda159296 ro quiet splash nogpumanager nvidia-drm.modeset=1 vt.handoff=1

- Suppress nouveau by blacklisting in *.conf files

- Disable gpumanager

- Disable Wayland

- Run in multi-user level, i.e. runlevel 3

- Install cuda:

apt install linux-headers-(uname -r) wget https://developer.download.nvidia.com/compute/cuda/11.2.2/local_installers/cuda_11.2.2_460.32.03_linux.run chmod +x <runfile> sudo sh cuda_11.2.2_460.32.03_linux.run Add: ~/.bashrc - export PATH=/usr/local/cuda-11.2/bin{PATH:+:{PATH}} - export LD_LIBRARY_PATH=/usr/local/cuda-11.2/lib{LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

After rebooting I find that nvidia drivers are enabled in most of the places but not everywhere. I tried running nvidia-xconfig to generate an xorg.conf (or 20-nvidia.conf) file but none of the settings provided at the NVIDIA developer forum or in the Xorg config section of NVIDIA driver documentation helped me. These include (see attached xorg.conf file)

xorg.conf.txt (2.4 KB)

Adding BusID to “Device” section in Xorg.conf
Adding “AllowEmptyInitialConfiguration”

Rather I found a 72x72 black screen each time I started gdm (systemctl start gdm) with nvidia config.

nvidia-bug-report.log.gz (952.0 KB)

I need to enable nvidia drivers instead of mesa, and also enable SLI. How should I proceed?

There’s no monitor connected to the Quadros, only one on the server graphics, what do you want to use the quadros for?

To enable SLI for VRWorks, and to enable multi-GPU computation for video processing. The monitor is connected to the server by a VGA cable. Do I need to unplug the VGA cable if I were to plug in a Displayport/HDMi into the Quadro?

Ok, first of all, the SLI modes in xorg.conf are removed, only SLIMosaic (for videowalls) is left. Doesn’t matter though since those are not the robots you’re looking for. VRWorks uses the newer explicit multi-gpu rendering which doesn’t need to be explicitly configured. If your board supports it, the quadros should form an sli-group automatically.
To get your config working, you should remove the xorg.conf, disable the server graphics in bios and then connect a monitor to the primary nvidia gpu, i.e. connect the monitor to the nvidia cards one after another until you see the login-screen.
For config, use a minimal one like
/etc/X11/xorg.conf.d/10-nvidia.conf

Section "OutputClass"
  Identifier "nvidia"
  MatchDriver "nvidia-drm"
  Driver "nvidia"
  Option "AllowEmptyInitialConfiguration" "true"
EndSection
1 Like