Configure Nvidia graphics card on ubuntu18.04 xrandr Failed to get size of gamma for output default

Initial problem: when I used teamViewer to connect uBuntu18.04, I immediately lost the display window. At first, I thought that it might be the resolution, so I looked up the resolution of Ubuntu18.04. The result showed that there was only a default 800×600, xrandr Failed to get size of Gamma for output default for a long time
Ubuntu18.04 for Nvidia graphics card configuration
Solve ubuntu18.04 installation of nvidia driver that nvidia-dkms dependent cannot be installed (complete picture matching)

Read More: