<div dir="ltr">Okay - I'll try it with pci-stub grabbing both at boot, then I'll unbind both cards from the kernel in initramfs, then I'll assign one to vfio-pci and the other to nvidia.  From there, systemd will take over and try to boot x (I think) and if this script works, I will have overcome this hurdle.  Hit me back if you think I'm not understanding something.</div><br><div class="gmail_quote"><div dir="ltr">On Tue, Feb 23, 2016 at 1:38 PM Ben J <<a href="mailto:btpprograms@gmail.com">btpprograms@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Did vfio-pci bind? I would bind the vfio before nvidia in your script. You can try to unbind from nvidia but I know it generally doesn't work well. So for #2 I wouldn't expect that to work. I'm pretty bad with the boot process so I'll leave that for someone else.</p>
<div class="gmail_quote"></div><div class="gmail_quote">On Feb 23, 2016 1:33 PM, "Garland Key" <<a href="mailto:david.garland.key@gmail.com" target="_blank">david.garland.key@gmail.com</a>> wrote:<br type="attribution"></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">@Alex & @Ben J<br><br>I tried binding both cards to pci-stub in boot options and then running the following script in initramfs:<br><br><div>    echo 0000:01:00.0 > /sys/bus/pci/drivers/pci-stub/unbind</div><div>    echo 0000:01:00.1 > /sys/bus/pci/drivers/pci-stub/unbind</div><div>    echo 0000:02:00.0 > /sys/bus/pci/drivers/pci-stub/unbind</div><div>    echo 0000:02:00.1 > /sys/bus/pci/drivers/pci-stub/unbind</div><div>    echo 0000:01:00.0 > /sys/bus/pci/drivers/nvidia/bind</div><div>    echo 0000:01:00.1 > /sys/bus/pci/drivers/nvidia/bind</div><div>    echo 0000:02:00.0 > /sys/bus/pci/drivers/vfio-pci/bind</div><div>    echo 0000:02:00.1 > /sys/bus/pci/drivers/vfio-pci/bind</div><div><br>This didn't work (nvidia driver doesn't attach to either card) but I think I'm understanding more and will find a solution with the more understanding I gain (call me Captain Obvious).</div><br>I have a two questions that should help me understand what to do.<br><br>1. After initramfs runs, systemd takes over.  At what point in this process does the nvidia driver actually try to load and when does X try to start?<br><br>2. Should I just not use pci-stub and instead just run a script in initramfs that unbinds both cards and then binds each one to the driver that I want?<br></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Feb 21, 2016 at 12:58 PM Garland Key <<a href="mailto:david.garland.key@gmail.com" target="_blank">david.garland.key@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I checked dmesg and there wasn't anything that stood out.  There was a DRM error message for nvidia but it wasn't critical.  I'll look into this more tomorrow.  I have to go to sleep (I work at night).  Thanks, Alex.  I'll let you know if and when the advice you and Ben have shared works.</div><br><div class="gmail_quote"><div dir="ltr">On Sun, Feb 21, 2016 at 12:40 PM Alex Williamson <<a href="mailto:alex.williamson@redhat.com" target="_blank">alex.williamson@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Feb 21, 2016 at 10:01 AM, Garland Key <span dir="ltr"><<a href="mailto:david.garland.key@gmail.com" target="_blank">david.garland.key@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">It seems xorg crashed because the nvidia kernel module failed.  Here's the xorg log file:<br></div></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Did the intended device get bound to the nvidia module?  Are there dmesg errors?  You could try creating a file like:</div><div><br></div><div>/etc/X11/xorg.conf.d/10-nvidia.conf:</div><div><div>Section "Device"</div><div>    Identifier "Device0"</div><div>    Driver "nvidia"</div><div>    VendorName "NVIDIA Corporation"</div><div>    BusID "PCI:1:0:0"</div><div>    # Or PCI:2:0:0, depending on which is intended for the host</div><div>EndSection</div></div><div><br></div><div>Maybe Xorg is complaining because it's trying to use both cards when you only intend for it to use one.</div></div></div></div>
</blockquote></div></blockquote></div>
<br></blockquote></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">_______________________________________________<br>
vfio-users mailing list<br>
<a href="mailto:vfio-users@redhat.com" target="_blank">vfio-users@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/vfio-users" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/vfio-users</a><br>
<br></blockquote></div></blockquote></div>