How to fix Ubuntu VM "Failed to allocate software rendering cache surface: out of memory" after nvidia driver updated?

To use CUDA, I updated NVIDIA driver for my Ubuntu 16.04. After this update, I can get the driver work well with boot directly with SSD hard drive. But if load the same linux kenel with the same hard driver with Virtual machine, I got the issue as “Failed to allocate software rendering cache surface: out of memory”.
Detail as:


16.330] (II) NVIDIA: Using 24576.00 MB of virtual memory for indirect memory
[ 16.330] (II) NVIDIA: access.

[ 16.395] (EE) NVIDIA(0): Failed to allocate software rendering cache surface: out of
[ 16.395] (EE) NVIDIA(0): memory.
[ 16.395] (EE) NVIDIA(0): *** Aborting ***
[ 16.412] (EE)
Fatal server error:
[ 16.412] (EE) NVIDIA: A GPU exception occurred during X server initialization
[ 16.412] (EE)
[ 16.412] (EE)

With the same target board (all HW is same), I can get the nvidia driver work file like below:

  8.118] (II) NVIDIA: Using 24576.00 MB of virtual memory for indirect memory

[ 8.118] (II) NVIDIA: access.
[ 8.153] (II) NVIDIA(0): Setting mode “DFP-3:nvidia-auto-select”
[ 8.219] (==) NVIDIA(0): Disabling shared memory pixmaps
[ 8.219] (==) NVIDIA(0): Backing store enabled
[ 8.219] (==) NVIDIA(0): Silken mouse enabled
[ 8.220] (==) NVIDIA(0): DPMS enabled
[ 8.220] (II) Loading sub module “dri2”
[ 8.220] (II) LoadModule: “dri2”
[ 8.220] (II) Module “dri2” already built-in
[ 8.220] (II) NVIDIA(0): [DRI2] Setup complete
[ 8.220] (II) NVIDIA(0): [DRI2] VDPAU driver: nvidia

Anyone of you can provide any idea to fix this nvidia driver loading issue for Virtual Machine starting Ubuntu linux? Thank you so much.

Does that help:
https://www.astroarch.com/2019/01/nvidia-failed-to-allocate-software-rendering-cache-surface/

I have tried this and also this post’s link from Redhat but no help. Thank you generix.