[HowTo] Fix the ERROR: nvidia-settings could not find the registry key file or the X server is not accessible

After installing Manjaro and starting nvidia-settings via cli, the following error message appeared:

(nvidia-settings:3617): GLib-GObject-CRITICAL **: 21:58:49.173: g_object_unref: assertion 'G_IS_OBJECT (object)' failed 
ERROR: nvidia-settings could not find the registry key file or the X server is not accessible. This file should have been
       installed along with this driver at /usr/share/nvidia/nvidia-application-profiles-key-documentation. The application
       profiles will continue to work, but values cannot be prepopulated or validated, and will not be listed in the help
       text. Please see the README for possible values and descriptions.

Here’s the way I fixed it:

1. List contents of the NVIDIA directory

ls -la /usr/share/nvidia

The output will look something like this:

-rw-r--r--   1 root root  7107 21. Nov 19:08 nvidia-application-profiles-495.44-key-documentation
-rw-r--r--   1 root root  9279 21. Nov 19:08 nvidia-application-profiles-495.44-rc

2. Set a link depending on the version number as you see it in the output

sudo ln -s /usr/share/nvidia/nvidia-application-profiles-495.44-key-documentation /usr/share/nvidia/nvidia-application-profiles-key-documentation

Start nvidia-settings again, the message should be gone now.

2 Likes

Hi, first you enter ‘su’ and become ‘root’, so there is no need to use ‘sudo’ after that. :grinning:

:smiley: Right, typo fixed

Please paste terminal output instead of using screenshots.

1 Like

Done :slight_smile:

1 Like

Hi Yochanan,

I’d like to fix an issue at [HowTo] Installing Docker and NVIDIA runtime - My experience and HowTo , can you re-open it for me for edit? Can do it tomorrow. Would be great.

Consider using something else, like sudo -i

(ref - https://askubuntu.com/questions/376199/sudo-su-vs-sudo-i-vs-sudo-bin-bash-when-does-it-matter-which-is-used)

Or simply skip that step, and add sudo to steps 2b and 3a
(eliminating step 1 and 3b)

EDIT: Well its been over a week with no response … so I just edited the post, as its a wiki anyways.
Now it is 2 steps: list contents, make link (with sudo).
Though I am still not sure this is required … but I dont have nvidia to check.

Just stumbled across this trying to fix the issue myself - this doesn’t seem to be necessary for things to function, but does indeed work.

I’ve unlisted this as this misleading and should never be necessary. If one does get that error, they probably can’t run nvidia-smi successfully, either. That means they forgot to run mkinitcipio after installing the DKMS module.