Skip to content

Commit

Permalink
Merge pull request #98 from bubbleguuum/master
Browse files Browse the repository at this point in the history
fixed nvidia-powerd service preventing unloading of nvidia modules
  • Loading branch information
sndirsch authored Jul 11, 2024
2 parents 664b8a1 + 4622f55 commit 2a131c1
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions prime-select.sh
Original file line number Diff line number Diff line change
Expand Up @@ -374,11 +374,14 @@ function common_set {
fi
else
# https://github.com/Bumblebee-Project/bbswitch/issues/173#issuecomment-703162468
# ensure nvidia-persistenced service is not running
if systemctl is-active --quiet nvidia-persistenced.service; then
systemctl stop nvidia-persistenced.service
systemctl disable nvidia-persistenced.service
fi
# ensure nvidia-persistenced and nvidia-powerd services are disabled and not running
# as they prevent unloading of NVIDIA modules
for name in persistenced powerd
do
if systemctl is-active --quiet nvidia-${name}.service; then
systemctl disable --now nvidia-powerd.service
fi
done
# kill all nvidia related process to fix failure to unload nvidia modules (issue#50)
nvidia_process=$(lsof -t /dev/nvidia* 2> /dev/null)
if [ -n "$nvidia_process" ]; then
Expand Down

0 comments on commit 2a131c1

Please sign in to comment.