# [Guide & Fixes] Flawless GPU Passthrough (VFIO) on EndeavourOS: Overcoming the Dracut Driver Race & systemd-modules-load Failures

Hey everyone! :waving_hand:

If you have tried setting up VFIO GPU Passthrough on EndeavourOS (especially on laptops with Intel iGPU + NVIDIA dGPU or multi-GPU desktops), you might have noticed that following standard Arch Wiki or generic VFIO guides often leads to immediate roadblocks:

  1. The dGPU refuses to bind to vfio-pci — even with softdep configured, the nvidia driver stubbornly grabs the card on boot.
  2. systemd-modules-load.service fails at boot with exit code 1 or 127.
  3. Mysterious KWin Wayland locale/compose table errors spamming journalctl -b -p 3.

After debugging and solving these issues step-by-step, here is an explanation of why these happen on EndeavourOS and how to achieve a 100% clean, error-free setup (systemctl --failed showing 0 failed units!).


1. The Big One: The Dracut Driver Race

The Cause:

Unlike vanilla Arch which historically defaulted to mkinitcpio, EndeavourOS uses Dracut by default. When the NVIDIA drivers are installed, EndeavourOS adds drop-in configs such as:
/etc/dracut.conf.d/eos_nvidia_open.conf (or eos_nvidia.conf)

Inside this file, you will find:

force_drivers+=" nvidia nvidia_modeset nvidia_uvm nvidia_drm "

Traditional VFIO guides instruct you to add softdeps in /etc/modprobe.d/vfio.conf (softdep nvidia pre: vfio-pci). However, because Dracut force-loads the NVIDIA drivers directly into early initramfs, nvidia will always win the race before userspace modprobe rules are evaluated.

The Solution:

  1. Disable the conflicting Dracut drop-in:

    sudo mv /etc/dracut.conf.d/eos_nvidia_open.conf /etc/dracut.conf.d/eos_nvidia_open.conf.bak
    

    (Note: Adjust the file name if your installation uses eos_nvidia.conf).

  2. Force-load the VFIO modules early in Dracut:
    Create /etc/dracut.conf.d/vfio.conf:

    echo 'force_drivers+=" vfio vfio_iommu_type1 vfio_pci "' | sudo tee /etc/dracut.conf.d/vfio.conf
    
  3. Rebuild the initramfs images:

    sudo dracut --force /boot/initramfs-linux.img $(uname -r)
    sudo dracut --force /boot/initramfs-linux-fallback.img $(uname -r)
    

2. The /bin/false Trap (Fixing systemd-modules-load.service)

The Cause:

To prevent the host driver from taking over, many guides recommend blacklisting via modprobe:

install nvidia /bin/false

On EndeavourOS and Arch, the package nvidia-utils provides:
/usr/lib/modules-load.d/nvidia-utils.conf (which requests nvidia-uvm at boot).

When systemd-modules-load.service runs, modprobe executes /bin/false. Because /bin/false returns exit code 1 (or 127 in minimal initramfs environments where /bin/false is missing), systemd-modules-load.service crashes and is marked as FAILED in systemd.

The Solution:

  1. Use /usr/bin/true instead of /bin/false:
    In /etc/modprobe.d/vfio.conf, write:

    options vfio-pci ids=10de:XXXX,10de:YYYY disable_vga=1
    softdep nouveau pre: vfio-pci
    softdep nvidia pre: vfio-pci
    softdep nvidia_drm pre: vfio-pci
    install nvidia /usr/bin/true
    install nvidia_drm /usr/bin/true
    install nvidia_modeset /usr/bin/true
    install nvidia_uvm /usr/bin/true
    install nouveau /usr/bin/true
    

    (Replace 10de:XXXX,10de:YYYY with your dGPU and Audio PCI IDs from lspci -nn).

    /usr/bin/true instructs modprobe to do nothing and exit with code 0 (success). The driver is completely blocked from loading, and systemd remains happy!

  2. Mask the distro auto-load file:
    Prevent systemd from even attempting to request the driver:

    sudo ln -sf /dev/null /etc/modules-load.d/nvidia-utils.conf
    
  3. Restart the service to verify:

    sudo systemctl restart systemd-modules-load.service
    systemctl status systemd-modules-load.service
    # Status: 0/SUCCESS!
    

