Errors compiling nvidia proprietary drivers

Hi, I’m trying to install the proprietary drivers from Nvidia through the so-called hard way, but I failed so far.

First, I can not install the package libglvnd-devel, which seems to be part of the procedure. This package just doesn’t exist in my repos. Whatever, I continue and then I boot in text mode. [Side question, is there a way less convoluted to do this than editing the target of systemd and rebooting?] When I run the script, I get some errors (I attach the log file below). I do not see anything obvious, such as package missing or similar. Any idea on how to debug this issue?

Link to the log file.

Thanks!

This only exists in Tumbleweed. (and in future Leap versions starting with 15.0)

On 42.3, you need to uninstall the package drm-kmp-default, which contains updated video kernel modules (backported from kernel 4.9) that break nvidia’s compilation.

As mentioned here:
https://en.opensuse.org/SDB:NVIDIA_the_hard_way

Btw, why are you not just installing the rpm packages? (the easy way)
Would save you much trouble…

Side question, is there a way less convoluted to do this than editing the target of systemd and rebooting?

Press ‘e’ at the boot menu and append 3 to the line starting with “linux” (or “linuxefi”).

PS: Seems you are using Kernel 4.14.3?
The nvidia driver you try to install apparently doesn’t support that kernel though, judging from the compiler errors.

Why not use the standard kernel?
Especially when you want to install the nvidia driver…

And this would confirm it:
https://github.com/NixOS/nixpkgs/issues/32330

If you want to stick with kernel 4.14.3, you should rather try to install the latest nvidia driver version, which is either 384.98 (for the long-lived branch, I don’t know whether that one would work with this kernel though) or 387.34 (short-lived branch).

PPS: It seems you need this patch, for 384.98 at least:
https://build.opensuse.org/package/view_file/X11:Drivers:Video/nvidia-gfxG04/delete_read_kernel.patch?expand=1
(that’s part of the rpm package)

Nvidia 387.34 and Kernel 4.14 are working here without patching:

nvidia-settings -v

nvidia-settings:  version 387.34  (buildmeister@swio-display-x64-rhel04-15)  Tue Nov 21 03:30:38 PST
2017
  The NVIDIA X Server Settings tool.

  This program is used to configure the NVIDIA Linux graphics driver.
  For more detail, please see the nvidia-settings(1) man page.

uname -a
Linux linux64 4.14.8-2.g3f42b52-default #1 SMP PREEMPT Thu Dec 21 10:54:37 UTC 2017 (3f42b52) x86_64 x86_64 x86_64 GNU/Linux

Hi, fast answer from my phone. I’m using a non-standard kernel because I have to for other hardware issues. I have a recent laptop and it’s giving me many headaches. The card is a GeForce 1050Ti, so I though the packed drivers are not suitable in this case. I had to blacklist Nouveau to have an usable system, by the way…

To answer your comment, I do not have the drm… package you mentioned, but I have something related to kmp related to virtualbox. Anyway that doesn’t seem to be the primary reason for the problem.

First I tried using the nvidia repos, but it has broken the X’s. After installing some packages, the system does not boot any graphical system. To fix it, I tried to deinstall everything related to nvidia, but I can not get it back to work as before installing the drivers. The screen is just blank without further messages. I have tried to compile again the drivers the hard way, this time with the --no-drm option and it does compile and install it. But after an optimistic reboot, the system is again not able to start the X’s, although the nvidia driver seems now to be loaded.

Some ideas to debug this lack of graphical system before I give up and reinstall from scratch?

If you installed the nvidia rpm packages before, drm-kmp-default will already have been uninstalled automatically.
And no, the virtualbox kmp package does not cause a problem for the nvidia installation.

Some ideas to debug this lack of graphical system before I give up and reinstall from scratch?

Well, I also suggested using the latest nvidia driver, or patch it to build with kernel 4.14.

I have no idea whether it will work if you build it with --no-drm though.

Also, you probably need to run mkinitrd to rebuild the initrd (or try to disable plymouth with the “plymouth.enable=0” kernel option), plymouth loads the graphics driver very early on boot and that can lead to problems if it is not the “right” one (and it might load nouveau if the blacklist is not in the initrd as well).

Adding “nomodeset” to the kernel options should make even more sure

Otherwise, please post /var/log/Xorg.0.log that should show what’s going wrong (if X fails to start).

FYI, the recently released latest long-term branch version 384.111 should compile fine with the latest 4.14.x (i.e. 4.14.9 or higher) kernel versions as well, without having to patch it.

Thanks for the hint. I tried several things, but I eventually gave up and switched to Tumbleweed. The old kernel in 42.3 was giving me too many headaches. Now almost all works better, but I’m still struggling with the Nvidia drivers. But that is matter of other post.

Ok, but compiling the driver is not much different on Leap or Tumbleweed.
Actually you will have the same problems on Tumbleweed as you had on Leap with the 4.14.3 kernel, as Tumbleweed has an even newer kernel.

The latest nvidia versions should compile fine though as mentioned.

OTOH, you can also use the nvidia rpms from the repo, which is available for Tumbleweed as well for some time.
The repo URL (for Tumbleweed) is:
http://download.nvidia.com/opensuse/tumbleweed/