Set performance level of RTX card on Linux with integrated graphics

I have an RTX 2070 and integrated AMD graphics. My monitor is connected to the AMD integrated graphics and RTX 2070 has no display connected to it. I am running Ubuntu 20.04.

When I run nvidia-smi I see that the performance level is P8. I would like to change it to P0.

±----------------------------------------------------------------------------+
| NVIDIA-SMI 450.80.02 Driver Version: 450.80.02 CUDA Version: 11.0 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 GeForce RTX 2070 On | 00000000:10:00.0 Off | N/A |
| 0% 32C P8 24W / 210W | 11MiB / 7982MiB | 0% Default |
| | | N/A |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 5956 G /usr/lib/xorg/Xorg 4MiB |
| 0 N/A N/A 6367 G /usr/lib/xorg/Xorg 4MiB |
±----------------------------------------------------------------------------+

I am attempting to change the performance level with the following command

nvidia-settings -a [gpu:0]/GpuPowerMizerMode=1

ERROR: Error resolving target specification ‘gpu:0’ (No targets match target specification), specified in assignment
‘[gpu:0]/GpuPowerMizerMode=1’.

I have confirmed that the issue is the lack of a monitor connected to the GPU. When I reboot with a monitor connected then I can run that nvidia-settings without an error and confirm that the performance level is changed to P0.

I have attempted to use nvidia-xconfig to create an xorg.conf, but the X11 system does not start after doing that. Not sure what do to try next.