Nvidia kernel issue

I’m having a consistent problem where after some period of inactivity (sometimes just long enough for the screen to go black, sometimes hours), the nvidia drivers appear to have a problem and then cause Gnome / X to restart, killing all graphical applications, and pretty much ruining my day.

For a while I could prevent this from happening by disabling autoupdate. However, now even that doesn’t keep my system stable.

I’m sure I don’t have to say how frustrating this is. Almost as frustrating as running the noveau driver, so I switch back and forth depending on how much risk I’m willing to take.

In looking at journalctl I’m seeing the following line right before the trouble:
nvidia-modeset: ERROR: GPU:0: Failed to allocate memory for composition pipeline

I installed the nvidia drivers using the scripts linked to here:

I generally have no problem running the scripts to install or uninstall the drivers, and while using the machine, I don’t experience issues. Its only when I step away. Sometimes it can be days in between when it happens, and sometimes its under an hour.

And help in further debugging and resolving this would be greatly appreciated.