Question: So as the title says, everytime I wake my laptop up from a suspend, CUDA breaks, just plain doesn't work. I have to reboot my system in order to get it back. So to get it back after a suspend I have to run 'sudo rmmod nvidia\_uvm' and then 'sudo modprobe nvidia\_uvm' and of course that works, but as you'd imagine that gets old real quick. So how do I get it back permanently? If it makes any difference, I have a PRIME laptop with my Nvidia GPU always selected (940MX) with the 440 drivers.

Answer: 
It looks like the `nvidia_uvm` module is not working well with suspending. CUDA can be used again if the module is reloaded:

```bsh
sudo rmmod nvidia_uvm
sudo modprobe nvidia_uvm

```

Unfortunately this does not work when there are CUDA applications active.

I have filed a bug report: <https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-460/+bug/1921477>
I had the same problem on ubuntu. Recently switched to Archlinux. Followed this [tip](https://wiki.archlinux.org/index.php/NVIDIA/Tips_and_tricks#Preserve_video_memory_after_suspend) on the wiki and it has fixed this problem on my gtx1650 laptop.

This way one can activate a new power management tool. See [nvidia documentation](http://download.nvidia.com/XFree86/Linux-x86_64/435.17/README/powermanagement.html).

My steps:

1. Create `/etc/modprobe.d/nvidia-power-management.conf` with `options nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=/tmp`.
2. Update `initramfs`. On ubuntu that is via `update-initramfs -u`
3. `systemctl enable nvidia-suspend.service`. I think you have to manualy install the systemd service files first on Ubuntu. See this [post](https://askubuntu.com/a/1289842/235372)
4. Reboot