Monday, April 11, 2022

Installing GPU drivers on my Ubuntu 20 Lenovo Thinkpad laptop (nvidia-driver)

 Installing GPU drivers on my Ubuntu Lenovo Thinkpad laptop (nvidia-driver)



I had to run the following commands

ubuntu-drivers devices

WARNING:root:_pkg_get_support nvidia-driver-510: package has invalid Support PBheader, cannot determine support level
WARNING:root:_pkg_get_support nvidia-driver-390: package has invalid Support Legacyheader, cannot determine support level
WARNING:root:_pkg_get_support nvidia-driver-510-server: package has invalid Support PBheader, cannot determine support level
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001BBBsv000017AAsd0000225Fbc03sc00i00
vendor   : NVIDIA Corporation
model    : GP104GLM [Quadro P3200 Mobile]
driver   : nvidia-driver-418-server - distro non-free
driver   : nvidia-driver-450-server - distro non-free
driver   : nvidia-driver-510 - distro non-free
driver   : nvidia-driver-390 - distro non-free
driver   : nvidia-driver-470 - distro non-free recommended
driver   : nvidia-driver-470-server - distro non-free
driver   : nvidia-driver-510-server - distro non-free
driver   : xserver-xorg-video-nouveau - distro free builtin

list display units

sudo lshw -numeric -C display

  *-display                 
       description: VGA compatible controller
       product: GP104GLM [Quadro P3200 Mobile] [10DE:1BBB]
       vendor: NVIDIA Corporation [10DE]
       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=nouveau latency=0
       resources: irq:152 memory:c0000000-c0ffffff memory:60000000-6fffffff memory:70000000-71ffffff ioport:3000(size=128) memory:c1080000-c10fffff
  *-display
       description: VGA compatible controller
       product: UHD Graphics 630 (Mobile) [8086:3E9B]
       vendor: Intel Corporation [8086]
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:151 memory:bf000000-bfffffff memory:80000000-8fffffff ioport:4000(size=64) memory:c0000-dffff

 

Then run

sudo ubuntu-drivers autoinstall

WARNING:root:_pkg_get_support nvidia-driver-510: package has invalid Support PBheader, cannot determine support level
WARNING:root:_pkg_get_support nvidia-driver-510-server: package has invalid Support PBheader, cannot determine support level
WARNING:root:_pkg_get_support nvidia-driver-390: package has invalid Support Legacyheader, cannot determine support level
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libnvidia-cfg1-470 libnvidia-common-470 libnvidia-compute-470 libnvidia-compute-470:i386 libnvidia-decode-470 libnvidia-decode-470:i386
  libnvidia-encode-470 libnvidia-encode-470:i386 libnvidia-extra-470 libnvidia-fbc1-470 libnvidia-fbc1-470:i386 libnvidia-gl-470
  libnvidia-gl-470:i386 libnvidia-ifr1-470 libnvidia-ifr1-470:i386 linux-modules-nvidia-470-5.4.0-107-generic
  linux-objects-nvidia-470-5.4.0-107-generic linux-signatures-nvidia-5.4.0-107-generic nvidia-compute-utils-470 nvidia-kernel-common-470
  nvidia-kernel-source-470 nvidia-prime nvidia-settings nvidia-utils-470 screen-resolution-extra xserver-xorg-video-nvidia-470
The following NEW packages will be installed:
  libnvidia-cfg1-470 libnvidia-common-470 libnvidia-compute-470 libnvidia-compute-470:i386 libnvidia-decode-470 libnvidia-decode-470:i386
  libnvidia-encode-470 libnvidia-encode-470:i386 libnvidia-extra-470 libnvidia-fbc1-470 libnvidia-fbc1-470:i386 libnvidia-gl-470
  libnvidia-gl-470:i386 libnvidia-ifr1-470 libnvidia-ifr1-470:i386 linux-modules-nvidia-470-5.4.0-107-generic
  linux-modules-nvidia-470-generic linux-objects-nvidia-470-5.4.0-107-generic linux-signatures-nvidia-5.4.0-107-generic
  nvidia-compute-utils-470 nvidia-driver-470 nvidia-kernel-common-470 nvidia-kernel-source-470 nvidia-prime nvidia-settings
  nvidia-utils-470 screen-resolution-extra xserver-xorg-video-nvidia-470
