Cannot get nvidia drivers working on Ubuntu 22.04, particularly with external HDMI monitor

I have read several forum threads with similar questions and responses, and tried to follow the insights from the good folks responding to these questions, but to no avail. I am using Ubuntu 22.04, and believe I am using the proprietary 525 drivers for my Quadro P5200 mobile on a Lenovo Thinkpad P72. When I attach my HDMI cable to an external monitor, I get nothing: no recognition that anything has been attached on the external device, and on my Thinkpad, I do not see any indication that an external monitor is available in Settings > Displays. I did have external displays working on previous versions of Ubuntu with this machine.

Any help appreciated.

I can open the NVIDIA Settings GUI app and, for example, select “NVIDIA (Performance Mode)”. However, when I type:

$  sudo nvidia-smi
No devices were found

Seeing a common bit of advice given to folks in similar positions, I have done sudo apt install linux-headers-$(uname -r), but everything was already up to date.

Here’s some more information along with the attached output of nvidia-bug-report.sh to help me start troubleshooting:

nvidia-bug-report.log.gz (145.0 KB)

$ sudo lshw -c display
[sudo] password for MyAccount: 
  *-display                 
       description: VGA compatible controller
       product: GP104GLM [Quadro P5200 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 vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:16 memory:c0000000-c0ffffff memory:60000000-6fffffff memory:70000000-71ffffff ioport:2000(size=128) memory:c1080000-c10fffff
  *-display
       description: VGA compatible controller
       product: Intel Corporation
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       logical name: /dev/fb0
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom fb
       configuration: depth=32 driver=i915 latency=0 resolution=3840,2160
       resources: irq:156 memory:bf000000-bfffffff memory:80000000-8fffffff ioport:3000(size=64) memory:c0000-dffff
$ sudo dkms status
nvidia/525.78.01, 5.15.0-58-lowlatency, x86_64: installed
virtualbox/6.1.38, 5.15.0-56-generic, x86_64: installed
virtualbox/6.1.38, 5.15.0-57-generic, x86_64: installed
virtualbox/6.1.38, 5.15.0-57-lowlatency, x86_64: installed
virtualbox/6.1.38, 5.15.0-58-generic, x86_64: installed
virtualbox/6.1.38, 5.15.0-58-lowlatency, x86_64: installed
$ dpkg -l |grep nvidia
ii  libnvidia-cfg1-525:amd64                          525.78.01-0ubuntu0.22.04.1                         amd64        NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-common-525                              525.78.01-0ubuntu0.22.04.1                         all          Shared files used by the NVIDIA libraries
ii  libnvidia-compute-525:amd64                       525.78.01-0ubuntu0.22.04.1                         amd64        NVIDIA libcompute package
ii  libnvidia-compute-525:i386                        525.78.01-0ubuntu0.22.04.1                         i386         NVIDIA libcompute package
ii  libnvidia-decode-525:amd64                        525.78.01-0ubuntu0.22.04.1                         amd64        NVIDIA Video Decoding runtime libraries
ii  libnvidia-decode-525:i386                         525.78.01-0ubuntu0.22.04.1                         i386         NVIDIA Video Decoding runtime libraries
ii  libnvidia-egl-wayland1:amd64                      1:1.1.9-1.1                                        amd64        Wayland EGL External Platform library -- shared library
ii  libnvidia-encode-525:amd64                        525.78.01-0ubuntu0.22.04.1                         amd64        NVENC Video Encoding runtime library
ii  libnvidia-encode-525:i386                         525.78.01-0ubuntu0.22.04.1                         i386         NVENC Video Encoding runtime library
ii  libnvidia-extra-525:amd64                         525.78.01-0ubuntu0.22.04.1                         amd64        Extra libraries for the NVIDIA driver
ii  libnvidia-fbc1-525:amd64                          525.78.01-0ubuntu0.22.04.1                         amd64        NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-fbc1-525:i386                           525.78.01-0ubuntu0.22.04.1                         i386         NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-gl-525:amd64                            525.78.01-0ubuntu0.22.04.1                         amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-gl-525:i386                             525.78.01-0ubuntu0.22.04.1                         i386         NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
rc  linux-modules-nvidia-470-5.15.0-58-generic        5.15.0-58.64                                       amd64        Linux kernel nvidia modules for version 5.15.0-58
rc  linux-modules-nvidia-510-5.15.0-25-generic        5.15.0-25.25                                       amd64        Linux kernel nvidia modules for version 5.15.0-25
rc  linux-modules-nvidia-510-5.15.0-41-generic        5.15.0-41.44+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-41
rc  linux-modules-nvidia-510-5.15.0-43-generic        5.15.0-43.46+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-43
rc  linux-modules-nvidia-510-5.15.0-46-generic        5.15.0-46.49                                       amd64        Linux kernel nvidia modules for version 5.15.0-46
rc  linux-modules-nvidia-510-5.15.0-47-generic        5.15.0-47.51                                       amd64        Linux kernel nvidia modules for version 5.15.0-47
rc  linux-modules-nvidia-510-5.15.0-48-generic        5.15.0-48.54                                       amd64        Linux kernel nvidia modules for version 5.15.0-48
rc  linux-modules-nvidia-510-5.15.0-50-generic        5.15.0-50.56+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-50
rc  linux-modules-nvidia-510-5.15.0-52-generic        5.15.0-52.58+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-52
rc  linux-modules-nvidia-510-5.15.0-53-generic        5.15.0-53.59+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-53
ii  linux-modules-nvidia-525-5.15.0-58-generic        5.15.0-58.64+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-58
ii  linux-modules-nvidia-525-generic-hwe-22.04        5.15.0-58.64+1                                     amd64        Extra drivers for nvidia-525 for the generic-hwe-22.04 flavour
ii  linux-objects-nvidia-470-5.15.0-58-generic        5.15.0-58.64+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-58 (objects)
rc  linux-objects-nvidia-510-5.15.0-25-generic        5.15.0-25.25                                       amd64        Linux kernel nvidia modules for version 5.15.0-25 (objects)
rc  linux-objects-nvidia-510-5.15.0-41-generic        5.15.0-41.44+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-41 (objects)
ii  linux-objects-nvidia-510-5.15.0-43-generic        5.15.0-43.46+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-43 (objects)
rc  linux-objects-nvidia-510-5.15.0-46-generic        5.15.0-46.49                                       amd64        Linux kernel nvidia modules for version 5.15.0-46 (objects)
rc  linux-objects-nvidia-510-5.15.0-47-generic        5.15.0-47.51                                       amd64        Linux kernel nvidia modules for version 5.15.0-47 (objects)
rc  linux-objects-nvidia-510-5.15.0-48-generic        5.15.0-48.54                                       amd64        Linux kernel nvidia modules for version 5.15.0-48 (objects)
rc  linux-objects-nvidia-510-5.15.0-50-generic        5.15.0-50.56+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-50 (objects)
rc  linux-objects-nvidia-510-5.15.0-52-generic        5.15.0-52.58+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-52 (objects)
rc  linux-objects-nvidia-510-5.15.0-53-generic        5.15.0-53.59+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-53 (objects)
ii  linux-objects-nvidia-510-5.15.0-56-generic        5.15.0-56.62+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-56 (objects)
ii  linux-objects-nvidia-510-5.15.0-57-generic        5.15.0-57.63+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-57 (objects)
ii  linux-objects-nvidia-510-5.15.0-58-generic        5.15.0-58.64+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-58 (objects)
ii  linux-objects-nvidia-525-5.15.0-58-generic        5.15.0-58.64+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-58 (objects)
ii  linux-signatures-nvidia-5.15.0-43-generic         5.15.0-43.46+1                                     amd64        Linux kernel signatures for nvidia modules for version 5.15.0-43-generic
ii  linux-signatures-nvidia-5.15.0-56-generic         5.15.0-56.62+1                                     amd64        Linux kernel signatures for nvidia modules for version 5.15.0-56-generic
ii  linux-signatures-nvidia-5.15.0-57-generic         5.15.0-57.63+1                                     amd64        Linux kernel signatures for nvidia modules for version 5.15.0-57-generic
ii  linux-signatures-nvidia-5.15.0-58-generic         5.15.0-58.64+1                                     amd64        Linux kernel signatures for nvidia modules for version 5.15.0-58-generic
ii  nvidia-compute-utils-525                          525.78.01-0ubuntu0.22.04.1                         amd64        NVIDIA compute utilities
ii  nvidia-dkms-525                                   525.78.01-0ubuntu0.22.04.1                         amd64        NVIDIA DKMS package
ii  nvidia-driver-525                                 525.78.01-0ubuntu0.22.04.1                         amd64        NVIDIA driver metapackage
ii  nvidia-kernel-common-525                          525.78.01-0ubuntu0.22.04.1                         amd64        Shared files used with the kernel module
ii  nvidia-kernel-source-525                          525.78.01-0ubuntu0.22.04.1                         amd64        NVIDIA kernel source package
ii  nvidia-prime                                      0.8.17.1                                           all          Tools to enable NVIDIA's Prime
ii  nvidia-settings                                   510.47.03-0ubuntu1                                 amd64        Tool for configuring the NVIDIA graphics driver
ii  nvidia-utils-525                                  525.78.01-0ubuntu0.22.04.1                         amd64        NVIDIA driver support binaries
ii  screen-resolution-extra                           0.18.2                                             all          Extension for the nvidia-settings control panel
ii  xserver-xorg-video-nvidia-525                     525.78.01-0ubuntu0.22.04.1                         amd64        NVIDIA binary Xorg driver

Considering nvidia-smi is not working properly it makes me wonder if there are issues with the installation so I suggest a complete uninstall and then reinstall.

Use this command to remove everything.

sudo apt-get remove --purge '^nvidia-.*'

Then restart your computer so it boots in with Nouveau driver. From there using the “software & updates” application on ubuntu, go to additional drivers and pick the nvidia-driver-525, then hit apply and let it install.

After that it will ask you to reboot, so do so. See if that helps.

Thank you, @reza11 . I already did this, but will do so again and report back.

Yep. I did so again, and the result is:

$ sudo nvidia-smi
No devices were found

I needed to switch to “NVIDIA (Performance Mode)” from the “On Demand” option, and reboot. (I also did sudo apt install nvidia-dkms-525).

Various diagnostic stuff following reboot:

$ sudo lshw -c display
[sudo] password for MyAccount: 
  *-display                 
       description: VGA compatible controller
       product: GP104GLM [Quadro P5200 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 vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:16 memory:c0000000-c0ffffff memory:60000000-6fffffff memory:70000000-71ffffff ioport:2000(size=128) memory:c1080000-c10fffff
  *-display
       description: VGA compatible controller
       product: Intel Corporation
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       logical name: /dev/fb0
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom fb
       configuration: depth=32 driver=i915 latency=0 resolution=3840,2160
       resources: irq:156 memory:bf000000-bfffffff memory:80000000-8fffffff ioport:3000(size=64) memory:c0000-dffff

The warnings below are new:

$ sudo dkms status
nvidia/525.78.01, 5.15.0-58-lowlatency, x86_64: installed (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!)
virtualbox/6.1.38, 5.15.0-56-generic, x86_64: installed
virtualbox/6.1.38, 5.15.0-57-generic, x86_64: installed
virtualbox/6.1.38, 5.15.0-57-lowlatency, x86_64: installed
virtualbox/6.1.38, 5.15.0-58-generic, x86_64: installed
virtualbox/6.1.38, 5.15.0-58-lowlatency, x86_64: installed
$ dpkg -l |grep nvidia
ii  libnvidia-cfg1-525:amd64                          525.78.01-0ubuntu0.22.04.1                         amd64        NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-common-525                              525.78.01-0ubuntu0.22.04.1                         all          Shared files used by the NVIDIA libraries
ii  libnvidia-compute-525:amd64                       525.78.01-0ubuntu0.22.04.1                         amd64        NVIDIA libcompute package
ii  libnvidia-compute-525:i386                        525.78.01-0ubuntu0.22.04.1                         i386         NVIDIA libcompute package
ii  libnvidia-decode-525:amd64                        525.78.01-0ubuntu0.22.04.1                         amd64        NVIDIA Video Decoding runtime libraries
ii  libnvidia-decode-525:i386                         525.78.01-0ubuntu0.22.04.1                         i386         NVIDIA Video Decoding runtime libraries
ii  libnvidia-egl-wayland1:amd64                      1:1.1.9-1.1                                        amd64        Wayland EGL External Platform library -- shared library
ii  libnvidia-encode-525:amd64                        525.78.01-0ubuntu0.22.04.1                         amd64        NVENC Video Encoding runtime library
ii  libnvidia-encode-525:i386                         525.78.01-0ubuntu0.22.04.1                         i386         NVENC Video Encoding runtime library
ii  libnvidia-extra-525:amd64                         525.78.01-0ubuntu0.22.04.1                         amd64        Extra libraries for the NVIDIA driver
ii  libnvidia-fbc1-525:amd64                          525.78.01-0ubuntu0.22.04.1                         amd64        NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-fbc1-525:i386                           525.78.01-0ubuntu0.22.04.1                         i386         NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-gl-525:amd64                            525.78.01-0ubuntu0.22.04.1                         amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-gl-525:i386                             525.78.01-0ubuntu0.22.04.1                         i386         NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
rc  linux-modules-nvidia-470-5.15.0-58-generic        5.15.0-58.64                                       amd64        Linux kernel nvidia modules for version 5.15.0-58
rc  linux-modules-nvidia-510-5.15.0-25-generic        5.15.0-25.25                                       amd64        Linux kernel nvidia modules for version 5.15.0-25
rc  linux-modules-nvidia-510-5.15.0-41-generic        5.15.0-41.44+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-41
rc  linux-modules-nvidia-510-5.15.0-43-generic        5.15.0-43.46+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-43
rc  linux-modules-nvidia-510-5.15.0-46-generic        5.15.0-46.49                                       amd64        Linux kernel nvidia modules for version 5.15.0-46
rc  linux-modules-nvidia-510-5.15.0-47-generic        5.15.0-47.51                                       amd64        Linux kernel nvidia modules for version 5.15.0-47
rc  linux-modules-nvidia-510-5.15.0-48-generic        5.15.0-48.54                                       amd64        Linux kernel nvidia modules for version 5.15.0-48
rc  linux-modules-nvidia-510-5.15.0-50-generic        5.15.0-50.56+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-50
rc  linux-modules-nvidia-510-5.15.0-52-generic        5.15.0-52.58+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-52
rc  linux-modules-nvidia-510-5.15.0-53-generic        5.15.0-53.59+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-53
ii  linux-modules-nvidia-525-5.15.0-58-lowlatency     5.15.0-58.64+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-58
ii  linux-modules-nvidia-525-lowlatency-hwe-22.04     5.15.0-58.64+1                                     amd64        Extra drivers for nvidia-525 for the lowlatency-hwe-22.04 flavour
ii  linux-objects-nvidia-470-5.15.0-58-generic        5.15.0-58.64+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-58 (objects)
rc  linux-objects-nvidia-510-5.15.0-25-generic        5.15.0-25.25                                       amd64        Linux kernel nvidia modules for version 5.15.0-25 (objects)
rc  linux-objects-nvidia-510-5.15.0-41-generic        5.15.0-41.44+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-41 (objects)
ii  linux-objects-nvidia-510-5.15.0-43-generic        5.15.0-43.46+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-43 (objects)
rc  linux-objects-nvidia-510-5.15.0-46-generic        5.15.0-46.49                                       amd64        Linux kernel nvidia modules for version 5.15.0-46 (objects)
rc  linux-objects-nvidia-510-5.15.0-47-generic        5.15.0-47.51                                       amd64        Linux kernel nvidia modules for version 5.15.0-47 (objects)
rc  linux-objects-nvidia-510-5.15.0-48-generic        5.15.0-48.54                                       amd64        Linux kernel nvidia modules for version 5.15.0-48 (objects)
rc  linux-objects-nvidia-510-5.15.0-50-generic        5.15.0-50.56+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-50 (objects)
rc  linux-objects-nvidia-510-5.15.0-52-generic        5.15.0-52.58+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-52 (objects)
rc  linux-objects-nvidia-510-5.15.0-53-generic        5.15.0-53.59+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-53 (objects)
ii  linux-objects-nvidia-510-5.15.0-56-generic        5.15.0-56.62+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-56 (objects)
ii  linux-objects-nvidia-510-5.15.0-57-generic        5.15.0-57.63+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-57 (objects)
ii  linux-objects-nvidia-510-5.15.0-58-generic        5.15.0-58.64+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-58 (objects)
ii  linux-objects-nvidia-525-5.15.0-58-generic        5.15.0-58.64+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-58 (objects)
ii  linux-objects-nvidia-525-5.15.0-58-lowlatency     5.15.0-58.64+1                                     amd64        Linux kernel nvidia modules for version 5.15.0-58 (objects)
ii  linux-signatures-nvidia-5.15.0-43-generic         5.15.0-43.46+1                                     amd64        Linux kernel signatures for nvidia modules for version 5.15.0-43-generic
ii  linux-signatures-nvidia-5.15.0-56-generic         5.15.0-56.62+1                                     amd64        Linux kernel signatures for nvidia modules for version 5.15.0-56-generic
ii  linux-signatures-nvidia-5.15.0-57-generic         5.15.0-57.63+1                                     amd64        Linux kernel signatures for nvidia modules for version 5.15.0-57-generic
ii  linux-signatures-nvidia-5.15.0-58-generic         5.15.0-58.64+1                                     amd64        Linux kernel signatures for nvidia modules for version 5.15.0-58-generic
ii  linux-signatures-nvidia-5.15.0-58-lowlatency      5.15.0-58.64+1                                     amd64        Linux kernel signatures for nvidia modules for version 5.15.0-58-lowlatency
ii  nvidia-compute-utils-525                          525.78.01-0ubuntu0.22.04.1                         amd64        NVIDIA compute utilities
ii  nvidia-dkms-525                                   525.78.01-0ubuntu0.22.04.1                         amd64        NVIDIA DKMS package
ii  nvidia-driver-525                                 525.78.01-0ubuntu0.22.04.1                         amd64        NVIDIA driver metapackage
ii  nvidia-kernel-common-525                          525.78.01-0ubuntu0.22.04.1                         amd64        Shared files used with the kernel module
ii  nvidia-kernel-source-525                          525.78.01-0ubuntu0.22.04.1                         amd64        NVIDIA kernel source package
ii  nvidia-prime                                      0.8.17.1                                           all          Tools to enable NVIDIA's Prime
ii  nvidia-settings                                   510.47.03-0ubuntu1                                 amd64        Tool for configuring the NVIDIA graphics driver
ii  nvidia-utils-525                                  525.78.01-0ubuntu0.22.04.1                         amd64        NVIDIA driver support binaries
ii  screen-resolution-extra                           0.18.2                                             all          Extension for the nvidia-settings control panel
ii  xserver-xorg-video-nvidia-525                     525.78.01-0ubuntu0.22.04.1                         amd64        NVIDIA binary Xorg driver

Finally, the revised output of nvidia-bug-report.sh:
nvidia-bug-report.log.gz (144.0 KB)