OK I found a solution after some digging and heavy LLM guidance lol. I’ll type it here for posterity in case anyone else is stymied by the same incredibly niche issue, and to avoid a DenverCoder9-style tragedy as depicted in xkcd.
The card was indeed physically dead, and causing huge boot delays and instability.
lspci | grep -i nvidia
The card was listed in PCI bus…
dmesg | grep -i nvidia
…but showed a definitive hardware failure with the following lines:
NVRM: GPU 0000:01:00.0: RmInitAdapter failed! (0x24:0x72:1590)
nvidia 0000:01:00.0: not ready 65535ms after resume; giving up
Failed to enable MSI; request_irq() failed (-22)
VC save buffer size does not match
These indicate initialization failure, unresponsiveness to PCI commands, inability to handle interrupts, broken virtual channel communication. In other words, well and truly toasted.
I initially tried to use driverctl (found in AUR) but the problem was that it ran as a systemd service, which executes after the initramfs has already loaded nvidia (via the kms hook). By that point, nvidia has already claimed the GPU. Blacklisting or uninstalling nvidia stuff won’t be useful here because I want the nvidia eGPU to connect.
I created a script @ /usr/local/bin/vfio-pci-override.sh
#!/bin/sh
DEVS=“0000:01:00.0 0000:01:00.1”
for DEV in $DEVS; do
if [ -e /sys/bus/pci/devices/$DEV ]; then
echo “vfio-pci” > /sys/bus/pci/devices/$DEV/driver_override
fi
done
modprobe -i vfio-pci
Then applied chmod +x to it. Note that 0000.01.00.0 etc may be different on your own system, check with lspci.
Hooked the script into modconf with a file @ /etc/modprobe.d/vfio.conf
install vfio-pci /usr/local/bin/vfio-pci-override.sh
Updated /etc/mkinitcpio.conf with the following lines:
-
FILES=(/usr/local/bin/vfio-pci-override.sh) -
Added
vfio_pci vfio vfio_iommu_type1toMODULES=(before any nvidia driver -
Checked
modconfwas inHOOKS=(
sudo mkinitcpio -P
Then also replied y to limine as I’m using it.
The Lenovo Graphics Dock with the external GTX 1050 did not require any configuration and worked out of the box with whatever drivers CachyOS installed.
-
Boot starts → initramfs loads
-
vfio-pci module requested → script runs first
-
Script writes
vfio-pcito/sys/bus/pci/devices/0000:01:00.0/driver_override -
nvidia loads → tries to probe
01:00.0→ kernel blocks it (override set) -
External dock plugged in → appears on different PCI address (Thunderbolt bus, e.g.,
09:00.0) -
nvidia binds to external GPU → works normally (no override on that address)