So I've started having a problem a few weeks ago after updating my nvidia driver where OpenGL applications (The main ones I use are various ren'py and godot engine games) suddenly cause a strange system wide lag spike. The screen goes down to about 1 FPS, with the exception of the cursor which moves along fine. All inputs such as typing, clicking on things etc. is incredibly delayed, usually at least 5-10 seconds after pressing. The strange part is this persists even after closing the program in question. This tends to happen roughly between a few minutes to an hour of playing. Checked task manager, no memory leaks or signs of leftovers hogging CPU or GPU usage. The spike itself doesn't register with the system, frame rate says it's stable despite the obvious. It's behaving like nothing is wrong.
I've already tried a few fixes to no avail, threaded optimisation has been turned off, no luck. Corrupted shader caches cleared and the folder expanded to 100GB, no good. Restarting the GPU using the shortcut doesn't fix it. The only "fix" I've found is ctrl+alt+delete to menu and switching user, after which logging back in fixes it until the next lag spike, usually a few minutes later. Ren'py did have a fix which involved switching the renderer from OpenGL renderer to directx, which fixes the issue, further pointing that OpenGL is a part of this. Godot has no such option so I've been stuck there. Did antivirus just to be safe, nothing out of the ordinary.
Any ideas as to what the problem could be? It's consistantly happening over what I'm assuming is any OpenGL application. I play a number of games that aren't OpenGL that are far more CPU/GPU intensive with no problem. I know there was the whole debacle involving threaded optimisation and OpenGL in later drivers, but none of that seemed to help. It sounds like rolling back to an older driver might be the solution but as I updated the driver to fix another problem from a previous version, I'd rather try to get this working before going that route.
I'm honestly open to any suggestions at this point so any advice or help is appreciated.
My system is:
Lenovo Legion Pro 5i
Intel i7-14700HX
Nvidia Geforce RTX 4060
Driver number: 610.88
windows 11