Driver installed but not used: Kubuntu 20.04 LTS with GeForce RTX 2060 and Driver 455 (probable AMD conflict)

Hi everybody,

I’ve recently bought an XMG Core 15 laptop with an AMG Ryzen 7 and a GeForce RTX 2060. I run Win10 and Kubuntu 20.04 on dual boot. The Windows configuration runs just fine, however I’ve got issues getting a decent experience under Kubuntu. I consider myself an intermediate learner when it comes to Linux, and having read various other posts in this forum with similar issues to mine I am hesitant to just mess around with my config. Probably it is related to having two graphic cards and Linux not using the right one? I need help, please.

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

I’ll just add some additional information I’ve seen in other posts hoping that it will prove helpful:

cc --version
cc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

dkms status
nvidia, 455.38, 5.4.0-58-generic, x86_64: installed

ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0 ==
modalias : pci:v000010DEd00001F15sv00001D05sd00001100bc03sc00i00
vendor   : NVIDIA Corporation
driver   : nvidia-driver-440-server - distro non-free
driver   : nvidia-driver-450-server - distro non-free
driver   : nvidia-driver-450 - distro non-free
driver   : nvidia-driver-455 - distro non-free recommended
driver   : xserver-xorg-video-nouveau - distro free builtin

nvidia-smi
Tue Jan  5 08:07:12 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 455.38       Driver Version: 455.38       CUDA Version: 11.1     |
|-------------------------------+----------------------+----------------------+
| 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  GeForce RTX 2060    Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   39C    P8     9W /  N/A |      5MiB /  5934MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A       903      G   /usr/lib/xorg/Xorg                  4MiB |
+-----------------------------------------------------------------------------+    

lsmod | grep nvidia
    nvidia_uvm           1003520  0
    nvidia_drm             53248  2
    nvidia_modeset       1216512  3 nvidia_drm
    nvidia              27701248  90 nvidia_uvm,nvidia_modeset
    drm_kms_helper        184320  2 amdgpu,nvidia_drm
    drm                   491520  8 gpu_sched,drm_kms_helper,amdgpu,nvidia_drm,ttm
    i2c_nvidia_gpu         16384  0

