Issue where nvidia-smi and nvidia-settings select different gpu as gpu0

I have two identical GPUs. When using nvidia-smi the one on the Bus 23 is selected as GPU0. When using nvidia-settings the one on the bus 101 is selected as GPU0. Because of this I’m unable to launch any game using proton. They try to use the GPU on the Bus 23, but since it is not connected to any display, the game crashes.

Any idea how I can solve this issue?

Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.