Add a mode that load nvidia.ko only so that we display on intel and do cuda deep learning in NV GPU

Bug #1824282 reported by Yuan-Chen Cheng on 2019-04-11
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nvidia-prime (Ubuntu)
Alberto Milone

Bug Description

Per current NV and intel GPU driver, if we load nvidia.ko only, we can do display on intel GPU and leave the NV to deep learning for a graphic workstation.

I proposed to add a mode might call "intel+nv_cuda" for this mode.

Test procedure:

1. install the new package on a platform with both intel and NV graphic card.
2. $ sudo prime-select intel+nv_cuda; sudo reboot
3. $ nvidia-smi # it will show the nvidia GPU status and we will found that no GUI process use any NV GPU memory.

Yuan-Chen Cheng (ycheng-twn) wrote :
Daniel Dadap (ddadap) wrote :

Would it be possible to change the "intel" profile to no longer alias the nvidia.ko and nvidia-uvm.ko modules to "off"? The blacklisting can remain, and would prevent the modules from being loaded automatically in response to the device being present, but wouldn't prevent them from being explicitly loaded if desired.

Since I imagine the reason for preventing the modules from loading is to allow the NVIDIA GPU to be turned off via ACPI, would it be possible to attempt unloading the modules before attempting to shut off the GPU? If they fail to unload, it's presumably because they're in use, so shutting off the GPU doesn't make sense, anyway. Going the other way, it could also be useful to add a udev rule or some other trigger to turn the GPU back on if it's off and somebody tries to load nvidia.ko.

Changed in nvidia-prime (Ubuntu):
assignee: nobody → Alberto Milone (albertomilone)
Yuan-Chen Cheng (ycheng-twn) wrote :

Per my previous measurement, a machine consumes more power as nvidia.ko is loaded compare the situation that it's not loaded.

I'll try to do that again and provide some data as I got time to that.

Yuan-Chen Cheng (ycheng-twn) wrote :

I also have a patch to add the new mode to nvidia-settings. Will try to upload here when got chance to.

Changed in nvidia-prime (Ubuntu):
status: New → Triaged
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvidia-prime - 0.8.11

nvidia-prime (0.8.11) eoan; urgency=medium

  [ Yuan-Chen Cheng ]
  * prime-select:
    - Add on-demand mode (LP: #1824282).

 -- Alberto Milone <email address hidden> Tue, 09 Jul 2019 17:09:27 +0200

Changed in nvidia-prime (Ubuntu):
status: Triaged → Fix Released
Doug McMahon (mc3man) wrote :

I think this was poorly implemented. If any of the concerned parties wish to discuss here, great. Otherwise I'll file a bug on.

Alberto Milone (albertomilone) wrote :

@Dough: feel free to file a bug report about it.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers