Ask Your Question

Fedora 29: Nvidia driver broken with 4.20 kernel

asked 2019-03-21 03:49:28 -0500

eeijlar gravatar image

Since updating to the 4.20 kernel the nvidia driver appears to be broken - compiler error. I have the NVS 300 nvidia card with the 340.107 driver.

I did a 'dnf update' and now all kernels 4.20 and older are broken. At the point where it should display the login screen I get the 'Oops something went wrong...' dialog.

I guess I have to revert to nouveau driver?

Is there a way to prevent 'dnf update' from going past a particular kernel version?

The last version of the 340.107 driver is July 2018. Is Nvidia likely to release a patch for this, or am I am stuck at a pre-4.20 kernel?

edit retag flag offensive close merge delete



How did you install nvidia driver? I'm asking because there are several different ways to achieve this.

Observation: as far as I understand, if you're seeing 'Oops something went wrong...' dialog, then you have graphics of some sort. Either your computer reverted to nouveau on it's own (since it couldn't use nvidia driver modules), or modules for 4.20 did compile. Can you verify, which way it actually is? When I had problems compiling nvidia kernel modules, I ended up with black text screen and no graphics at all.

Night Romantic gravatar imageNight Romantic ( 2019-03-21 07:23:15 -0500 )edit

Just a bit of additional information, that might be helpful: I use nvidia driver 390 with old nvidia gpu on my work pc (with 4.20 kernel) without major problem, and I use newer nvidia gpu with nouveau driver on my home pc (there were some quirks with nouveau and 4.19 kernel recently, as I wrote in the comment to your other question, but with 4.20 it's all right again).

Night Romantic gravatar imageNight Romantic ( 2019-03-21 07:31:26 -0500 )edit

Thanks @Night Romantic. I followed this guide initially:

That all worked fine, but kernel updates send it into a bit of a tail spin.

eeijlar gravatar imageeeijlar ( 2019-03-21 15:28:38 -0500 )edit

Have you tried RPMfusion's driver?

Benjamin Doron gravatar imageBenjamin Doron ( 2019-03-21 19:10:25 -0500 )edit

I got it working again by reinstalling the generic driver from (using 4.20 kernel). I must revisit the rpmfusion driver again, it didn't work the last time I tried it. I think what's supposed to happen is that it rebuilds the driver with each new kernel version but it failed on the 4.20 kernel.

eeijlar gravatar imageeeijlar ( 2019-03-25 16:08:29 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2019-03-22 04:04:28 -0500

Night Romantic gravatar image

updated 2019-03-22 04:13:53 -0500

I would definitely recommend using nvidia drivers packaged for Fedora instead of installing generic one as you did.

Basically you have 2 ways of doing that.

1) Official way - activate pre-installed repository with nvidia drivers (subsection of RPMFusion).

sudo dnf config-manager --set-enabled rpmfusion-nonfree-nvidia-driver
dnf install xorg-x11-drv-nvidia-340xx akmod-nvidia-340xx

2) Enable the whole RPMFusion repo, install from there (as Benjamin Doron suggested).

You should use this how-to with (1) too, it's the same packages, as far as I understand.

You can also find info on the web about negativo's version (and quite a lot of useful info here), but he provides packages only for the latest driver version, which wouldn't support your card.

Also see my answer to this question, I've provided some additional details there as well as link to Fedora magazine article on the subject (though I like RPMFusion's how-to more).

I should say that I experienced transient problems with RPMFusion's drivers (modules wouldn't compile on 4.20 at first), but they were fixed reasonably quickly by maintainers.

If you have additional questions about these packaged drivers -- feel free to ask, I've used them for several years.

edit flag offensive delete link more



And yep, it looks like you're stuck with 340 driver, and I wouldn't count on NVidia patching or updating it. You can use RPMFusion's version while there's some maintainers to patch build scripts, and then it would be simpler just to buy inexpensive card with (much) newer gpu chipset, in my opinion.

Night Romantic gravatar imageNight Romantic ( 2019-03-22 08:35:05 -0500 )edit

At some point when I first set up the system, I tried the rpmfusion driver, and it didn't work. I can't remember what the problem was. It was after trying many different drivers that I arrived on the generic one. The fusion one is worth a try again though.

eeijlar gravatar imageeeijlar ( 2019-03-25 16:05:58 -0500 )edit

@ Night Romantic : I was installing the wrong driver !! :facepalm: I use a very similar desktop at work and it has a NVS 300 card, I assumed the NVS 310 would use the 340.107 driver but it actually uses the 390 driver. I installed the 390 driver using the method you suggested and it works perfectly. It even works on the 5.x kernel :) Thanks again.

eeijlar gravatar imageeeijlar ( 2019-03-27 02:52:54 -0500 )edit

@eeijlar, I'm glad you've got it solved, at least for now. ;-) As I said earlier, I do use quite old GPU at work successfully with 390 driver (and today I updated to 5.x kernel as well). And I had (again, as I said earlier) some problems with updating to 4.20 kernel (modules would not build), but then maintainers updated the package, and it worked again.

And if there will be no one to maintain the package, then we'll be in trouble) Then the only option would be to try to use NVidia's native one.

But until then we both should be ok ))))

Night Romantic gravatar imageNight Romantic ( 2019-03-27 07:55:27 -0500 )edit

answered 2019-03-21 19:14:46 -0500

Benjamin Doron gravatar image

updated 2019-04-10 19:54:12 -0500

If your GPU supports a newer version of the driver, definitely update.

You can hold updates with dnf upgrade --exclude kernel* (the * is possibly optional, as "kernel" is a meta-package). You can also try "exclude=kernel*" in /etc/dnf/dnf.conf.

I doubt that 340 will get an update, but I have no idea.

edit flag offensive delete link more

Question Tools



Asked: 2019-03-21 03:49:28 -0500

Seen: 508 times

Last updated: Apr 10 '19