a.) working but not recommended solution
I managed to install the drivers manually following this guide:
The problem with this approach, that (according to some forums and my experience) the nvidia driver overrides some other libs as well, and a
dnf update can override those libs, which will result a VERY unstable system. Not to mention that accidentally installing nvidia drivers from RPM fusion will totally kill the system beyond repair. (I did not manage to boot in that case, not even in text mode.)
So this approach works only if you don't plan to update the system, or you are very careful about what you update.
b.) recommended solution
I managed to install the driver from RPM fusion.
First you need to register the free and non-free repos. http://rpmfusion.org/Configuration
By the driver installation the first 6 try did not work by me, I got an error message "something went wrong" and a button with "logout" label after the reboot. No need to worry in that case, it is easy to uninstall the package with
dnf remove akmod-nvidia. After that a reboot restores the system to the nouveau driver, which freezes, but works for 1-30 mins per session.
Be aware that not always
akmod-nvidia is the good driver for your card. In my case I needed
akmod-nvidia-340xx. You can find which driver you need here: ftp://download.nvidia.com/XFree86/Linux-x86_64/352.63/README/supportedchips.html
My install script was:
dnf install akmod-nvidia-340xx.x86_64 kernel-devel gcc gcc-c++ vdpauinfo
libva-vdpau-driver libva-utils xorg-x11-drv-nvidia-340xx-libs.i686
dracut -f /boot/initramfs-$(uname -r).img $(uname -r)
I am not sure why this worked. I mean I tried something similar 6 times, but it did work only for the 7th try. I consulted with the RPM fusion guys, maybe they fixed the repo meanwhile, or I did something better which I am not aware of.
According to some forums you need the 32 bit binaries of the
xorg-x11-drv-nvidia-libs and other libs, because Gnome 3 depends on them. I am not certain about that, but it worked to me.
I installed other 32 bit binaries after I verified that this driver install works:
sudo dnf -y install \
These can come handy if you want to run 32 bit applications, for example old games. https://gist.github.com/tomekwi/0e0eff870cf9b689379d
My first install was for Geforce GT 240. Now I changed video card to Geforce GTX 750 Ti. Before changing the video card I removed the driver of the old card with
dnf remove akmod-nvidia-340xx xorg-x11-drv-nvidia-340xx-libs.i686 and installed the new driver with
dnf install akmod-nvidia xorg-x11-drv-nvidia-libs.i686. After that I turned off the computer, changed the card and restarted the system. Everything is working fine since then.