Description: switch from "rmmod" to "modprobe -r" With the introduction of nvidia-uvm module, unloading nvidia module will fail unless nvidia-uvm is unloaded. GH-565 suggests using "remove" or "softdep" modprobe.d clauses to teach modprobe to handle that for us; "rmmod" does not have that functionality, so switch to "modprobe -r". Origin: upstream, https://github.com/Bumblebee-Project/Bumblebee/commit/1ada79fe5916961fc4e4917f8c63bb184908d986 Applied-Upstream: commit:1ada79fe5916961fc4e4917f8c63bb184908d986 Bug: https://github.com/Bumblebee-Project/Bumblebee/issues/565 Bug-Debian: https://bugs.debian.org/793389 --- a/src/module.c +++ b/src/module.c @@ -96,7 +96,8 @@ int module_unload(char *driver) { int retries = 30; bb_log(LOG_INFO, "Unloading %s driver\n", driver); char *mod_argv[] = { - "rmmod", + "modprobe", + "-r", driver, NULL };