FS#42694 - [python-pycuda] nvidia module failed to unload after running pycuda using optirun
Attached to Project:
Community Packages
Opened by Thomas King (thomasking0529) - Thursday, 06 November 2014, 06:05 GMT
Last edited by Giancarlo Razzolini (grazzolini) - Friday, 06 December 2019, 12:39 GMT
Opened by Thomas King (thomasking0529) - Thursday, 06 November 2014, 06:05 GMT
Last edited by Giancarlo Razzolini (grazzolini) - Friday, 06 December 2019, 12:39 GMT
|
Details
Description:
after optirun, the nvidia module was not unloaded and bbswitch cannot turn off the discrete card, cause nvidia_uvm still using nvidia module Additional info: Steps to reproduce: |
This task depends upon
Closed by Giancarlo Razzolini (grazzolini)
Friday, 06 December 2019, 12:39 GMT
Reason for closing: Deferred
Friday, 06 December 2019, 12:39 GMT
Reason for closing: Deferred
When you say "optirun blaa" what optirun does is to switch on the gpu and insert the nvidia module. When the program finishes, it removes the nvidia module and turns off the GPU.
On newer cuda, when running a cuda application, the nvidia module requests that the nvidia_uvm module is loaded as well, as it is needed by the cuda runtime. Bumblebee doesn't know about this module and tries to remove nvidia, but nvidia_uvm depends on nvidia so it can't remove the module and can't turn off the GPU.
Solution:
manually:
modprobe -r nvidia_uvm
modprobe -r nvidia
tee /proc/acpi/bbswitch <<< OFF
Should this be a bug?
If anything you could talk to the Bumblebee developers to check for nvidia_uvm before trying to remove the nvidia module and shutdown the GPU.
p.s. thomasking0529 is my old account