Skip to content

Instantly share code, notes, and snippets.

@aaronpolhamus
Last active April 11, 2019 14:51
Show Gist options
  • Save aaronpolhamus/edfb25c81a4fc80101bf90d69037fd85 to your computer and use it in GitHub Desktop.
Save aaronpolhamus/edfb25c81a4fc80101bf90d69037fd85 to your computer and use it in GitHub Desktop.
# Credits:
# [1] https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html (CUDA)
# [2] https://www.if-not-true-then-false.com/2015/fedora-nvidia-guide/ (Drivers)
yum install nano
# In /etc/sysconfig/selinux update to SELINUX=disabled (takes down firewall and speeds up downloads)
# [1] Install kernel headers
sudo dnf install kernel-devel-$(uname -r) kernel-headers-$(uname -r)
# [2] Change to root user and update system kernel
sudo su
dnf update
reboot
# [2] Download NVIDIA drivers (Note: The installation guide that this references list which drivers the install is tested for. User this set of driers)
chmod +x NVIDIA-Linux-x86_64-418.43.run
sudo su
# [2] Install dependencies
dnf install kernel-devel kernel-headers gcc make dkms acpid libglvnd-glx libglvnd-opengl libglvnd-devel pkgconfig
# [2] Disable nouveau
echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
# [2] Edit GRUB_CMDLINE_LINUX in /etc/sysconfig/grub
nano /etc/sysconfig/grub
GRUB_CMDLINE_LINUX="rd.lvm.lv=fedora/swap rd.lvm.lv=fedora/root rhgb quiet rd.driver.blacklist=nouveau"
# [2] Update grub2 conf
grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cf
# [2] Remove xorg-x11-drv-nouveau
dnf remove xorg-x11-drv-nouveau
# [2] Generate initramfs
# backup old image
mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img
# create new image
dracut /boot/initramfs-$(uname -r).img $(uname -r)
# [2] Reboot in runlevel 3 (IMPORTANT: keep a copy of the this guide printed or on a different machine)
systemctl set-default multi-user.target
reboot
# [2] Run driver install runfile
sudo su
./NVIDIA-Linux-x86_64-415.27.run
# "Yes" to register the kernel module sources
# "Yes" to 32-bit compatibility
# "Yes" to NVIDIA xconfig post-install
# [2] reboot back into your desktop
systemctl set-default graphical.target
reboot
sudo su
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment