nvidia-settings reports incorrect 'NvidiaDriverVersion', looks for incorrect 'registry key file'

I’ve built and installed Nvidia’s ‘legacy’ driver-for-linux

ls -al *run
		-rwxr-xr-x 1 root root 37M Feb  5 10:32 NVIDIA-Linux-x86_64-340.76-no-compat32.run*

	uname -rm
		3.19.0-5.g748552c-desktop x86_64

	cat /var/log/nvidia-installer.log 
		nvidia-installer log file '/var/log/nvidia-installer.log'
		creation time: Fri Mar  6 09:25:09 2015
		installer version: 340.76
		...
		-> Installation of the NVIDIA Accelerated Graphics Driver for Linux-x86_64 (version: 340.76) is now complete.  Please update your XF86Config or xorg.conf file as appropriate; see the file /usr/share/doc/NVIDIA_GLX-1.0/README.txt for details.


	ls -al /lib/modules/3.19.0-4.g7f0e735-desktop/kernel/drivers/video/nvidia.ko
		-rw-r--r-- 1 root root 19M Mar  2 07:27 /lib/modules/3.19.0-4.g7f0e735-desktop/kernel/drivers/video/nvidia.ko

	find /lib/modules -type f -name 'nvidia.ko'
		/lib/modules/3.19.0-5.g748552c-desktop/kernel/drivers/video/nvidia.ko

	/usr/bin/nvidia-settings --version

		nvidia-settings:  version 340.76  (buildmeister@swio-display-x86-rhel47-01)  Thu Jan 22 12:12:09 PST 2015
		  The NVIDIA X Server Settings tool.

		  This program is used to configure the NVIDIA Linux graphics driver.
		  For more detail, please see the nvidia-settings(1) man page.

		  Copyright (C) 2004 - 2010 NVIDIA Corporation.

	lsmod | grep nvidia
		nvidia              10569412  0 
		drm                   363977  5 ttm,drm_kms_helper,nvidia,nouveau

	modinfo nvidia
		filename:       /lib/modules/3.19.0-5.g748552c-desktop/kernel/drivers/video/nvidia.ko
		alias:          char-major-195-*
		version:        340.76
		supported:      external
		license:        NVIDIA
		alias:          pci:v000010DEd00000E00sv*sd*bc04sc80i00*
		alias:          pci:v000010DEd00000AA3sv*sd*bc0Bsc40i00*
		alias:          pci:v000010DEd*sv*sd*bc03sc02i00*
		alias:          pci:v000010DEd*sv*sd*bc03sc00i00*
		depends:        drm
		vermagic:       3.19.0-5.g748552c-desktop SMP preempt mod_unload modversions 
		parm:           NVreg_Mobile:int
		parm:           NVreg_ResmanDebugLevel:int
		parm:           NVreg_RmLogonRC:int
		parm:           NVreg_ModifyDeviceFiles:int
		parm:           NVreg_DeviceFileUID:int
		parm:           NVreg_DeviceFileGID:int
		parm:           NVreg_DeviceFileMode:int
		parm:           NVreg_RemapLimit:int
		parm:           NVreg_UpdateMemoryTypes:int
		parm:           NVreg_InitializeSystemMemoryAllocations:int
		parm:           NVreg_UsePageAttributeTable:int
		parm:           NVreg_MapRegistersEarly:int
		parm:           NVreg_RegisterForACPIEvents:int
		parm:           NVreg_CheckPCIConfigSpace:int
		parm:           NVreg_EnablePCIeGen3:int
		parm:           NVreg_EnableMSI:int
		parm:           NVreg_MemoryPoolSize:int
		parm:           NVreg_RegistryDwords:charp
		parm:           NVreg_RmMsg:charp
		parm:           NVreg_AssignGpus:charp

Yet, ‘nvidia-settings’ reports the incorrect version

/usr/bin/nvidia-settings -q NvidiaDriverVersion -t
		346.47

and

/usr/bin/nvidia-settings -t
		ERROR: nvidia-settings could not find the registry key file. This file should have been installed along with this
	       driver at either /usr/share/nvidia/nvidia-application-profiles-346.47-key-documentation or
	       /usr/share/nvidia/nvidia-application-profiles-key-documentation. The application profiles will continue to
	       work, but values cannot be preopulated or validated, and will not be listed in the help text. Please see the
	       README for possible values and descriptions.

and

ls -al /usr/share/nvidia/nvidia*
		-r--r--r-- 1 root root 5.6K Mar  6 09:26 /usr/share/nvidia/nvidia-application-profiles-340.76-key-documentation
		-r--r--r-- 1 root root 3.5K Mar  6 09:26 /usr/share/nvidia/nvidia-application-profiles-340.76-rc

nvidia-settings queries that information from the X server specified in the DISPLAY environment variable. Are you sure it’s connecting to the correct X server?

Not entirely sure what you’re asking. Can you clarify?

There’s only one display, one video device, and one nvidia driver

Specifically, this is the installer exec’d,

md5sum NVIDIA-Linux-x86_64-340.76-no-compat32.run
  440df290e213280d6e20d4d4be6f8b4c  NVIDIA-Linux-x86_64-340.76-no-compat32.run

and this is what’s installed

find /lib/modules | grep video/nvidia
  /lib/modules/3.19.1-1.ga04cebc-desktop/kernel/drivers/video/nvidia-uvm.ko
  /lib/modules/3.19.1-1.ga04cebc-desktop/kernel/drivers/video/nvidia.ko

note that these two files installed at the same time

ls -al $( find /lib/modules/ -type f -name 'nvidia.ko' ) $( which nvidia-settings) 
		-rw-r--r-- 1 root root  17M Mar 10 07:17 /lib/modules/3.19.1-2.gc0946e9-desktop/kernel/drivers/video/nvidia.ko
		-rwxr-xr-x 1 root root 272K Mar 10 07:17 /usr/bin/nvidia-settings*

What is the value of the DISPLAY environment variable?

here,

echo $DISPLAY
:0

Strange. Can you please run nvidia-bug-report.sh and attach the resulting nvidia-bug-report.log.gz file? That will show a snapshot of exactly which kernel module and X driver are loaded. It does seem like you have some weird hybrid of 340.76 and 346.47 installed. How did you install those two drivers, respectively, and do you have your Linux distribution’s driver packages installed at the same time?

Can you please run nvidia-bug-report.sh and attach the resulting nvidia-bug-report.log.gz file? That will show a snapshot of exactly which kernel module and X driver are loaded.

I’ll get that put together.

It does seem like you have some weird hybrid of 340.76 and 346.47 installed. How did you install those two drivers, respectively,

I’ve NEVER installed 346.47. It does not support my video card.

and do you have your Linux distribution’s driver packages installed at the same time?

No, I do not. I never use, or even install, the distro’s nvidia packages.

Hi,

I have similar issue and I don’t know how to fix it:

[url]https://www.centos.org/forums/viewtopic.php?f=48&t=62555[/url]

and [url]https://devtalk.nvidia.com/default/topic/1009727/error-nvidia-settings-could-not-find-the-registry-key-file/[/url]