I had the same error on my computer:
Ubuntu 18.04 LTS
RTX 2070
Under Windows 10, no problem.
I finally solve it by forcing PowerMizer setting to Prefer Maximum Performance.
You can add in Startup Application Preferences this command line:
/usr/bin/nvidia-settings -a ‘[gpu:0]/GPUPowerMizerMode=1’