glxinfo | grep -i opengl    
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: llvmpipe (LLVM 10.0.0, 128 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 20.0.8
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.1 Mesa 20.0.8
OpenGL shading language version string: 1.40
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 20.0.8
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:

lshw -c video
  *-display                 
       description: VGA compatible controller
       product: TU106 [GeForce RTX 2060]
       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:109 memory:fb000000-fbffffff memory:b0000000-bfffffff memory:c0000000-c1ffffff ioport:f000(size=128) memory:fc000000-fc07ffff
  *-display UNCLAIMED
       description: VGA compatible controller
       product: Renoir
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 0
       bus info: pci@0000:06:00.0
       version: c6
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi msix vga_controller bus_master cap_list
       configuration: latency=0
       resources: memory:d0000000-dfffffff memory:e0000000-e01fffff ioport:d000(size=256) memory:fc500000-fc57ffff

more /usr/share/X11/xorg.conf.d/10-amdgpu.conf
    Section "OutputClass"
            Identifier "AMDgpu"
            MatchDriver "amdgpu"
            Driver "amdgpu"
    EndSection

grep nvidia /etc/modprobe.d/* /lib/modprobe.d/*
/etc/modprobe.d/blacklist-framebuffer.conf:blacklist nvidiafb

ls /lib/modprobe.d/blacklist-nvidia.conf
ii  libnvidia-cfg1-455:amd64                      455.38-0ubuntu0.20.04.1                     amd64        NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-common-455                          455.38-0ubuntu0.20.04.1                     all          Shared files used by the NVIDIA libraries
rc  libnvidia-compute-450:amd64                   450.80.02-0ubuntu0.20.04.2                  amd64        NVIDIA libcompute package
ii  libnvidia-compute-455:amd64                   455.38-0ubuntu0.20.04.1                     amd64        NVIDIA libcompute package
ii  libnvidia-compute-455:i386                    455.38-0ubuntu0.20.04.1                     i386         NVIDIA libcompute package
ii  libnvidia-decode-455:amd64                    455.38-0ubuntu0.20.04.1                     amd64        NVIDIA Video Decoding runtime libraries
ii  libnvidia-decode-455:i386                     455.38-0ubuntu0.20.04.1                     i386         NVIDIA Video Decoding runtime libraries
ii  libnvidia-encode-455:amd64                    455.38-0ubuntu0.20.04.1                     amd64        NVENC Video Encoding runtime library
ii  libnvidia-encode-455:i386                     455.38-0ubuntu0.20.04.1                     i386         NVENC Video Encoding runtime library
ii  libnvidia-extra-455:amd64                     455.38-0ubuntu0.20.04.1                     amd64        Extra libraries for the NVIDIA driver
ii  libnvidia-fbc1-455:amd64                      455.38-0ubuntu0.20.04.1                     amd64        NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-fbc1-455:i386                       455.38-0ubuntu0.20.04.1                     i386         NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-gl-455:amd64                        455.38-0ubuntu0.20.04.1                     amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-gl-455:i386                         455.38-0ubuntu0.20.04.1                     i386         NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-ifr1-455:amd64                      455.38-0ubuntu0.20.04.1                     amd64        NVIDIA OpenGL-based Inband Frame Readback runtime library
ii  libnvidia-ifr1-455:i386                       455.38-0ubuntu0.20.04.1                     i386         NVIDIA OpenGL-based Inband Frame Readback runtime library
ii  linux-modules-nvidia-440-5.4.0-42-generic     5.4.0-42.46                                 amd64        Linux kernel nvidia modules for version 5.4.0-42
ii  linux-modules-nvidia-440-5.4.0-47-generic     5.4.0-47.51                                 amd64        Linux kernel nvidia modules for version 5.4.0-47
rc  nvidia-compute-utils-450                      450.80.02-0ubuntu0.20.04.2                  amd64        NVIDIA compute utilities
ii  nvidia-compute-utils-455                      455.38-0ubuntu0.20.04.1                     amd64        NVIDIA compute utilities
rc  nvidia-dkms-450                               450.80.02-0ubuntu0.20.04.2                  amd64        NVIDIA DKMS package
ii  nvidia-dkms-455                               455.38-0ubuntu0.20.04.1                     amd64        NVIDIA DKMS package
ii  nvidia-driver-455                             455.38-0ubuntu0.20.04.1                     amd64        NVIDIA driver metapackage
rc  nvidia-kernel-common-450                      450.80.02-0ubuntu0.20.04.2                  amd64        Shared files used with the kernel module
ii  nvidia-kernel-common-455                      455.38-0ubuntu0.20.04.1                     amd64        Shared files used with the kernel module
ii  nvidia-kernel-source-455                      455.38-0ubuntu0.20.04.1                     amd64        NVIDIA kernel source package
ii  nvidia-prime                                  0.8.14                                      all          Tools to enable NVIDIA's Prime
ii  nvidia-settings                               440.82-0ubuntu0.20.04.1                     amd64        Tool for configuring the NVIDIA graphics driver
ii  nvidia-utils-455                              455.38-0ubuntu0.20.04.1                     amd64        NVIDIA driver support binaries
ii  screen-resolution-extra                       0.18build1                                  all          Extension for the nvidia-settings control panel
ii  xserver-xorg-video-nvidia-455                 455.38-0ubuntu0.20.04.1                     amd64        NVIDIA binary Xorg driver

The kernel that comes with ubuntu 20.04 is too old to drive your AMD gpu. Either install a 5.9 kernel
https://forums.developer.nvidia.com/t/nvidia-gtx-1650-lenovo-ideapad-3-ryzen-4600h-ubuntu-18-04-hdmi-screen-not-detected/161703/7?u=generix
or upgrade to kubuntu 20.10.
You should then be able to use the nvidia gpu in offload mode.
If you also want to use external monitors, some tweaks might be necessary for 20.04:
https://forums.developer.nvidia.com/t/nvidia-xconfig-doesnt-do-what-i-want-it-to-nor-does-nvidia-settings/107883/7?u=generix

Thanks a lot, @generix! I’ll upgrade to 20.10 and take a look at your linked thread about external monitors, which I definitely want to use. Will give an update on the progress after that.

Well, what can I say? Thanks a lot again! Upgrading to 20.10 did the trick: no tweaking necessary, external monitors working out of the box, everything is as expected. Saved me a lot of headache. Question solved.

Thanks for reporting back, good to know that 20.10 now supports amd/nvidia combo ootb.