CentOS 7 unable to run nvidia-settings

I am running Kernel 3.10.0-957.27.2.el7.x86_64 on CentOS 7.6.1810, installed NVIDIA-Linux-x86_64-430.40
to be able to use NVIDIA GM107M [GeForce GTX 860M].

Installation went smoothly until I wanted to configure it. when I run

[root@y5070 ~]# nvidia-settings -V -c :0
WARNING: NV-CONTROL extension not found on this Display.
ERROR: Unable to load info from any available system

according to nvidia-smi it’s all good

[root@y5070 ~]# nvidia-smi 
Fri Aug 16 01:40:18 2019       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 430.40       Driver Version: 430.40       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 860M    Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   42C    P8    N/A /  N/A |      0MiB /  4046MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+                                                                           
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

The configuration for gdm.service is what I think I need to be generated as I can see the graphics but nvidia is not being used I don’t think.

I also tried using nvidia-xconfig but no luck, I had to delete the file generated because it won’t start gdm.service

nouveau is not loaded and nvidia is

[root@y5070 ~]# lsmod | egrep -i "nvidia|nouveau"
nvidia_uvm            814934  0 
nvidia_drm             43690  0 
nvidia_modeset       1112541  1 nvidia_drm
nvidia              19032409  23 nvidia_modeset,nvidia_uvm
ipmi_msghandler        56032  2 ipmi_devintf,nvidia
drm_kms_helper        179394  2 i915,nvidia_drm
drm                   429744  5 i915,drm_kms_helper,nvidia_drm
[root@y5070 ~]# lspci -v -s `lspci | awk '/VGA/{print $1}'`
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06) (prog-if 00 [VGA controller])
	Subsystem: Lenovo Device 3978
	Flags: bus master, fast devsel, latency 0, IRQ 31
	Memory at d1000000 (64-bit, non-prefetchable) 
	Memory at c0000000 (64-bit, prefetchable) 
	I/O ports at 6000 
	Expansion ROM at <unassigned> [disabled]
	Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
	Capabilities: [d0] Power Management version 2
	Capabilities: [a4] PCI Advanced Features
	Kernel driver in use: i915
	Kernel modules: i915

[root@y5070 ~]# lspci -v -s `lspci | awk '/3D/{print $1}'`
01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 860M] (rev a2)
	Subsystem: Lenovo Device 3978
	Flags: bus master, fast devsel, latency 0, IRQ 35
	Memory at d0000000 (32-bit, non-prefetchable) 
	Memory at a0000000 (64-bit, prefetchable) 
	Memory at b0000000 (64-bit, prefetchable) 
	I/O ports at 5000 
	[virtual] Expansion ROM at b2000000 [disabled] 
	Capabilities: [60] Power Management version 3
	Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
	Capabilities: [78] Express Endpoint, MSI 00
	Capabilities: [100] Virtual Channel
	Capabilities: [250] Latency Tolerance Reporting
	Capabilities: [258] L1 PM Substates
	Capabilities: [128] Power Budgeting <?>
	Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
	Capabilities: [900] #19
	Kernel driver in use: nvidia
	Kernel modules: nouveau, nvidia_drm, nvidia

I need to be able to run nvidia-settings for gdm.service to be able to pick up the config I would imagine.
nvidia-bug-report.log.gz (375 KB)

Just attached the bug-report.log

I’m not really shure which instllation method you used to install the driver, did you just download the .run installer, some package or did you use a driver repository?
It’s an Optimus notebook which requires a special setup, best be done with some repo driver like rmpfusion.

Thanks for the answer

I used a the .run installer

it’s a Lenovo Y50-70 laptop, model 20378 with NVIDIA GeForce GTX 860M

Ok, please uninstall the .run installer driver using the --uninstall option, then switch to the rpmfusion repo:
https://rpmfusion.org/Configuration
https://rpmfusion.org/Howto/NVIDIA#Current_GeForce.2FQuadro.2FTesla
If you hit a black screen on reboot, you might have to create the .desktop files for GDM/Gnome like here (skip the part with xorg.conf):
https://devtalk.nvidia.com/default/topic/1022670/linux/official-driver-384-59-with-geforce-1050m-doesn-t-work-on-opensuse-tumbleweed-kde/post/5203910/#5203910

Thank you generix, I installed as instructed and didn’t make any difference, then I decided to give it a clean OS install to try but it didn’t make any difference either, the same messages, Is there anything I’m missing?

[root@y5070 ~]# nvidia-settings -V
WARNING: NV-CONTROL extension not found on this Display.
ERROR: Unable to load info from any available system

These are the nvidia packages installed in my system

[root@y5070 ~]# rpm -qa | grep -i nvidia 
xorg-x11-drv-nvidia-kmodsrc-430.40-1.el7.x86_64
xorg-x11-drv-nvidia-cuda-libs-430.40-1.el7.x86_64
nvidia-xconfig-430.40-1.el7.x86_64
kmod-nvidia-3.10.0-957.27.2.el7.x86_64-430.40-1.el7.x86_64
nvidia-modprobe-430.40-1.el7.x86_64
xorg-x11-drv-nvidia-cuda-430.40-1.el7.x86_64
xorg-x11-drv-nvidia-430.40-1.el7.x86_64
xorg-x11-drv-nvidia-libs-430.40-1.el7.x86_64
akmod-nvidia-430.40-1.el7.x86_64
nvidia-settings-430.40-1.el7.x86_64
kmod-nvidia-3.10.0-957.el7.x86_64-430.40-1.el7.x86_64
nvidia-persistenced-430.40-1.el7.x86_64

With the clean CentOS and the nvidia packages installed, the nvidia packages didn’t modify the GRUB to not load the nouveau modules as shown below, and it didn’t work either

[root@y5070 ~]# lsmod | egrep -i "nvidia|nouveau"
nvidia_drm             43690  1 
nvidia_modeset       1112541  1 nvidia_drm
nvidia_uvm            819030  0 
nvidia              19032409  20 nvidia_modeset,nvidia_uvm
ipmi_msghandler        56032  2 ipmi_devintf,nvidia
nouveau              1869738  0 
mxm_wmi                13021  1 nouveau
ttm                   114635  1 nouveau
i2c_algo_bit           13413  2 i915,nouveau
drm_kms_helper        179394  3 i915,nouveau,nvidia_drm
drm                   429744  10 ttm,i915,drm_kms_helper,nouveau,nvidia_drm
wmi                    21636  2 mxm_wmi,nouveau
video                  24538  2 i915,nouveau

so after trying with this not working configuration, I had a go manually disallowing from the nouveau modules from the GRUB with the same results.

And I’m obviously getting the same results from lspci

In all my attempts I had a GDM (and GNOME) working correctly, but I also tried creating the two optimus.desktop files as the last of the 3 links you kindly provided in the last post.

(I’m adding the latest bug-report from this try as well in case it’s useful)
nvidia-bug-report.log.gz (1.07 MB)

Try this:
Create /etc/X11/xorg.conf.d/11-nvidia.conf with contents

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

and 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

just came back, worked perfectly thanks :-)

After upgrading the kernel, it didn’t work any more, but it was because I was fiddling with UEFI, I enabled Secure Boot and nvidia-drm couldn’t load, so disabled back the “Secure Boot” and it’s all working happy now