0 upgraded, 28 newly installed, 0 to remove and 20 not upgraded.
Need to get 296 MB of archives.
After this operation, 842 MB of additional disk space will be used.
Get:1 http://za.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 libnvidia-cfg1-470 amd64 470.103.01-0ubuntu0.20.04.1 [79.7 kB]
Get:2 http://za.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 libnvidia-common-470 all 470.103.01-0ubuntu0.20.04.1 [10.6 kB]
Get:3 http://za.archive.ubuntu.com/ubuntu focal-updates/restricted i386 libnvidia-compute-470 i386 470.103.01-0ubuntu0.20.04.1 [25.7 MB]
Get:4 http://za.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 libnvidia-compute-470 amd64 470.103.01-0ubuntu0.20.04.1 [31.6 MB]
Get:5 http://za.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 libnvidia-decode-470 amd64 470.103.01-0ubuntu0.20.04.1 [1,376 kB]
Get:6 http://za.archive.ubuntu.com/ubuntu focal-updates/restricted i386 libnvidia-decode-470 i386 470.103.01-0ubuntu0.20.04.1 [1,346 kB]   
Get:7 http://za.archive.ubuntu.com/ubuntu focal-updates/restricted i386 libnvidia-encode-470 i386 470.103.01-0ubuntu0.20.04.1 [45.0 kB]    
Get:8 http://za.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 libnvidia-encode-470 amd64 470.103.01-0ubuntu0.20.04.1 [42.2 kB]  
Get:9 http://za.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 libnvidia-extra-470 amd64 470.103.01-0ubuntu0.20.04.1 [43.9 kB]   
Get:10 http://za.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 libnvidia-fbc1-470 amd64 470.103.01-0ubuntu0.20.04.1 [47.0 kB]   
Get:11 http://za.archive.ubuntu.com/ubuntu focal-updates/restricted i386 libnvidia-fbc1-470 i386 470.103.01-0ubuntu0.20.04.1 [50.3 kB]     
Get:12 http://za.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 libnvidia-gl-470 amd64 470.103.01-0ubuntu0.20.04.1 [144 MB]      
Get:13 http://za.archive.ubuntu.com/ubuntu focal-updates/restricted i386 libnvidia-gl-470 i386 470.103.01-0ubuntu0.20.04.1 [21.2 MB]       
Get:14 http://za.archive.ubuntu.com/ubuntu focal-updates/restricted i386 libnvidia-ifr1-470 i386 470.103.01-0ubuntu0.20.04.1 [70.3 kB]     
Get:15 http://za.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 libnvidia-ifr1-470 amd64 470.103.01-0ubuntu0.20.04.1 [69.0 kB]   
Get:16 http://za.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 linux-signatures-nvidia-5.4.0-107-generic amd64 5.4.0-107.121 [30.1 kB]
Get:17 http://za.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 linux-objects-nvidia-470-5.4.0-107-generic amd64 5.4.0-107.121 [24.8 MB]
Get:18 http://za.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 nvidia-kernel-common-470 amd64 470.103.01-0ubuntu0.20.04.1 [16.5 MB]
Get:19 http://za.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 linux-modules-nvidia-470-5.4.0-107-generic amd64 5.4.0-107.121 [7,140 B]
Get:20 http://za.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 linux-modules-nvidia-470-generic amd64 5.4.0-107.121 [5,484 B]   
Get:21 http://za.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 nvidia-compute-utils-470 amd64 470.103.01-0ubuntu0.20.04.1 [106 kB]
Get:22 http://za.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 nvidia-kernel-source-470 amd64 470.103.01-0ubuntu0.20.04.1 [25.2 MB]
Get:23 http://za.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 nvidia-utils-470 amd64 470.103.01-0ubuntu0.20.04.1 [372 kB]      
Get:24 http://za.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 xserver-xorg-video-nvidia-470 amd64 470.103.01-0ubuntu0.20.04.1 [1,568 kB]
Get:25 http://za.archive.ubuntu.com/ubuntu focal-updates/restricted amd64 nvidia-driver-470 amd64 470.103.01-0ubuntu0.20.04.1 [446 kB]     
Get:26 http://za.archive.ubuntu.com/ubuntu focal-updates/main amd64 nvidia-prime all 0.8.16~0.20.04.2 [9,960 B]                            
Get:27 http://za.archive.ubuntu.com/ubuntu focal/main amd64 screen-resolution-extra all 0.18build1 [4,456 B]                               
Get:28 http://za.archive.ubuntu.com/ubuntu focal-updates/main amd64 nvidia-settings amd64 470.57.01-0ubuntu0.20.04.3 [886 kB]              
Fetched 296 MB in 6min 51s (720 kB/s)                                                                                                      
Preconfiguring packages ...
Selecting previously unselected package libnvidia-cfg1-470:amd64.
(Reading database ... 348635 files and directories currently installed.)
Preparing to unpack .../00-libnvidia-cfg1-470_470.103.01-0ubuntu0.20.04.1_amd64.deb ...
Unpacking libnvidia-cfg1-470:amd64 (470.103.01-0ubuntu0.20.04.1) ...
Selecting previously unselected package libnvidia-common-470.
Preparing to unpack .../01-libnvidia-common-470_470.103.01-0ubuntu0.20.04.1_all.deb ...
Unpacking libnvidia-common-470 (470.103.01-0ubuntu0.20.04.1) ...
Selecting previously unselected package libnvidia-compute-470:i386.
Preparing to unpack .../02-libnvidia-compute-470_470.103.01-0ubuntu0.20.04.1_i386.deb ...
Unpacking libnvidia-compute-470:i386 (470.103.01-0ubuntu0.20.04.1) ...
Selecting previously unselected package libnvidia-compute-470:amd64.
Preparing to unpack .../03-libnvidia-compute-470_470.103.01-0ubuntu0.20.04.1_amd64.deb ...
Unpacking libnvidia-compute-470:amd64 (470.103.01-0ubuntu0.20.04.1) ...
Selecting previously unselected package libnvidia-decode-470:amd64.
Preparing to unpack .../04-libnvidia-decode-470_470.103.01-0ubuntu0.20.04.1_amd64.deb ...
Unpacking libnvidia-decode-470:amd64 (470.103.01-0ubuntu0.20.04.1) ...
Selecting previously unselected package libnvidia-decode-470:i386.
Preparing to unpack .../05-libnvidia-decode-470_470.103.01-0ubuntu0.20.04.1_i386.deb ...
Unpacking libnvidia-decode-470:i386 (470.103.01-0ubuntu0.20.04.1) ...
Selecting previously unselected package libnvidia-encode-470:i386.
Preparing to unpack .../06-libnvidia-encode-470_470.103.01-0ubuntu0.20.04.1_i386.deb ...
Unpacking libnvidia-encode-470:i386 (470.103.01-0ubuntu0.20.04.1) ...
Selecting previously unselected package libnvidia-encode-470:amd64.
Preparing to unpack .../07-libnvidia-encode-470_470.103.01-0ubuntu0.20.04.1_amd64.deb ...
Unpacking libnvidia-encode-470:amd64 (470.103.01-0ubuntu0.20.04.1) ...
Selecting previously unselected package libnvidia-extra-470:amd64.
Preparing to unpack .../08-libnvidia-extra-470_470.103.01-0ubuntu0.20.04.1_amd64.deb ...
Unpacking libnvidia-extra-470:amd64 (470.103.01-0ubuntu0.20.04.1) ...
Selecting previously unselected package libnvidia-fbc1-470:amd64.
Preparing to unpack .../09-libnvidia-fbc1-470_470.103.01-0ubuntu0.20.04.1_amd64.deb ...
Unpacking libnvidia-fbc1-470:amd64 (470.103.01-0ubuntu0.20.04.1) ...
Selecting previously unselected package libnvidia-fbc1-470:i386.
Preparing to unpack .../10-libnvidia-fbc1-470_470.103.01-0ubuntu0.20.04.1_i386.deb ...
Unpacking libnvidia-fbc1-470:i386 (470.103.01-0ubuntu0.20.04.1) ...
Selecting previously unselected package libnvidia-gl-470:amd64.
Preparing to unpack .../11-libnvidia-gl-470_470.103.01-0ubuntu0.20.04.1_amd64.deb ...
Unpacking libnvidia-gl-470:amd64 (470.103.01-0ubuntu0.20.04.1) ...
Selecting previously unselected package libnvidia-gl-470:i386.
Preparing to unpack .../12-libnvidia-gl-470_470.103.01-0ubuntu0.20.04.1_i386.deb ...
Unpacking libnvidia-gl-470:i386 (470.103.01-0ubuntu0.20.04.1) ...
Selecting previously unselected package libnvidia-ifr1-470:amd64.
Preparing to unpack .../13-libnvidia-ifr1-470_470.103.01-0ubuntu0.20.04.1_amd64.deb ...
Unpacking libnvidia-ifr1-470:amd64 (470.103.01-0ubuntu0.20.04.1) ...
Selecting previously unselected package libnvidia-ifr1-470:i386.
Preparing to unpack .../14-libnvidia-ifr1-470_470.103.01-0ubuntu0.20.04.1_i386.deb ...
Unpacking libnvidia-ifr1-470:i386 (470.103.01-0ubuntu0.20.04.1) ...
Selecting previously unselected package linux-signatures-nvidia-5.4.0-107-generic.
Preparing to unpack .../15-linux-signatures-nvidia-5.4.0-107-generic_5.4.0-107.121_amd64.deb ...
Unpacking linux-signatures-nvidia-5.4.0-107-generic (5.4.0-107.121) ...
Selecting previously unselected package linux-objects-nvidia-470-5.4.0-107-generic.
Preparing to unpack .../16-linux-objects-nvidia-470-5.4.0-107-generic_5.4.0-107.121_amd64.deb ...
Unpacking linux-objects-nvidia-470-5.4.0-107-generic (5.4.0-107.121) ...
Selecting previously unselected package nvidia-kernel-common-470.
Preparing to unpack .../17-nvidia-kernel-common-470_470.103.01-0ubuntu0.20.04.1_amd64.deb ...
Unpacking nvidia-kernel-common-470 (470.103.01-0ubuntu0.20.04.1) ...
Selecting previously unselected package linux-modules-nvidia-470-5.4.0-107-generic.
Preparing to unpack .../18-linux-modules-nvidia-470-5.4.0-107-generic_5.4.0-107.121_amd64.deb ...
Unpacking linux-modules-nvidia-470-5.4.0-107-generic (5.4.0-107.121) ...
Selecting previously unselected package linux-modules-nvidia-470-generic.
Preparing to unpack .../19-linux-modules-nvidia-470-generic_5.4.0-107.121_amd64.deb ...
Unpacking linux-modules-nvidia-470-generic (5.4.0-107.121) ...
Selecting previously unselected package nvidia-compute-utils-470.
Preparing to unpack .../20-nvidia-compute-utils-470_470.103.01-0ubuntu0.20.04.1_amd64.deb ...
Unpacking nvidia-compute-utils-470 (470.103.01-0ubuntu0.20.04.1) ...
Selecting previously unselected package nvidia-kernel-source-470.
Preparing to unpack .../21-nvidia-kernel-source-470_470.103.01-0ubuntu0.20.04.1_amd64.deb ...
Unpacking nvidia-kernel-source-470 (470.103.01-0ubuntu0.20.04.1) ...
Selecting previously unselected package nvidia-utils-470.
Preparing to unpack .../22-nvidia-utils-470_470.103.01-0ubuntu0.20.04.1_amd64.deb ...
Unpacking nvidia-utils-470 (470.103.01-0ubuntu0.20.04.1) ...
Selecting previously unselected package xserver-xorg-video-nvidia-470.
Preparing to unpack .../23-xserver-xorg-video-nvidia-470_470.103.01-0ubuntu0.20.04.1_amd64.deb ...
Unpacking xserver-xorg-video-nvidia-470 (470.103.01-0ubuntu0.20.04.1) ...
Selecting previously unselected package nvidia-driver-470.
Preparing to unpack .../24-nvidia-driver-470_470.103.01-0ubuntu0.20.04.1_amd64.deb ...
Unpacking nvidia-driver-470 (470.103.01-0ubuntu0.20.04.1) ...
Selecting previously unselected package nvidia-prime.
Preparing to unpack .../25-nvidia-prime_0.8.16~0.20.04.2_all.deb ...
Unpacking nvidia-prime (0.8.16~0.20.04.2) ...
Selecting previously unselected package screen-resolution-extra.
Preparing to unpack .../26-screen-resolution-extra_0.18build1_all.deb ...
Unpacking screen-resolution-extra (0.18build1) ...
Selecting previously unselected package nvidia-settings.
Preparing to unpack .../27-nvidia-settings_470.57.01-0ubuntu0.20.04.3_amd64.deb ...
Unpacking nvidia-settings (470.57.01-0ubuntu0.20.04.3) ...
Setting up nvidia-kernel-source-470 (470.103.01-0ubuntu0.20.04.1) ...
Setting up linux-signatures-nvidia-5.4.0-107-generic (5.4.0-107.121) ...
Setting up nvidia-prime (0.8.16~0.20.04.2) ...
Setting up libnvidia-compute-470:amd64 (470.103.01-0ubuntu0.20.04.1) ...
Setting up libnvidia-compute-470:i386 (470.103.01-0ubuntu0.20.04.1) ...
Setting up libnvidia-extra-470:amd64 (470.103.01-0ubuntu0.20.04.1) ...
Setting up nvidia-utils-470 (470.103.01-0ubuntu0.20.04.1) ...
Setting up libnvidia-fbc1-470:amd64 (470.103.01-0ubuntu0.20.04.1) ...
Setting up libnvidia-fbc1-470:i386 (470.103.01-0ubuntu0.20.04.1) ...
Setting up nvidia-compute-utils-470 (470.103.01-0ubuntu0.20.04.1) ...
Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory
Adding system user `nvidia-persistenced' (UID 140) ...
Adding new group `nvidia-persistenced' (GID 146) ...
Adding new user `nvidia-persistenced' (UID 140) with group `nvidia-persistenced' ...
Not creating home directory `/nonexistent'.
Setting up linux-objects-nvidia-470-5.4.0-107-generic (5.4.0-107.121) ...
Setting up libnvidia-cfg1-470:amd64 (470.103.01-0ubuntu0.20.04.1) ...
Setting up libnvidia-common-470 (470.103.01-0ubuntu0.20.04.1) ...
Setting up screen-resolution-extra (0.18build1) ...
Setting up nvidia-kernel-common-470 (470.103.01-0ubuntu0.20.04.1) ...
update-initramfs: deferring update (trigger activated)
Created symlink /etc/systemd/system/systemd-hibernate.service.requires/nvidia-hibernate.service → /lib/systemd/system/nvidia-hibernate.service.
Created symlink /etc/systemd/system/systemd-suspend.service.requires/nvidia-resume.service → /lib/systemd/system/nvidia-resume.service.
Created symlink /etc/systemd/system/systemd-hibernate.service.requires/nvidia-resume.service → /lib/systemd/system/nvidia-resume.service.
Created symlink /etc/systemd/system/systemd-suspend.service.requires/nvidia-suspend.service → /lib/systemd/system/nvidia-suspend.service.
Setting up libnvidia-gl-470:amd64 (470.103.01-0ubuntu0.20.04.1) ...
Setting up libnvidia-gl-470:i386 (470.103.01-0ubuntu0.20.04.1) ...
Setting up nvidia-settings (470.57.01-0ubuntu0.20.04.3) ...
Setting up linux-modules-nvidia-470-5.4.0-107-generic (5.4.0-107.121) ...
linux-image-nvidia-5.4.0-107-generic: constructing .ko files
nvidia-drm.ko: OK
nvidia-modeset.ko: OK
nvidia-peermem.ko: OK
nvidia-uvm.ko: OK
nvidia.ko: OK
Setting up libnvidia-decode-470:amd64 (470.103.01-0ubuntu0.20.04.1) ...
Setting up libnvidia-decode-470:i386 (470.103.01-0ubuntu0.20.04.1) ...
Setting up xserver-xorg-video-nvidia-470 (470.103.01-0ubuntu0.20.04.1) ...
Setting up libnvidia-ifr1-470:amd64 (470.103.01-0ubuntu0.20.04.1) ...
Setting up libnvidia-ifr1-470:i386 (470.103.01-0ubuntu0.20.04.1) ...
Setting up linux-modules-nvidia-470-generic (5.4.0-107.121) ...
Setting up libnvidia-encode-470:amd64 (470.103.01-0ubuntu0.20.04.1) ...
Setting up libnvidia-encode-470:i386 (470.103.01-0ubuntu0.20.04.1) ...
Setting up nvidia-driver-470 (470.103.01-0ubuntu0.20.04.1) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.7) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Processing triggers for initramfs-tools (0.136ubuntu6.7) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-107-generic
Processing triggers for linux-image-5.4.0-107-generic (5.4.0-107.121) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.4.0-107-generic
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.4.0-107-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-107-generic
Found initrd image: /boot/initrd.img-5.4.0-107-generic
Found linux image: /boot/vmlinuz-5.4.0-105-generic
Found initrd image: /boot/initrd.img-5.4.0-105-generic
Found Raspbian GNU/Linux 10 (buster) on /dev/mmcblk0p2
Adding boot menu entry for UEFI Firmware Settings
done

We now need to reboot

sudo shutdown -r 0

 

We can now run the nvidia settings menu

sudo nvidia-settings



No comments:

Post a Comment