Hey everyone! ![]()
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:
- The dGPU refuses to bind to
vfio-pci— even withsoftdepconfigured, thenvidiadriver stubbornly grabs the card on boot. systemd-modules-load.servicefails at boot with exit code 1 or 127.- 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:
-
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). -
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 -
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:
-
Use
/usr/bin/trueinstead 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:YYYYwith your dGPU and Audio PCI IDs fromlspci -nn)./usr/bin/trueinstructs modprobe to do nothing and exit with code0(success). The driver is completely blocked from loading, and systemd remains happy! -
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 -
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-localercsometimes savesLANG=en_INwithout the.UTF-8suffix. 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-regdomhas 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.serviceis 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:
-
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 -
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 -
Remove
intel_iommu=on iommu=pt vfio-pci.ids=...from/etc/default/gruband runsudo grub-mkconfig -o /boot/grub/grub.cfg. -
Rebuild initramfs:
sudo dracut --force /boot/initramfs-linux.img $(uname -r) -
Reboot.
Hope this helps anyone struggling with VFIO on EndeavourOS! Let me know if you have questions or encounter any edge cases.