When both iGPU and dGPU are AMD, this causes programs that use ROCm, HIP, etc to prefer iGPU even if it doesn't support them.
Solutions like HIP_VISIBLE_DEVICES env var are brittle and work only on certain apps that respect it.
Disable iGPU on boot.
- Simple script that disables iGPU and removes it.
- Udev rule to trigger the script when iGPU is present.
- Systemd unit to trigger the script when dGPU is available.
Files below are made for AMD Raphael iGPU and AMD RX7090XT PCI IDs.
You can find appropriate PCI IDs:
ls -l /dev/dri/by-path/*
inxi -Gasudo chmod 755 /usr/local/sbin/disable-amd-igpu
sudo systemctl daemon-reload
sudo udevadm control --reload
sudo udevadm trigger --subsystem-match=pci --attr-match=vendor=0x1002