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 ctrl+alt+f2
and 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 update
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)
reboot
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.
notes:
I installed other 32 bit binaries after I verified that this driver install works:
sudo dnf -y install \
alsa-lib.i686 \
alsa-plugins-oss.i686 \
alsa-plugins-pulseaudio.i686 \
alsa-plugins-pulseaudio.i686 \
arts.i686 \
audiofile.i686 \
bzip2-libs.i686 \
cairo.i686 \
cdk.i686 \
compat-expat1.i686 \
compat-libstdc++-33.i686 \
cyrus-sasl-lib.i686 \
dbus-libs.i686 \
esound-libs.i686 \
fltk.i686 \
freeglut.i686 \
glibc.i686 \
gtk2.i686 \
imlib.i686 \
lcms-libs.i686 \
lesstif.i686 \
libacl.i686 \
libao.i686 \
libattr.i686 \
libcap.i686 \
libdrm.i686 \
libexif.i686 \
libgnomecanvas.i686 \
libICE.i686 \
libieee1284.i686 \
libsigc++20.i686 \
libSM.i686 \
libtool-ltdl.i686 \
libusb.i686 \
libwmf-lite.i686 \
libwmf.i686 \
libX11.i686 \
libXau.i686 \
libXaw.i686 \
libXcomposite.i686 \
libXdamage.i686 \
libXdmcp.i686 \
libXext.i686 \
libXfixes.i686 \
libxkbfile.i686 \
libxml2.i686 \
libXmu.i686 \
libXp.i686 \
libXpm.i686 \
libXScrnSaver.i686 \
libXScrnSaver.i686 \
libxslt.i686 \
libXt.i686 \
libXtst.i686 \
libXv.i686 \
libXv.i686 \
libXxf86vm.i686 \
lzo.i686 \
mesa-libGL.i686 \
mesa-libGLU.i686 \
nas-libs.i686 \
nspluginwrapper.i686 \
openal-soft.i686 \
openldap.i686 \
pam.i686 \
popt.i686 \
pulseaudio-libs-glib2.i686 \
pulseaudio-libs.i686 \
pulseaudio-libs.i686 \
qt-x11.i686 \
qt.i686 \
redhat-lsb.i686 \
sane-backends-libs.i686 \
SDL.i686 \
svgalib.i686 \
unixODBC.i686 \
zlib.i686
These can come handy if you want to run 32 bit applications, for example old games. https://gist.github.com/tomekwi/0e0eff870cf9b689379d
Update:
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.