llvmpipe (LLVM 10.0.0, 256 bits) is getting detected instead of NVIDIA

I am using:

Ubuntu 18.04.1

Kernel version: 5.4.0-42-generic

NVIDIA 1660 TI (Lenovo Legion Y545)

I have secure boot disabled, I have reinstalled the nvidia drivers but no help to this problem.

Instead of the NVIDIA drivers showing up, I get llvmpipe (LLVM 10.0.0, 256 bits). I have tried everything and I can't seem to fix it.

lspci -k | grep -EA3 'VGA|3D|Display'

Output:

01:00.0 VGA compatible controller: NVIDIA Corporation TU116M [GeForce GTX 1660 Ti Mobile] (rev a1)
Subsystem: Lenovo Device 3ffc
Kernel modules: nvidiafb, nouveau
01:00.1 Audio device: NVIDIA Corporation TU116 High Definition Audio Controller (rev a1)

Edit

What I did (steps):

  1. sudo apt-get remove --purge '^nvidia-.*' to remove the existing one

  2. Removed all the unnecessary PPA's so when I run sudo apt update it outputs:

    Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]

    Hit:2 http://al.archive.ubuntu.com/ubuntu bionic InRelease

    Hit:3 http://al.archive.ubuntu.com/ubuntu bionic-updates InRelease

    Hit:4 http://al.archive.ubuntu.com/ubuntu bionic-backports InRelease
    Fetched 88,7 kB in 1s (84,9 kB/s)

    ...

  3. I run sudo apt install nvidia-driver-440 and do a reboot after that just like @Pilot6 suggested but I have no result.

Any help would be appreciated.


Okay, then I make an answer. It turns out the nivida-packages (440) was not compatible wiith the kernel from Paket linux-generic-hwe-18.04-edge (5.4:XXx) and blocks dkms itself. Reverting to linux-generic (4.15.xxx) and purging (linux-generic-hwe-18.04-edge) and his dependencies and reinstalling package nvidia-dkms-440 did the trick.