X11 on an optimus system does not run with Nvidia graphics

Dear all,

I am having trouble getting X11 to start with any configuration that involves the nvidia drivers.
I have attached my nvidia-bug-report.log.gz below, hoping that all the necessary system information is included. Note that it lists two Nvidia devices - one internal and one external, although the issue still persists when the external device is removed.
Note that although prime-select query returns nvidia, nvidia-settings returns
ERROR: Unable to load info from any available system

Any help would be appreciated.
Thank you very much.
nvidia-bug-report.log.gz (726.2 KB)