dracut icon indicating copy to clipboard operation
dracut copied to clipboard

force_drivers not working in non-host mode

Open daiaji opened this issue 3 years ago • 7 comments

Describe the bug As the title says, I configured force_drivers, but it doesn't seem to work.

Distribution used Manjaro Linux 22.0.0

Dracut version dracut-git-056.r270.43c16bfa-1-x86_64

Init system systemd 252 (252.3-1-manjaro)

To Reproduce 1.Configure dracut.

cat /etc/dracut.conf.d/myflags.conf
force_drivers+=" vfio_pci vfio vfio_iommu_type1 vfio_virqfd "

cat /etc/modprobe.d/vfio.conf 
options vfio-pci ids=10de:1c82,10de:0fb9

sudo dracut --force /boot/initramfs-6.0-x86_64.img
  1. reboot

sudo lspci -n -v -s 2e:00.0
2e:00.0 0300: 10de:1c82 (rev a1) (prog-if 00 [VGA controller])
        Subsystem: 7377:0000
        Flags: bus master, fast devsel, latency 0, IRQ 124, IOMMU group 27
        Memory at fb000000 (32-bit, non-prefetchable) [size=16M]
        Memory at 7f10000000 (64-bit, prefetchable) [size=256M]
        Memory at 7f20000000 (64-bit, prefetchable) [size=32M]
        I/O ports at e000 [size=128]
        Expansion ROM at fc000000 [disabled] [size=512K]
        Capabilities: [60] Power Management version 3
        Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [78] Express Legacy Endpoint, MSI 00
        Capabilities: [100] Virtual Channel
        Capabilities: [250] Latency Tolerance Reporting
        Capabilities: [128] Power Budgeting <?>
        Capabilities: [420] Advanced Error Reporting
        Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
        Capabilities: [900] Secondary PCI Express
        Kernel driver in use: nouveau
        Kernel modules: nouveau

Expected behavior Successfully attached vfio-pci to GTX1050TI.

Additional context https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF#dracut

lsinitrd.log: https://gist.github.com/daiaji/5829d7170715b0906dc89e86d6d6a83d

daiaji avatar Dec 12 '22 12:12 daiaji

sudo dracut --debug -v --force /boot/initramfs-6.0-x86_64.img

@daiaji, are you able to share the log for this command

LaszloGombos avatar Dec 12 '22 13:12 LaszloGombos

https://gist.github.com/daiaji/f9527594d2b683b34a0cb7a7f6ed5020

daiaji avatar Dec 12 '22 13:12 daiaji

What happens if you add the hostonly option when generating the image dracut -f -H /boot/initramfs-6.0-x86_64.img ?

johannbg avatar Dec 21 '22 17:12 johannbg

It's working, but documentation is missing.

daiaji avatar Dec 26 '22 15:12 daiaji

That's something that the editors of the wiki page need to look at but looking at the steps in the wiki page we probably should just turn those into a module and or add those to the existing modules so users dont have to jump through so many hoops to just enable this.

johannbg avatar Dec 26 '22 18:12 johannbg

Dedicated modules do enhance ease of use, but documentation is also important, and force_drivers not working in non-host mode is expected behavior?

daiaji avatar Dec 27 '22 04:12 daiaji

I have a similar issue but on EndeavourOS. H option doesn't work for me.

Edit: for anyone having the same problem, there's the solution to mine.

Iceburgino avatar Dec 30 '22 12:12 Iceburgino