3. GRUB Command Line & Quoting Gotcha

EndeavourOS typically encloses GRUB_CMDLINE_LINUX_DEFAULT in single quotes ('...'), whereas many scripts and tutorials assume double quotes ("...").

When adding your IOMMU options:

intel_iommu=on iommu=pt vfio-pci.ids=10de:XXXX,10de:YYYY

(or amd_iommu=on on AMD CPUs), make sure not to create nested quotes like "'...' ...".

Regenerate your GRUB configuration:

sudo grub-mkconfig -o /boot/grub/grub.cfg

4. Bonus: Cleaning Up Lingering journalctl -b -p 3 Errors

While troubleshooting, we also tracked down common errors that clutter boot journals on EndeavourOS:

A. KWin Wayland Compose Error ([XKB-679] No Compose file for locale "en_IN.ISO8859-1")

  • Why it happens: When a non-US locale is chosen, ~/.config/plasma-localerc sometimes saves LANG=en_IN without the .UTF-8 suffix. Wayland / XKB then falls back to legacy ISO-8859-1, which lacks compose definitions.

  • Fix:

    sudo localectl set-locale LANG=en_IN.UTF-8
    sed -i 's/^LANG=en_IN$/LANG=en_IN.UTF-8/' ~/.config/plasma-localerc
    echo "LANG=en_IN.UTF-8" | sudo tee -a /etc/environment
    sudo locale-gen
    

B. Wi-Fi Regulatory Domain Failure (set-wireless-regdom exit code 1)

  • Why it happens: /etc/conf.d/wireless-regdom has all regulatory domains commented out by default.

  • Fix:
    Uncomment your 2-letter country code in /etc/conf.d/wireless-regdom (e.g. WIRELESS_REGDOM="IN", WIRELESS_REGDOM="US", etc.), then run:

    sudo /usr/bin/set-wireless-regdom
    

C. BlueZ D-Bus Warnings (dbus-org.bluez.service could not be found)

  • Why it happens: Hardware Bluetooth exists, but bluetooth.service is disabled out-of-the-box, triggering D-Bus activation warnings in WirePlumber and KDE Connect.

  • Fix:

    sudo systemctl enable --now bluetooth.service
    

Verification After Reboot

Reboot your machine:

reboot

Check your devices:

lspci -nnk -s 01:00.0
# Should show: Kernel driver in use: vfio-pci

systemctl is-system-running
# Output: running

systemctl --failed
# Output: 0 loaded units listed

Your dGPU is now completely reserved for KVM / QEMU / libvirt, with zero failed systemd services and a clean boot log!


How to Switch Back to Host (Reverting)

Whenever you want your dGPU back for native Linux gaming:

  1. Remove /etc/modprobe.d/vfio.conf, /etc/dracut.conf.d/vfio.conf, and /etc/modules-load.d/nvidia-utils.conf:

    sudo rm -f /etc/modprobe.d/vfio.conf /etc/dracut.conf.d/vfio.conf /etc/modules-load.d/nvidia-utils.conf
    
  2. Restore the original EndeavourOS dracut config:

    sudo mv /etc/dracut.conf.d/eos_nvidia_open.conf.bak /etc/dracut.conf.d/eos_nvidia_open.conf
    
  3. Remove intel_iommu=on iommu=pt vfio-pci.ids=... from /etc/default/grub and run sudo grub-mkconfig -o /boot/grub/grub.cfg.

  4. Rebuild initramfs:

    sudo dracut --force /boot/initramfs-linux.img $(uname -r)
    
  5. Reboot.


Hope this helps anyone struggling with VFIO on EndeavourOS! Let me know if you have questions or encounter any edge cases.

hey welcome @Tim here on the :enos: side!

May introduce yourself a bit on how you come to EndeavourOS and say hello to the community ?

Guide looks good.. not tried it but i could check on my Gaming Testmachine…

Hey joekamprad, and Hey community I came to endeavouros because it has good minimal setup which a distro should have. Like the music player, video player, etc. And it has some nice defaults except for some.

Also I like having Endeavouros because it has less bloatware.

It’s either archlinux or endeavouros for me everytime.