CUDA fails to reinitialize after system suspend

I found a solution here: nvidia - How do I fix CUDA breaking after suspend? - Ask Ubuntu

As far as I understand, it changes the way that suspend/resume stores the GPU’s memory.