Installed nvidia drivers on centos but opengl is not using nvidia (appears part of system is using integrated graphics still no matter what I try)

Good afternoon,

Fresh CentOS 7 server. Installed nvidia drivers (yes for compatibility libraries as well) and able to log into the system. OpenGL still apears to be using the integrated graphics and nvidia-setting does not open to allow me to troubleshoot further.

nvidia-smi leads me to believe the drivers are loaded/working although it seems part of the system is using integrated while nvidia is being used just for 3d rendering.

I would be fine getting it to work entirely with just the nvidia card if possible but the OpenGL is my main concern. Not understanding why nvidia-setting is failing to open unless its a result of the integrated graphics controlling the display? If so how do I change this to allow nvidia to control everything to include the opengl component?

So far I have completely reinstalled the nvidia drivers and reviewed logs/forums extensively trying to see someone similar with this issue.

General info below

# nvidia-smi 
Wed Jan 27 16:08:26 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.80.02    Driver Version: 450.80.02    CUDA Version: 11.0     |
|-------------------------------+----------------------+----------------------+
| 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  Quadro P1000        Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   37C    P8    N/A /  N/A |      0MiB /  4042MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

# nvidia-settings 
ERROR: Unable to load info from any available system

# lshw -class display
*-display                 
   description: 3D controller
   product: GP107GLM [Quadro P1000 Mobile]
   vendor: NVIDIA Corporation
   physical id: 0
   bus info: pci@0000:01:00.0
   version: a1
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress bus_master cap_list rom
   configuration: driver=nvidia latency=0
   resources: irq:515 memory:ec000000-ecffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:3000(size=128) memory:ed000000-ed07ffff
*-display
   description: VGA compatible controller
   product: UHD Graphics 630 (Mobile)
   vendor: Intel Corporation
   physical id: 2
   bus info: pci@0000:00:02.0
   version: 00
   width: 64 bits
   clock: 33MHz
   capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
   configuration: driver=i915 latency=0
   resources: irq:148 memory:eb000000-ebffffff memory:80000000-8fffffff ioport:4000(size=64)

# glxinfo | grep -i opengl
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: llvmpipe (LLVM 6.0, 256 bits)
OpenGL version string: 2.1 Mesa 18.0.5
OpenGL shading language version string: 1.30
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 2.0 Mesa 18.0.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
OpenGL ES profile extensions:

You’re running a hybrid graphics notebook, don’t use the runfile driver installer. Please uninstall it and switch to a repo like rpmfusion.
https://forums.developer.nvidia.com/t/rhel-optimus-driver/166292/2?u=generix

Thank you.

So if I understand this correctly, nvidia doesn’t provide drivers that support hybrid graphics for CentOS/other linux distro’s and we are forced to use other repositories (such as rpmfusion)? This brings up issues on air gapped environments such as mine. Is there a solution for air-gapped systems?

The problem is not the driver by itself but hybrid graphics requires additional config which the plain .run driver doesn’t provide since it’s just the driver. So you will have to create the needed config files manually. e.g.

  • create /etc/X11/xorg.conf.d/10-nvidia-prime.conf
 Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    Option "PrimaryGPU" "yes"
EndSection
  • For GDM/Gnome, create two files optimus.desktop in /etc/xdg/autostart/ and /usr/share/gdm/greeter/autostart/ containing
[Desktop Entry]
Type=Application
Name=Optimus
Exec=sh -c "xrandr --setprovideroutputsource modesetting NVIDIA-0; xrandr --auto"
NoDisplay=true
X-GNOME-Autostart-Phase=DisplayServer
1 Like

ok I am following now, thanks! I will attempt what you put above and see if I can get it working. Much appreciated.