Created
August 12, 2020 18:37
-
-
Save ncdulo/59a55b0c54b2b81cb053366bc3110c7c to your computer and use it in GitHub Desktop.
Automate reloading of nvidia-drivers on Gentoo so that a reboot after updating is not required. Simple convenience script to turn a small handful of commands into a single command.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Convenience script for the times when 'nvidia-drivers' updates | |
# and I don't feel like rebooting. This script is intended to be run | |
# from a TTY as it will bring down Xorg and reload the nvidia drivers | |
# | |
# There is no error checking for now. Just bang out commands so I don't | |
# have to. | |
# | |
# Mar 08, 2020 - ncdulo | |
# Goodnight, Xorg | |
sudo /etc/init.d/xdm stop | |
# Remove old drivers from running kernel | |
sudo rmmod nvidia_drm nvidia_modeset nvidia | |
# Insert updated drivers (Does this need to be on multiple lines?) | |
# I think we only need to modprobe nvidia_drm and the rest will pull | |
# in automatically. Test this, someday. | |
sudo modprobe nvidia_drm | |
sudo modprobe nvidia_modeset | |
sudo modprobe nvidia | |
# Welcome back! | |
sudo /etc/init.d/xdm start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment