It looks like following is working also. Create a file /etc/modules- load.d/nvidia.conf with contents below and restart.
options nvidia NVreg_PreserveVideoMemoryAllocations=1 options nvidia NVreg_TemporaryFilePath=/run -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to nvidia-graphics-drivers-460 in Ubuntu. https://bugs.launchpad.net/bugs/1921477 Title: After suspend CUDA is not working any more Status in nvidia-graphics-drivers-460 package in Ubuntu: New 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/jbr/bin/java 2MiB | | 0 N/A N/A 255790 G ...AAAAAAAAA= --shared-files 66MiB | | 0 N/A N/A 267569 C+G ....jdks/openjdk-15/bin/java 1168MiB | +-----------------------------------------------------------------------------+ To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-460/+bug/1921477/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp