Yes, that is the problem. You basically confirmed that it is just a GUI issue. The CUDA install on command line should not be an issue, but this probably also updated something in the Xorg driver or the NVIDIA driver which plugs in to the Xorg driver. There is a strong dependency for the ABI version in both Xorg and the modules which plug in to Xorg (the NVIDIA driver is a plug-in to the Xorg software). If one of them changed, or if the wrong one was linked in, then this would cause what you see.
It used to be that there was a specific GL/GLES related library from Xorg which was replaced by the NVIDIA version, and that the replacement got overwritten during updates with the Xorg version. Since going to the dpkg system I no longer know which files should be where, but if someone knows, then a fix might be as simple as copying a single file from the NVIDIA content into the Xorg content. I won’t be able to answer that for the newer releases.