<div dir="ltr">I'm using an Asus Z97 board and a Gigabyte Z97 board currently, and both allow for switching the boot GPU between PCIE1, PCIE[2-5] or the iGPU. All slots are one ACS group, though.</div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Aug 7, 2016 at 10:14 AM, Rokas Kupstys <span dir="ltr"><<a href="mailto:rokups@zoho.com" target="_blank">rokups@zoho.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks for reply. Since i am making a new build i am looking for proper<br>
motherboard. One i sided with is from asus, but it seems asus<br>
motherboards do not support switching primary GPU. I might go with<br>
gigabyte if there is no way to solve this. I am not sure yet though.<br>
Switching primary gpu in bios is ultimate solution. Directions i<br>
provided in earlier mail are workaround for people who do not have such<br>
capability. It is a tricky choice.. Go with beloved asus and suffer<br>
minor inconvenience or go with gigabyte.. Did you have any problems with<br>
gigabyte motherboard(s)?<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Rokas Kupstys<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On <a href="tel:2016.08.05%2014" value="+12016080514">2016.08.05 14</a>:44, Hristo Iliev wrote:<br>
> Am 05.08.2016 10:22, schrieb Rokas Kupstys:<br>
><br>
>> Okay this is unexpected luck. After more tinkering i got it to work!<br>
>> Here is my setup:<br>
>><br>
>> * AMD FX-8350 CPU + Sabertooth 990FX R2 motherboard<br>
>> * 0000:01:00.0 - gpu in first slot<br>
>> * 0000:06:00.0 - gpu in third slot<br>
>> * UEFI on host and guest.<br>
>> * Archlinux<br>
>><br>
>> In order to make host use non-boot GPU:<br>
>><br>
>> 1. Add Kernel boot parameter "video=efifb:off". This makes kernel not<br>
>> use first gpu and boot messages appear on second gpu.<br>
>><br>
>> 2. Bind first gpu (0000:01:00.0) to vfio-pci driver. I did this by<br>
>> adding line<br>
>><br>
>>> options vfio-pci         ids=1002:677B,1002:AA98<br>
>> to /etc/modprobe.d/kvm.conf. They are obtained from "lspci -n" which<br>
>> in my case show:<br>
>><br>
>>> 01:00.0 0300: 1002:677B<br>
>>> 01:00.1 0403: 1002:AA98<br>
>> 3. Configure xorg to use second gpu (0000:06:00.0). I added file<br>
>> /etc/X11/xorg.conf.d/<wbr>secondary-gpu.conf with contents:<br>
>><br>
>>> Section "Device"<br>
>>> Identifier     "Device0"<br>
>>> Driver         "radeon"<br>
>>> VendorName     "AMD Corporation"<br>
>>> BoardName      "AMD Secondary"<br>
>>> BusID          "PCI:6:0:0"<br>
>>> EndSection<br>
>> And thats it! Now when machine boots it shows POST messages and<br>
>> bootloader on first gpu, but as soon as boot option is selected<br>
>> display goes blank and kernel boot messages show on second gpu. After<br>
>> boot you can assign first gpu to VM as usual and it works.<br>
>> HELP REQUEST: could someone with intel hardware (ideally x99 chipset)<br>
>> test this method? I am planning a build and if this works i could<br>
>> settle with 28 lane cpu and save couple hundred dollars. Intel's 40<br>
>> lane cpus are way overpriced.. And with 28 lane cpus only first slot<br>
>> can run at x16 speed while other slots downgrade to x8 or less.<br>
>> Anyhow i would love to hear if this works on intel hardware.<br>
>><br>
><br>
> Hi,<br>
><br>
> I have a Gigabyte GA-X99-UD4 motherboard and i7-5820K. There are two GPUs<br>
> in it - a GTX 970 for pass-through on 03:00.0 and a GT 730 as primary GPU<br>
> on 06:00.0. The PCIE slot of the GT is selected as primary video output<br>
> in the UEFI settings. All text and graphics output goes to it - the<br>
> output<br>
> of the GTX card remains off the entire time until the VM is booted. The X<br>
> server does see both cards but since the nvidia module is prevented from<br>
> binding to the GTX, X cannot use it and starts on the GT. No fiddling<br>
> with<br>
> the console driver parameters necessary.<br>
><br>
> Distribution:<br>
>    Arch Linux, 4.6.4-1-ARCH<br>
><br>
> Kernel parameters:<br>
>    ... pci-stub.ids=10de:13c2,10de:<wbr>0fbb,8086:8d20 nvidia-drm.modeset=1<br>
> ...<br>
><br>
> /etc/modprobe.d/vfio.conf:<br>
>    options vfio-pci ids=10de:13c2,10de:0fbb,8086:<wbr>8d20<br>
><br>
> /etc/mkinitcpio.conf:<br>
>    ...<br>
>    MODULES="vfio vfio_iommu_type1 vfio_pci vfio_virqfd vfat aes_x86_64<br>
> crc32c_intel nvidia nvidia_modeset nvidia_uvm nvidia_drm"<br>
>    ...<br>
><br>
> /etc/X11/xorg.conf.d/20-<wbr>nvidia.conf:<br>
>    Section "Device"<br>
>     Identifier                "Device0"<br>
>     Driver                    "nvidia"<br>
>     VendorName                "NVIDIA Corporation"<br>
>     Option "ConnectToAcpid"   "0"<br>
>    EndSection<br>
><br>
> The only problem with my setup is that the GTX is in PCIE_2, which works<br>
> as x8 with i7-5820K installed. I cannot fit the card in PCIE_1 because of<br>
> the oversized CPU cooler. This doesn't actually bug me at all as multiple<br>
> tests (for example, [1]) have shown negligible difference in gaming FPS<br>
> between PCI-e 3.0 x8 and x16. The GT card is in PCIE_4.<br>
><br>
> Kind regards,<br>
> Hristo<br>
><br>
> [1]<br>
> <a href="http://www.gamersnexus.net/guides/2488-pci-e-3-x8-vs-x16-performance-impact-on-gpus" rel="noreferrer" target="_blank">http://www.gamersnexus.net/<wbr>guides/2488-pci-e-3-x8-vs-x16-<wbr>performance-impact-on-gpus</a><br>
><br>
>> Rokas Kupstys<br>
>><br>
>> On <a href="tel:2016.08.05%2010" value="+12016080510">2016.08.05 10</a>:34, Rokas Kupstys wrote:<br>
>><br>
>> I think i got half-way there.. My primary gpu is at 0000:01:00.0 and<br>
>> secondary on 0000:06:00.0. I used following xorg config:<br>
>><br>
>> Section "Device"<br>
>> Identifier     "Device0"<br>
>> Driver         "radeon"<br>
>> VendorName     "AMD Corporation"<br>
>> BoardName      "AMD Secondary"<br>
>> BusID          "PCI:6:0:0"<br>
>> EndSection<br>
>><br>
>> After booting 0000:06:00.0 was still bound to vfio-pci (im yet to sort<br>
>> it out why as i removed modprobe configs and kernel parameters) and i<br>
>> ran following script to bind gpu to correct driver:<br>
>><br>
>> #!/bin/bash<br>
>><br>
>> unbind() {<br>
>> dev=$1<br>
>> if [ -e /sys/bus/pci/devices/${dev}/<wbr>driver ]; then<br>
>> echo "${dev}" > /sys/bus/pci/devices/${dev}/<wbr>driver/unbind<br>
>> while [ -e /sys/bus/pci/devices/${dev}/<wbr>driver ]; do<br>
>> sleep 0.1<br>
>> done<br>
>> fi<br>
>> }<br>
>><br>
>> bind() {<br>
>> dev=$1<br>
>> driver=$2<br>
>> vendor=$(cat /sys/bus/pci/devices/${dev}/<wbr>vendor)<br>
>> device=$(cat /sys/bus/pci/devices/${dev}/<wbr>device)<br>
>> echo "${vendor} ${device}" > /sys/bus/pci/drivers/${driver}<wbr>/new_id<br>
>> echo "$dev" > /sys/bus/pci/drivers/${driver}<wbr>/bind<br>
>> }<br>
>><br>
>> unbind "0000:06:00.0"<br>
>> bind "0000:06:00.0" "radeon"<br>
>> #unbind "0000:01:00.0"<br>
>><br>
>> After restarting sddm.service (display manager) i could switch to<br>
>> secondary gpu and log in to desktop. All worked. Problem is i can not<br>
>> unbind 0000:01:00.0 so i could pass-through it. Attempt to unbind driver<br>
>> resulted in display freezing. Even secondary gpu froze.<br>
>><br>
>> Rokas Kupstys<br>
>><br>
>> On 2016.08.05 04:55, Nicolas Roy-Renaud wrote:<br>
>><br>
>> That's something you should fix in the BIOS. The boot GPU is special<br>
>> because the motherboard has to use it to display things such as POST<br>
>> messages and such, so it's already "tainted" by the time the kernel<br>
>> gets a hold of it. I had to put my guest GPU on my motherboard's<br>
>> second PCI slot because of that (can't change the boot GPU in the BIOS<br>
>> settings), which is pretty unconveinient because it blocks access to<br>
>> most of my sata ports.<br>
>><br>
>> If there's a way to cleanly pass the boot GPU to a VM, I don't know<br>
>> about it. I'd be interested to know too, however.<br>
>><br>
>> - Nicolas<br>
>><br>
>> On 2016-08-04 13:59, Rokas Kupstys wrote:<br>
>><br>
>> Hey is it possible to make kernel use GPU other than one that is in<br>
>> first slot? If so - how?<br>
>><br>
>> I have multiple PCIe slots but only first can run at max speed so i<br>
>> would like to use it for VGA passthrough. However if i put powerful GPU<br>
>> into the first slot - linux boots using that GPU. I would like to make<br>
>> kernel use GPU in slot 3. So result should be bios and bootloader<br>
>> running on gpu in slot #1, but kernel should use gpu in slot #3. I tried<br>
>> binding first gpu to vfio-pci driver hoping kernel would use next<br>
>> available gpu. That did not work, i could see one line with systemd<br>
>> version in low-res console (normally its high-res). I also tryed<br>
>> fbcon=map:1234 (not exactly being sure what im doing) but that yielded<br>
>> black screen. Not sure what else i could try.<br>
>><br>
><br>
> ______________________________<wbr>_________________<br>
> vfio-users mailing list<br>
> <a href="mailto:vfio-users@redhat.com">vfio-users@redhat.com</a><br>
> <a href="https://www.redhat.com/mailman/listinfo/vfio-users" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/vfio-users</a><br>
><br>
<br>
<br>
______________________________<wbr>_________________<br>
vfio-users mailing list<br>
<a href="mailto:vfio-users@redhat.com">vfio-users@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/vfio-users" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/vfio-users</a><br>
</div></div></blockquote></div><br></div>