Ubuntu 18.04 and Nvidia drivers

5,875

Solution 1

Got it. Unfortunately, it seems like the Lenovo secure boot blocked the driver from starting. After disable it on the BIOS, and reboot into Ubuntu, I see the Nvidia logo and I can use nvidia-smi and nvidia-settings.

Solution 2

This is how I had installed Nvidia graphics drivers on my Thinkpad T580.

From the application menu, go to system settings -> details and check if Nvidia graphics card is being used. Open software & updates, and click on the additional drivers tab. Select the option Using NVIDEA driver metapackage from nvidea-driver-390 and click on the Apply Changes button.

Additionally, disable secure boot from UEFI. Restart the computer. In the application menu, open NVIDEA X Server Settings, in the PRIME profiles tab, select NVIDEA.

Reference: 2 Ways to Install Nvidia Driver on Ubuntu 18.04

Share:
5,875

Related videos on Youtube

Elad Leev
Author by

Elad Leev

Updated on September 18, 2022

Comments

  • Elad Leev
    Elad Leev over 1 year


    I just installed Ubuntu 18.04 on my Lenovo ThinkPad X1 Extreme, everything seems to work, beside my Nvidia driver (the worst part is that I can't connect to extend monitor).

    My spec

    Machine Type        : Notebook
    Processor       : Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Operating System        : Ubuntu 18.04.1 LTS
    GP107M [GeForce GTX 1050 Ti Mobile]
    
    Kernel Version - 
    4.15.0-46-generic
    
    BIOS settings - 
    *Discrete graphics
    

    What I've tried
    * Use the default that drivers that Ubuntu came with * Install the drivers using the apt-get install nvidia-driver-418
    * Install the drivers using Nvidia installer (wihtout x11 running, using sh ./NVIDIA-Linux-x86_64-418.56.run)
    * Run nvidia-settings
    * Use lightDM and not GNOM
    * Purge all nvidia* and install the nvidia-driver-390 from the distro (and not the recommended one)
    * And many more suggestions that I found online

    What is my status right now
    The driver is still not working -

    #> nvidia-smi
    
    NVIDIA-SMI couldn't find libnvidia-ml.so library in your system. Please make sure that the NVIDIA Display Driver is properly installed and present in your system.
    Please also try adding directory that contains libnvidia-ml.so to your system PATH.
    

    (tried to run it with LD_PRELOAD=/usr/lib/i386-linux-gnu/libnvidia-ml.so nvidia-smi with no success.)

    The nvidia-settings command still opening me the blank screen, and the output is -

    ERROR: Unable to load info from any available system
    
    (nvidia-settings:3423): GLib-GObject-CRITICAL **: 12:17:57.417: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
    ** Message: 12:17:57.419: PRIME: No offloading required. Abort
    ** Message: 12:17:57.419: PRIME: is it supported? no
    

    When I run ubuntu-drivers devices I still get -

    == /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
    modalias : pci:v000010DEd00001C8Csv000017AAsd00002266bc03sc00i00
    vendor   : NVIDIA Corporation
    model    : GP107M [GeForce GTX 1050 Ti Mobile]
    driver   : nvidia-driver-396 - third-party free
    driver   : nvidia-driver-418 - third-party free recommended
    driver   : nvidia-driver-410 - third-party free
    driver   : nvidia-driver-390 - distro non-free
    driver   : nvidia-driver-415 - third-party free
    driver   : xserver-xorg-video-nouveau - distro free builtin
    

    despite the fact that it's already installed.

    The hardinfo command shows me that "Graphics" is "Unknown".

    What insatlled

    #> dpkg -l | grep -i nvidia
    ii  libnvidia-cfg1-418:amd64                   418.56-0ubuntu0~gpu18.04.1                  amd64        NVIDIA binary OpenGL/GLX configuration library
    ii  libnvidia-common-418                       418.56-0ubuntu0~gpu18.04.1                  all          Shared files used by the NVIDIA libraries
    ii  libnvidia-compute-418:amd64                418.56-0ubuntu0~gpu18.04.1                  amd64        NVIDIA libcompute package
    ii  libnvidia-compute-418:i386                 418.56-0ubuntu0~gpu18.04.1                  i386         NVIDIA libcompute package
    ii  libnvidia-decode-418:amd64                 418.56-0ubuntu0~gpu18.04.1                  amd64        NVIDIA Video Decoding runtime libraries
    ii  libnvidia-decode-418:i386                  418.56-0ubuntu0~gpu18.04.1                  i386         NVIDIA Video Decoding runtime libraries
    ii  libnvidia-encode-418:amd64                 418.56-0ubuntu0~gpu18.04.1                  amd64        NVENC Video Encoding runtime library
    ii  libnvidia-encode-418:i386                  418.56-0ubuntu0~gpu18.04.1                  i386         NVENC Video Encoding runtime library
    ii  libnvidia-fbc1-418:amd64                   418.56-0ubuntu0~gpu18.04.1                  
    
    amd64        NVIDIA OpenGL-based Framebuffer Capture runtime library
    ii  libnvidia-fbc1-418:i386                    418.56-0ubuntu0~gpu18.04.1                  i386         NVIDIA OpenGL-based Framebuffer Capture runtime library
    ii  libnvidia-gl-418:amd64                     418.56-0ubuntu0~gpu18.04.1                  amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
    ii  libnvidia-gl-418:i386                      418.56-0ubuntu0~gpu18.04.1                  i386         NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
    ii  libnvidia-ifr1-418:amd64                   418.56-0ubuntu0~gpu18.04.1                  amd64        NVIDIA OpenGL-based Inband Frame Readback runtime library
    ii  libnvidia-ifr1-418:i386                    418.56-0ubuntu0~gpu18.04.1                  i386         NVIDIA OpenGL-based Inband Frame Readback runtime library
    ii  nvidia-compute-utils-418                   418.56-0ubuntu0~gpu18.04.1                  amd64        NVIDIA compute utilities
    ii  nvidia-dkms-418                            418.56-0ubuntu0~gpu18.04.1                  amd64        NVIDIA DKMS package
    ii  nvidia-driver-418                          418.56-0ubuntu0~gpu18.04.1                  amd64        NVIDIA driver metapackage
    ii  nvidia-kernel-common-418                   418.56-0ubuntu0~gpu18.04.1                  amd64        Shared files used with the kernel module
    ii  nvidia-kernel-source-418                   418.56-0ubuntu0~gpu18.04.1                  amd64        NVIDIA kernel source package
    ii  nvidia-prime                               0.8.8.2                                     all          Tools to enable NVIDIA's Prime
    ii  nvidia-settings                            418.56-0ubuntu0~gpu18.04.1                  amd64        Tool for configuring the NVIDIA graphics driver
    ii  nvidia-utils-418                           418.56-0ubuntu0~gpu18.04.1                  amd64        NVIDIA driver support binaries
    ii  xserver-xorg-video-nvidia-418              418.56-0ubuntu0~gpu18.04.1                  amd64        NVIDIA binary Xorg driver
    

    I'm really not sure how to proceed, and it seems that the drivers is installed but not really loaded.
    I couldn't find a way to load it using modprobe or anything else.

    Any help will be helpful! :pray:

    • tatsu
      tatsu about 5 years
      well you haven't rebooted have you? on linux you have to reboot for the driver to be loaded. and personalyl my prefered mode of install is basically the apt install method you used, altough it's even more convinient if you just do : sudo add-apt-repository ppa:graphics-drivers/ppa -y && sudo apt update then open up the software & sorces app and go to the "aditional drivers" tab and browse and install the driver you want from there.
    • Elad Leev
      Elad Leev about 5 years
      if i had a dollar for every reboot that I did ;) unfortunately that's not the case. I've tried to install via ubuntu-drivers, apt-get and via the installer from nvidia site. nothing really helped :(
    • tatsu
      tatsu about 5 years
      well the installation method isn't the problem. the drivers are installed but there are problems in how they intertwine with your system. btw your output for ubuntu-drivers devices is nominal, I have the same. it's simply the same list as you get in the additional drivers tab but it doesn't say which one ins installed. did you ever get it to work with this hardware, say with a previous version of ubuntu? would you be open to trying with ubuntu 18.10? (ubuntu 19.04 comes out on april 18)
    • Elad Leev
      Elad Leev about 5 years
      It's a new laptop, so that's the first version that I'm trying to use. I don't care to use 18.10, but not sure that it could help. must be somehow to actually load the driver after boot (modprobe or whatever)
    • tatsu
      tatsu about 5 years
      actually you'd be very much surprized. ubuntu 18.10 comes with additional driver and graphics support that ubuntu 18.10 does not have access to. the same that ubuntu 19.04 will ship with. for several people here ubuntu 18.10 did the trick. you may have to also get a later kernel than the one it ships with : sudo add-apt-repository ppa:teejee2008/ppa -y && sudo apt-get update && sudo apt-get install ukuu -y && ukuu and then installing the graphics driver after that. I think it's worth a shot given this is a fresh install and that you have little to loose by reinstalling.
    • Elad Leev
      Elad Leev about 5 years
      Will give it a try tomorrow, thanks! :) Hope it will make it
  • double-beep
    double-beep almost 5 years
    A link to a solution is welcome, but please ensure your answer is useful without it: add context around the link so your fellow users will have some idea what it is and why it’s there, then quote the most relevant part of the page you're linking to in case the target page is unavailable. Answers that are little more than a link may be deleted.
  • Sridhar Jammalamadaka
    Sridhar Jammalamadaka almost 5 years
    Thank you for the feedback. I will update the answer accordingly.