Ubuntu 18.04 can't load driver

Hi!

I have a laptop with intel and nvidia video cards. I use Ubuntu 18.04. I’ve tried to select different versions of drivers (440, 435, 390) using default method - via software & updates. But no luck, and I still can’t see nvidia driver used. I check it with nvidia-detector and with lshw -c video. I tried to install driver manually, and in that case I saw “driver:nvidia” in lshw output, but in this case X server wasn’t starting.

I’ve checked, that secure boot is disabled, nouveau driver is blacklisted, I’ve tried to purge all nvidia packages several timesnvidia-bug-report.log (577.0 KB) .

Could you please help me find the reason, why drivers are not loaded/seen by system? Thanks in advance.

Looks like you set your system compiler to clang/llvm but you’ll have to set it to gcc since the kernel was compiled with it.
Use
cc -v
to check.
https://askubuntu.com/questions/1198087/how-to-set-clang-9-as-the-default-c-compiler-on-ubuntu-19-10

Thanks for an answer, but no success. I changed compiler to gcc, purged all nvidia packages and installed them via software & updates again, rebooting between steps. Still no driver. nvidia-bug-report.log (1.1 MB)

The driver is installed now but doesn’t load.
Please follow this:

  • delete /etc/X11/xorg.conf
  • 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
    If this doesn’t resolve the issue, please create a new nvidia-bug-report.log.

Thanks a lot! That helped.