Ubuntu 19.04 Driver Installed but not Used

cc --version
clang version 10.0.1-++20200519095410+f79cd71e145-1~exp1~20200519200813.165
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

Hmm, so I need to have all compilers for version 7?

You not only switched the gcc version but also switched to clang/llvm.
Please switch back to gcc
update-alternatives --set cc /usr/bin/gcc
update-alternatives --set c++ /usr/bin/g++

femust@femust-Z390-AORUS-PRO-WIFI:~$ cc --version
cc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright © 2017 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.

femust@femust-Z390-AORUS-PRO-WIFI:~$ gcc --version
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright © 2017 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.

femust@femust-Z390-AORUS-PRO-WIFI:~$ g++ --version
g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright © 2017 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.

So here is an updated log file and those compilers, but the problem still exists unfortunately…
nvidia-bug-report.log (945.3 KB)

Please post the output of
dkms status

dkms status
nvidia, 440.33.01, 4.15.0-101-generic, x86_64: installed

Normally it was only nvidia 440.33.01 but since i played with it a lot … maybe i should purge all nvidia and reinstall?

Looks like you lost the headers for the currently running kernel (5.3), so the driver only installed for the 4.15 kernel. Please reinstall them
sudo apt --reinstall install linux-headers-$(uname -r)
and post the output of
dkms status
afterwards.

femust@femust-Z390-AORUS-PRO-WIFI:~$ dkms status
nvidia, 440.33.01, 4.15.0-101-generic, x86_64: installed
nvidia, 440.33.01, 5.3.0-53-generic, x86_64: installed

Looks good, should work.

Gosh, it worked, awesome! I can’t express my gratitude! Since I had few times this issue and I had to reinstall and then after 3/4weeks of usage again it happened. Thank you!

Once you install a different compiler, the system will be switched use it as default. I doesn’t have an immediate effect but once you get a kernel update during updating the system (might be several weeks later) the driver needs to be recompiled and then it breaks.
Always switch back to the standard system compiler after usage of a different one.
Here’s a good cheat sheet:
https://gist.github.com/ArseniyShestakov/a458b96a354014f80ab8d95676100c03

Hello,generix.

I have installed the nvidia drivers on ubuntu 18.04. but for some reason, the driver isn’t being used (llvmpipe is used instead). Below is the output of the terminal.Please give me some advice, and I will be really appreciate for that.

$ glxinfo | grep render
direct rendering: Yes
GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer, GLX_MESA_query_renderer,
Extended renderer info (GLX_MESA_query_renderer):
OpenGL renderer string: llvmpipe (LLVM 9.0, 256 bits)
GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
GL_MESA_ycbcr_texture, GL_NV_conditional_render, GL_NV_depth_clamp,
GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
GL_NV_conditional_render, GL_NV_depth_clamp, GL_NV_fog_distance,
GL_MESA_shader_integer_functions, GL_NV_conditional_render,
GL_OES_element_index_uint, GL_OES_fbo_render_mipmap,

$ sudo lshw -c video
*-display
description: VGA compatible controller
product: GP107M [GeForce GTX 1050 Ti 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:132 memory:de000000-deffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:e000(size=128) memory:df000000-df07ffff
*-display
description: VGA compatible controller
product: Intel Corporation
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 04
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:130 memory:dd000000-ddffffff memory:b0000000-bfffffff ioport:f000(size=64) memory:c0000-dffff

nvidia-smi
Sat May 30 14:20:11 2020
±----------------------------------------------------------------------------+
| NVIDIA-SMI 430.34 Driver Version: 430.34 CUDA Version: 10.1 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 105… Off | 00000000:01:00.0 On | N/A |
| N/A 52C P0 N/A / N/A | 95MiB / 4040MiB | 1% Default |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1253 G /usr/lib/xorg/Xorg 93MiB |
±----------------------------------------------------------------------------+

=================================================================================
This is the nvidia-bug-report.log.gz
nvidia-bug-report.log (648.9 KB)

It’s an Optimus notebook, so you can’t use the .run installer.
Please follow this:

  • remove the .run installer driver using the --uninstall option
  • delete /etc/X11/xorg.conf
  • install the driver from repo (sudo apt install nvidia-driver-440)
  • make sure nvidia-prime is installed (sudo apt install nvidia-prime)
  • switch to nvidia (sudo prime-select nvidia)
  • remove stray blacklist files (sudo rm /lib/modprobe.d/blacklist-nvidia.conf /etc/modprobe.d/blacklist-nvidia.conf)
  • update the initrd (sudo update-initramfs -u)
  • reboot

Hi,generix,I am very glad to tell you that it is working. And the built-in screen of notepad also work when connecting external monitor,thanks very much.

The nvidia gpu is already being used as can be seen from the nvidia-smi process list output. To mitigate tearing, please try setting the kernel parameter
nvidia-drm.modeset=1
If that doesn’t work, please create a new nvidia-bug-report.log with said parameter set.

1 Like

Thank you, generix. It worked!

I have a similar issue on my Ubuntu 18.04. You can find relevant data below. I also attached nvidia-bug-report.log.

$ glxinfo | grep render
direct rendering: Yes
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
    GLX_MESA_copy_sub_buffer, GLX_MESA_query_renderer, GLX_OML_swap_method, 
Extended renderer info (GLX_MESA_query_renderer):
OpenGL renderer string: llvmpipe (LLVM 7.0, 256 bits)
    GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth, 
    GL_NV_conditional_render, GL_NV_depth_clamp, GL_NV_fog_distance, 

$ sudo lshw -c video
  *-display                 
       description: VGA compatible controller
       product: GP104GL [Quadro P4000]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:17: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:38 memory:c4000000-c4ffffff memory:b0000000-bfffffff memory:c0000000-c1ffffff ioport:7000(size=128) memory:c5000000-c507ffff

$ nvidia-smi
Tue Jul  7 10:56:42 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.67       Driver Version: 418.67       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Quadro P4000        On   | 00000000:17:00.0  On |                  N/A |
| 50%   50C    P0    27W / 105W |    125MiB /  8117MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1340      C   /usr/NX/bin/nxnode.bin                       113MiB |
+-----------------------------------------------------------------------------+

As the nvidia-smi output above hinted, I’m using NoMachine for remote desktop access.

Thanks for your help.

nvidia-bug-report.log (2.2 MB)

Please also help me. I bought Asus ROG Zephyrus and it could not use Nvidia GPU.
The driver is well installed but openGL still using llvmpipe.

$ glxinfo | grep render
direct rendering: Yes
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
    GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer, GLX_MESA_query_renderer, 
Extended renderer info (GLX_MESA_query_renderer):
OpenGL renderer string: llvmpipe (LLVM 9.0.1, 128 bits)
    GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth, 
    GL_MESA_ycbcr_texture, GL_NV_conditional_render, GL_NV_depth_clamp, 
    GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth, 
    GL_NV_conditional_render, GL_NV_depth_clamp, GL_NV_fog_distance, 
    GL_EXT_polygon_offset_clamp, GL_EXT_read_format_bgra, GL_EXT_render_snorm, 
    GL_MESA_shader_integer_functions, GL_NV_conditional_render, 
    GL_OES_element_index_uint, GL_OES_fbo_render_mipmap, 
$ nvidia-smi
Wed Jul  8 17:57:59 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.100      Driver Version: 440.100      CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 165...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   46C    P0     6W /  N/A |      0MiB /  3911MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+
Graphics:
  Device-1: NVIDIA vendor: ASUSTeK driver: nvidia v: 440.100 bus ID: 01:00.0 
  Device-2: AMD Renoir vendor: ASUSTeK driver: N/A bus ID: 04:00.0 
  Display: x11 server: X.Org 1.20.8 driver: ati,fbdev 
  unloaded: modesetting,nouveau,nvidia,radeon,vesa 
  resolution: 1920x1080~77Hz 
  OpenGL: renderer: llvmpipe (LLVM 9.0.1 128 bits) v: 3.3 Mesa 20.0.4 
  direct render: Yes 

nvidia-bug-report.log (1.5 MB)

OK, after upgrade kernel to 5.6.2 and follow this post


, solved!!. thank you.

nvidia-bug-report.log.gz (3.9 MB)

Hi Generix,

I have a similar problem to the guys above, can you take a look?

$ glxinfo | grep render
direct rendering: Yes
GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer, GLX_MESA_query_renderer,
Extended renderer info (GLX_MESA_query_renderer):
OpenGL renderer string: llvmpipe (LLVM 10.0.0, 256 bits)
GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
GL_MESA_ycbcr_texture, GL_NV_conditional_render, GL_NV_depth_clamp,
GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
GL_NV_conditional_render, GL_NV_depth_clamp, GL_NV_fog_distance,
GL_EXT_polygon_offset_clamp, GL_EXT_read_format_bgra, GL_EXT_render_snorm,
GL_MESA_shader_integer_functions, GL_NV_conditional_render,
GL_OES_element_index_uint, GL_OES_fbo_render_mipmap,

$ nvidia-smi
Wed Sep 30 23:34:40 2020
±----------------------------------------------------------------------------+
| NVIDIA-SMI 440.100 Driver Version: 440.100 CUDA Version: 10.2 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Tesla K80 Off | 00000000:05:00.0 Off | 0 |
| N/A 23C P8 28W / 149W | 0MiB / 11441MiB | 0% Default |
±------------------------------±---------------------±---------------------+
| 1 Tesla K80 Off | 00000000:06:00.0 Off | 0 |
| N/A 47C P0 120W / 149W | 5013MiB / 11441MiB | 88% Default |
±------------------------------±---------------------±---------------------+
| 2 Tesla K80 Off | 00000000:09:00.0 Off | 0 |
| N/A 27C P8 28W / 149W | 0MiB / 11441MiB | 0% Default |
±------------------------------±---------------------±---------------------+
| 3 Tesla K80 Off | 00000000:0A:00.0 Off | 0 |
| N/A 48C P0 110W / 149W | 4923MiB / 11441MiB | 77% Default |
±------------------------------±---------------------±---------------------+
| 4 Tesla K80 Off | 00000000:84:00.0 Off | 0 |
| N/A 42C P0 99W / 149W | 4931MiB / 11441MiB | 83% Default |
±------------------------------±---------------------±---------------------+
| 5 Tesla K80 Off | 00000000:85:00.0 Off | 0 |
| N/A 55C P0 116W / 149W | 4917MiB / 11441MiB | 90% Default |
±------------------------------±---------------------±---------------------+
| 6 Tesla K80 Off | 00000000:88:00.0 Off | 0 |
| N/A 42C P0 89W / 149W | 4646MiB / 11441MiB | 62% Default |
±------------------------------±---------------------±---------------------+
| 7 Tesla K80 Off | 00000000:89:00.0 Off | 0 |
| N/A 54C P0 106W / 149W | 4605MiB / 11441MiB | 69% Default |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found
±----------------------------------------------------------------------------+

$ dkms status
nvidia, 440.100, 5.3.0-62-generic, x86_64: installed
nvidia, 440.100, 5.4.0-42-generic, x86_64: installed

Hi Generix,

I have a very similar problem. I have tried all of the methods mentioned above, but still not working. Could you help have a look. Thank you very much.

Here is the log nvidia-bug-report.log.gz (1.1 MB)