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
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nvidia-prime (Ubuntu)
Fix Released
Undecided
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.

Revision history for this message
Yuan-Chen Cheng (ycheng-twn) wrote :
Revision history for this message
Yuan-Chen Cheng (ycheng-twn) wrote :
Revision history for this message
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)
Revision history for this message
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.

Revision history for this message
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
Revision history for this message
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
Revision history for this message
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.

Revision history for this message
Alberto Milone (albertomilone) wrote :

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

Revision history for this message
Doug McMahon (mc3man) wrote :
Revision history for this message
Phil Dibowitz (jaymzh) wrote :

The commit referenced here is super useful:

https://code.launchpad.net/~ycheng-twn/junk/+git/nvidia-prime/+ref/ubuntu/devel

However, what made it into Focal is super different - it uses nvidia to drive the display but enables power management via a udev rule. That is *also* useful, but it's not the same at all.

It would be useful to get the feature that was implemented here actually released.

Revision history for this message
Alberto Milone (albertomilone) wrote :

@Phil: there are changes in ubuntu-drivers-common and in nvidia-prime that will make on-demand mode work for you. This work will land soon.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.