Repository: stable-diffusion-webui
Issue: [Bug]: When running on Linux on laptop with both an Nvidia and integrated AMD GPU, I can't get SD to use Nvidia GPU.
Labels: bug-report,platform:amd

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What happened?

When running the command:
`./webui.sh --listen --port 5000 --medvram --no-half --device-id 0` (using --device-id 0 here because there is only one CUDA device):
This runs up until loading a model, at which point it hangs indefinitely, and the NVIDIA GPU is never accessed.
I have tried adding `prime-run` (the command which would typically be used to run some programs on NVIDIA GPU) to the beginning of the command, but as far as I can tell, nothing changes.
When I used CPU only, it ran just fine.

### Steps to reproduce the problem

1. Install SD Web UI on Linux Laptop with two GPU's using given instructions
2. Download Models
3. Try to run using varying different commands


### What should have happened?

When I run the command, I should be able to load the SD model on my NVIDIA GPU instead of the integrated AMD GPU.

### Commit where the problem happens

c12d7ddd725c485682c1caa025627c9ee936d743

### What platforms do you use to access UI ?

Linux

### What browsers do you use to access the UI ?

Mozilla Firefox

### Command Line Arguments

```Shell
./webui.sh --listen --port 5000 --medvram --no-half --device-id 0
```


### Additional information, context and logs

I looked at dmesg to see if NVIDIA GPU was even being accessed:
`7715.405625] audit: type=1104 audit(1674178721.569:149): pid=4150 uid=1000 auid=1000 ses=1 msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
[ 7894.619787] amdgpu: HIQ MQD's queue_doorbell_id0 is not 0, Queue preemption time out
[ 7894.619793] amdgpu: Failed to evict process queues
[ 7894.619795] amdgpu: Failed to quiesce KFD
[ 7894.659328] amdgpu: HIQ MQD's queue_doorbell_id0 is not 0, Queue preemption time out
[ 7894.659331] amdgpu: Resetting wave fronts (cpsch) on dev 00000000d322993a
[ 7894.659337] amdgpu: Didn't find vmid for pasid 0x800a
[ 7902.316836] amdgpu: HIQ MQD's queue_doorbell_id0 is not 0, Queue preemption time out
[ 7902.316846] amdgpu: Failed to evict process queues
[ 7902.316848] amdgpu: Failed to evict queues of pasid 0x800a
[ 8079.187035] amdgpu: HIQ MQD's queue_doorbell_id0 is not 0, Queue preemption time out
[ 8079.187040] amdgpu: Resetting wave fronts (cpsch) on dev 00000000d322993a
[ 8079.187049] amdgpu: Didn't find vmid for pasid 0x800a
[ 8177.501951] amdgpu: HIQ MQD's queue_doorbell_id0 is not 0, Queue preemption time out
[ 8177.501958] amdgpu: Failed to evict process queues
[ 8177.501960] amdgpu: Failed to quiesce KFD
[ 8177.544779] amdgpu: HIQ MQD's queue_doorbell_id0 is not 0, Queue preemption time out
[ 8177.544785] amdgpu: Resetting wave fronts (cpsch) on dev 00000000d322993a
[ 8177.544794] amdgpu: Didn't find vmid for pasid 0x800a
[ 8184.316016] amdgpu: HIQ MQD's queue_doorbell_id0 is not 0, Queue preemption time out
[ 8184.316022] amdgpu: Failed to evict process queues
[ 8184.316023] amdgpu: Failed to evict queues of pasid 0x800a
[ 8243.716307] audit: type=1100 audit(1674179249.881:150): pid=12740 uid=1000 auid=1000 ses=1 msg='op=PAM:authentication grantors=pam_faillock,pam_permit,pam_faillock acct="brendon" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
[ 8243.716847] audit: type=1101 audit(1674179249.884:151): pid=12740 uid=1000 auid=1000 ses=1 msg='op=PAM:accounting grantors=pam_unix,pam_permit,pam_time acct="brendon" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
[ 8243.718506] audit: type=1110 audit(1674179249.884:152): pid=12740 uid=1000 auid=1000 ses=1 msg='op=PAM:setcred grantors=pam_faillock,pam_permit,pam_faillock acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
[ 8243.718879] audit: type=1105 audit(1674179249.884:153): pid=12740 uid=1000 auid=1000 ses=1 msg='op=PAM:session_open grantors=pam_systemd_home,pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=success'
`

I only found references to amdgpu, and none to the Nvidia GPU.

I am using proprietary NVIDIA drivers, version 525.78.01, and CUDA Version 12.0, on Arch Linux.

My Discrete Graphics Card is An NVIDIA GTX 1650 Mobile.