PRIME setup with multihead

Is there any way to use the nvidia-prime package on arch to create a multihead setup with two graphics cards outputting to 1 monitor each on the same X server? I had such a setup using nouveau drivers and PRIME, but for my work I need to use the CUDA drivers which are obviously not compatible with nouveau.

The way that nvidia-prime works assumes that the primary graphics card is the only one connected to the monitor, so the nvidia screen does not have any outputs of its own. Does anybody have any ideas?

There’s no such limitation, it should just work with a normal PRIME output setup.
-but-
this does not work when both are nvidia gpus because the proprietary driver does not implement the output sink feature.

With a normal PRIME set up xrandr will not detect both the providers. I can get it to see one or the other but never both. My suspicion is that it is something to do with my xorg.conf but I don’t know exactly what to change.

See this for a prime xorg.conf:
https://forums.developer.nvidia.com/t/official-driver-384-59-with-geforce-1050m-doesnt-work-on-opensuse-tumbleweed-kde/52620/2?u=generix
If that doesn’t help, please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post. You will have to rename the file ending to something else since the forum software doesn’t accept .gz files (nifty!).