diff options
author | faaris | 2022-05-29 20:10:33 +0100 |
---|---|---|
committer | faaris | 2022-05-29 20:10:33 +0100 |
commit | d5e92d9bb1911943ae6d91ca60c63f30367ad4e5 (patch) | |
tree | 79e337718f9f6d8807483f99c6b7e73733a15800 | |
download | aur-d5e92d9bb1911943ae6d91ca60c63f30367ad4e5.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 14 | ||||
-rw-r--r-- | notes.install | 11 | ||||
-rw-r--r-- | nvidia-modprobe.service | 10 |
4 files changed, 45 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..3dec826f67b4 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,10 @@ +pkgbase = nvidia-modprobe-service + pkgdesc = Fixes /oldroot unmount issues by unloading nvidia modules before shutdown / reboot. + pkgver = 1 + pkgrel = 1 + install = notes.install + arch = any + license = GPL + depends = systemd + +pkgname = nvidia-modprobe-service diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..138f015d182c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,14 @@ +# Maintainer: Fazzi <faarisansari@googlemail.com> + +pkgname=nvidia-modprobe-service +pkgver=1 +pkgrel=1 +pkgdesc="Fixes /oldroot unmount issues by unloading nvidia modules before shutdown / reboot." +arch=('any') +license=('GPL') +depends=('systemd') +install="notes.install" + +package() { + install -Dm644 "nvidia-modprobe.service" "$pkgdir/usr/lib/systemd/system/nvidia-modprobe.service" +} diff --git a/notes.install b/notes.install new file mode 100644 index 000000000000..16c8ec48cbdc --- /dev/null +++ b/notes.install @@ -0,0 +1,11 @@ +BOLD='\033[1m' +GREEN='\033[32m' +RESET='\033[0m' + +post_install() { + echo + echo -e "${BOLD}Successfully installed nvidia-modprobe.service!${RESET}" + echo "You should enable the service and reboot once for the service to work:" + echo -e ${GREEN}sudo systemctl enable nvidia-modprobe.service${RESET}" + echo +} diff --git a/nvidia-modprobe.service b/nvidia-modprobe.service new file mode 100644 index 000000000000..31fc594dbe5a --- /dev/null +++ b/nvidia-modprobe.service @@ -0,0 +1,10 @@ +[Unit] +Description=Unload Nvidia modules before shutdown/reboot. + +[Service] +Type=oneshot +RemainAfterExit=true +ExecStop=/usr/bin/modprobe -r nvidia_drm nvidia_modeset nvidia_uvm && /usr/bin/modprobe -r nvidia + +[Install] +WantedBy=multi-user.target |