Xorg VRAM Bug with External Monitors Connected to Laptop with Internal Display Disabled
TLDR: having two external monitors connected and having the laptop lid closed (internal display disabled) makes Xorg VRAM usage go full ape with proprietary drivers (470/495) on GTX 1650 mobile, fresh OS install.
I was redirected here from the NVIDIA forums because it is likely an Xorg bug. I included the main text here; please visit the link for more specific details:
"I’ve done several fresh installs of Ubuntu (20.04 LTS, 21.04, 21.10) on multiple machines of the same model: a Dell XPS 15 7590 with a GTX 1650 mobile.
After installing the OS, I install the proprietary NVIDIA drivers via the official Ubuntu software install mechanism. I’ve confirmed this issue on driver versions 470 and 495, but from memory I’ve seen this happen with more versions.
As I’m typing this, I have driver version 495.44.
I’ve got two identical 4k monitors which I connect to my laptop via DisplayPort. After installing the drivers and verifying that everything works properly, I keep the lid closed (thus disabling the internal monitor) and simply leave my laptop docked, utilising only my two external monitors. Things go well with the dual monitor setup until I reboot the machine: VRAM usage goes sky high filling up the whole card (3-4 GB out of 4 GB) which happens like clockwork on every install. The desktop is unusable at that point and I’m forced to remove the proprietary drivers, leaving me with significantly worse performance."
I’ve included a screenshot of nvidia-smi and of the GNOME settings.