Nvidia Driver is not working on Ubuntu 22

I am using Ubuntu 22.04.1 LTS and have dual GPU Intel (HD 530)/Nvidia (GTX950). When I was using Ubuntu the first time after installed it, Nvidia drivers were successfully working, but now it doesn’t work. I tried to install drivers in both Drivers window and command-line.

Secure boot is disabled. That didn’t work: install nvidia driver

nvidia-smi output:

NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

nvidia-settings output:

ERROR: NVIDIA driver is not loaded

(nvidia-settings:4383): GLib-GObject-CRITICAL **: 22:08:05.795: g_object_unref: assertion ‘G_IS_OBJECT (object)’ failed

** (nvidia-settings:4383): CRITICAL **: 22:08:05.797: ctk_powermode_new: assertion ‘(ctrl_target != NULL) && (ctrl_target->h != NULL)’ 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.

** Message: 22:08:05.828: PRIME: No offloading required. Abort
** Message: 22:08:05.828: PRIME: is it supported? no

Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.

1 Like

Sorry. I added it now, here’s: nvidia-bug-report.log.gz (56.4 KB)

There are no kernel modules installed for that kernel, please try installing the kernel headers
sudo apt install linux-headers-$(uname -r)
then check if
dkms status
lists the nvidia driver.

1 Like

Thanks.
Things are going well. Because PRIME Profiles tab came again in Nvidia Settings app, but it doesn’t work. I selected Nvidia Performance mode and then it said that you should restart the system, Intel Power Saving Mode was selected as default after I restarted the system. Also there are the same errors (nvidia-smi and nvidia-settings).

dkms status output:

nvidia/515.65.01, 5.17.0-1020-oem, x86_64: installed
nvidia-bug-report.log.gz (82.5 KB)

The driver is installed now but seems to be blacklisted

  • run
sudo prime-select nvidia
  • run
grep nvidia /etc/modprobe.d/* /lib/modprobe.d/*

to find a file containing

blacklist nvidia

and remove it,
then run

sudo update-initramfs -u

and reboot.

1 Like

I did clearly all of them, but unfortunately the system doesn’t shutdown or restart. When it is closing, it freeze. Also Intel GPU is coming as default and there are the same errors.

I run this command "grep nvidia /etc/modprobe.d/* /lib/modprobe.d/" again and then saw blacklist nvidia lines now:

/etc/modprobe.d/nvidia-graphics-drivers-kms.conf:# This file was generated by nvidia-drivers-515
/etc/modprobe.d/nvidia-graphics-drivers-kms.conf:options nvidia-drm modeset=1
/lib/modprobe.d/blacklist-nvidia.conf:# This file was generated by nvidia-prime
> /lib/modprobe.d/blacklist-nvidia.conf:blacklist nvidia
> /lib/modprobe.d/blacklist-nvidia.conf:blacklist nvidia-drm
> /lib/modprobe.d/blacklist-nvidia.conf:blacklist nvidia-modeset
/lib/modprobe.d/blacklist-nvidia.conf:alias nvidia off
/lib/modprobe.d/blacklist-nvidia.conf:alias nvidia-drm off
/lib/modprobe.d/blacklist-nvidia.conf:alias nvidia-modeset off
/lib/modprobe.d/nvidia-kms.conf:options nvidia-drm modeset=1

nvidia-settings output:

ERROR: NVIDIA driver is not loaded

(nvidia-settings:10418): GLib-GObject-CRITICAL **: 01:24:11.104: g_object_unref: assertion ‘G_IS_OBJECT (object)’ failed

** (nvidia-settings:10418): CRITICAL **: 01:24:11.106: ctk_powermode_new: assertion ‘(ctrl_target != NULL) && (ctrl_target->h != NULL)’ 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.

> ** Message: 01:24:11.137: PRIME: Requires offloading
> ** Message: 01:24:11.137: PRIME: is it supported? yes
> ** Message: 01:24:11.165: PRIME: Usage: /usr/bin/prime-select nvidia|intel|on-demand|query
> ** Message: 01:24:11.165: PRIME: on-demand mode: “1”
> ** Message: 01:24:11.165: PRIME: is “on-demand” mode supported? yes

Please create a new nvidia-bug-report.log, possibly from recovery mode.

1 Like

I could not open the system in recovery mode. GRUD comes as command lines, not menu.

Here you are:
nvidia-bug-report.log.gz (82.2 KB)

Please try disabling Wayland and switch to on-demand mode.
https://onlinux.systems/guides/20220520_how-to-disable-wayland-on-ubuntu-2204
sudo prime-select on-demand

I did it, and then I got this error after “shutdown -r now”:

prime-select query output: intel
nvidia-bug-report.log.gz (121.9 KB)

You removed the necessary blacklist file for nvidiafb. Please recreate it and run sudo update-initramfs -u

When the system was shutdowing, blackscreen came and didn’t go.

If you accept, I can install Ubuntu 22 again, but I want to know what I should do firstly. Could you help me?

the last report:
nvidia-bug-report.log.gz (133.8 KB)

I installed Ubuntu 22 again, and everything works perfectly. I use the system on Performance Mode right now. I hope it is going to be well. Thank you very much.

nvidia-smi:

Fri Oct 28 20:13:30 2022
±----------------------------------------------------------------------------+
| NVIDIA-SMI 515.65.01 Driver Version: 515.65.01 CUDA Version: 11.7 |
|-------------------------------±---------------------±---------------------+
| 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 NVIDIA GeForce … Off | 00000000:01:00.0 Off | N/A |
| N/A 39C P8 N/A / N/A | 372MiB / 4096MiB | 6% Default |
| | | N/A |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 1652 G /usr/lib/xorg/Xorg 114MiB |
| 0 N/A N/A 2151 G /usr/bin/gnome-shell 66MiB |
| 0 N/A N/A 7838 G …109813382925935932,131072 149MiB |
| 0 N/A N/A 9451 G …308728075114821443,131072 36MiB |
±----------------------------------------------------------------------------+

nvidia-settings:

(nvidia-settings:9813): GLib-GObject-CRITICAL **: 20:13:34.746: g_object_unref: assertion ‘G_IS_OBJECT (object)’ failed
** Message: 20:13:34.947: PRIME: Requires offloading
** Message: 20:13:34.947: PRIME: is it supported? yes
** Message: 20:13:34.979: PRIME: Usage: /usr/bin/prime-select nvidia|intel|on-demand|query
** Message: 20:13:34.979: PRIME: on-demand mode: “1”
** Message: 20:13:34.979: PRIME: is “on-demand” mode supported? yes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.