After suspend CUDA is not working any more
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nvidia-graphics-drivers-460 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
After suspend the CUDA library can not get a connection to the GPU any more.
There is following workaround possible:
sudo rmmod nvidia_uvm
sudo modprobe nvidia_uvm
This could be automated in an event script however it is not helping if there are applications running already which depend on CUDA connection. The module will be refused to unload due to its usage then.
System environment:
Description: Ubuntu 20.04.2 LTS
Release: 20.04
+------
| NVIDIA-SMI 460.32.03 Driver Version: 460.32.03 CUDA Version: 11.2 |
|------
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|======
| 0 GeForce GTX 1650 On | 00000000:01:00.0 Off | N/A |
| N/A 53C P5 9W / N/A | 2015MiB / 3911MiB | 5% Default |
| | | N/A |
+------
+------
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|======
| 0 N/A N/A 2924 G /usr/lib/xorg/Xorg 768MiB |
| 0 N/A N/A 5018 G xfwm4 2MiB |
| 0 N/A N/A 8227 G /opt/idea/
| 0 N/A N/A 255790 G ...AAAAAAAAA= --shared-files 66MiB |
| 0 N/A N/A 267569 C+G ....jdks/
+------
It looks like following is working also. Create a file /etc/modules- load.d/ nvidia. conf with contents below and restart.
options nvidia NVreg_PreserveV ideoMemoryAlloc ations= 1 FilePath= /run
options nvidia NVreg_Temporary