Skip to content

Instantly share code, notes, and snippets.

@gvsem
Created June 11, 2023 19:14
Show Gist options
  • Save gvsem/86a6708c29657f9eaaad62a30ac874fc to your computer and use it in GitHub Desktop.
Save gvsem/86a6708c29657f9eaaad62a30ac874fc to your computer and use it in GitHub Desktop.
Nvidia and Git for Vitya
#!/bin/sh
# source: https://phoenixnap.com/kb/fedora-nvidia-drivers
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm -y
sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm -y
sudo dnf update --refresh
sudo dnf update -x kernel-* -y
/sbin/lspci | grep -e VGA
echo "If you have two cards, you will probably need to do something with Optimus by yourself"
read -p "We will now install nvidia drivers for 2014+ year. Is your card ok? [y/N]" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
sudo dnf install akmod-nvidia -y
sudo dnf install xorg-x11-drv-nvidia-cuda -y
#sudo mokutil --import /etc/pki/akmods/certs/public_key.der
#read -p "Are you ready to reboot now to sign kernel modules? [y/N]" -n 1 -r
#echo
#if [[ $REPLY =~ ^[Yy]$ ]]
#then
# sudo reboot
#fi
else
# exit 0
fi
xdg-open "https://extensions.gnome.org/extension/5009/gpu-profile-selector/"
xdg-open "https://extensions.gnome.org/extension/1460/vitals/"
glxinfo | egrep "OpenGL vendor|OpenGL renderer"
sudo dnf install nvidia-vaapi-driver libva-utils vdpauinfo
nvidia-smi
ssh-keygen -t ed25519 -C "[email protected]"
# /home/L/.ssh/
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_github
git config --global user.email "[email protected]"
git config --global user.name "L"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment