Jump to content
  • [6.9.1] Issues with GPU passthrough


    Voydz
    • Minor

    Hi there!

     

    There appears to be an issue with GPU passthrough. I had GPU passthorugh working on 6.9.0-rc2 fine, using the latest approach to vfio binding I could find (using /boot/config/vfio-pci.cfg). For some information about vfio setup, please have a look on the screenshots. Unfortunately, I can not provide much detail on how I setup the VM itself, because it was running for quite some time now and I never touched it.

     

    After upgrading to 6.9.1 I am able to launch the VM but I can not access it. My unRAID server logs are spammed with the following entries:

    ...
    Mar 15 09:15:56 Prime kernel: vfio-pci 0000:26:00.0: BAR 1: can't reserve [mem 0xc0000000-0xcfffffff 64bit pref]
    Mar 15 09:15:56 Prime kernel: vfio-pci 0000:26:00.0: BAR 1: can't reserve [mem 0xc0000000-0xcfffffff 64bit pref]
    Mar 15 09:15:56 Prime kernel: vfio-pci 0000:26:00.0: BAR 1: can't reserve [mem 0xc0000000-0xcfffffff 64bit pref]
    Mar 15 09:15:56 Prime kernel: vfio-pci 0000:26:00.0: BAR 1: can't reserve [mem 0xc0000000-0xcfffffff 64bit pref]
    Mar 15 09:15:56 Prime kernel: vfio-pci 0000:26:00.0: BAR 1: can't reserve [mem 0xc0000000-0xcfffffff 64bit pref]
    ...

     

    My VM outputs:

    ...
    2021-03-15T08:15:56.564833Z qemu-system-x86_64: vfio_region_write(0000:26:00.0:region1+0xbd2c0, 0x0,1) failed: Device or resource busy
    2021-03-15T08:15:56.564842Z qemu-system-x86_64: vfio_region_write(0000:26:00.0:region1+0xbd2c1, 0x0,1) failed: Device or resource busy
    2021-03-15T08:15:56.564850Z qemu-system-x86_64: vfio_region_write(0000:26:00.0:region1+0xbd2c2, 0x0,1) failed: Device or resource busy
    2021-03-15T08:15:56.564859Z qemu-system-x86_64: vfio_region_write(0000:26:00.0:region1+0xbd2c3, 0x0,1) failed: Device or resource busy
    2021-03-15T08:15:56.564868Z qemu-system-x86_64: vfio_region_write(0000:26:00.0:region1+0xbd2c4, 0x0,1) failed: Device or resource busy
    2021-03-15T08:15:56.564876Z qemu-system-x86_64: vfio_region_write(0000:26:00.0:region1+0xbd2c5, 0x0,1) failed: Device or resource busy
    2021-03-15T08:15:56.564885Z qemu-system-x86_64: vfio_region_write(0000:26:00.0:region1+0xbd2c6, 0x0,1) failed: Device or resource busy
    2021-03-15T08:15:56.564894Z qemu-system-x86_64: vfio_region_write(0000:26:00.0:region1+0xbd2c7, 0x0,1) failed: Device or resource busy
    2021-03-15T08:15:56.564902Z qemu-system-x86_64: vfio_region_write(0000:26:00.0:region1+0xbd2c8, 0x0,1) failed: Device or resource busy
    2021-03-15T08:15:56.564911Z qemu-system-x86_64: vfio_region_write(0000:26:00.0:region1+0xbd2c9, 0x0,1) failed: Device or resource busy
    2021-03-15T08:15:56.564920Z qemu-system-x86_64: vfio_region_write(0000:26:00.0:region1+0xbd2ca, 0x0,1) failed: Device or resource busy
    2021-03-15T08:15:56.564936Z qemu-system-x86_64: vfio_region_write(0000:26:00.0:region1+0xbd2cb, 0x0,1) failed: Device or resource busy
    2021-03-15T08:15:56.564948Z qemu-system-x86_64: vfio_region_write(0000:26:00.0:region1+0xbd2cc, 0x0,1) failed: Device or resource busy
    2021-03-15T08:15:56.564958Z qemu-system-x86_64: vfio_region_write(0000:26:00.0:region1+0xbd2cd, 0x0,1) failed: Device or resource busy
    2021-03-15T08:15:56.564968Z qemu-system-x86_64: vfio_region_write(0000:26:00.0:region1+0xbd2ce, 0x0,1) failed: Device or resource busy
    2021-03-15T08:15:56.564978Z qemu-system-x86_64: vfio_region_write(0000:26:00.0:region1+0xbd2cf, 0x0,1) failed: Device or resource busy
    2021-03-15T08:15:56.564987Z qemu-system-x86_64: vfio_region_write(0000:26:00.0:region1+0xbd2d0, 0x0,1) failed: Device or resource busy
    ...

     

    Resource busy seems quite odd to me. I tried to search this issue first, but I can not find any hint, which made me believe that that issue has to be related to the unRAID update. 

     

    Thanks for any help and your hard work on this!

     

    best regards

    Bildschirmfoto 2021-03-15 um 09.31.47.png

    Bildschirmfoto 2021-03-15 um 09.32.14.png

    prime-diagnostics-20210315-0921.zip




    User Feedback

    Recommended Comments



    As this thread, and the fact that it's relatively recent came up when I experienced something similar, I thought I'd share some notes.

     

    I had a corrupted USB drive being used for unRAID, which I replaced and re-keyed successfully.  When I was generating this new key, I thought "why not?" and ENABLED it to boot in UEFI mode. Now, I've set my BIOS for Legacy (Gigabyte x570 AORUS MASTER), so I didn't ASSUME this would create any issues.

     

    After initial reboot - and fixing failed NVIDIA plugins (which I didn't need, as I'm not doing Docker passthrough), the following error kept occurring:

    qemu-system-x86_64: vfio_region_write(0000:0c:00.0:region3+0x15004, 0xabcdabcd,4) failed: Device or resource busy

    I re-bound VFIO, ran all the listed commands, and still had no luck.

     

    While ruling out other issues, I checked the BIOS, and even though "Legacy ONLY" was enabled, it was listing UEFI for the unRAID USB key.

     

    I selected the alternative option for the drive, restarted, and the VM fired up without issue.

     

    Hope this "accidental UEFI selection" helps someone else.

     

    Cheers, -Ian

    Link to comment

    I had the same Problem in my system(Msi motherboard; only one pci gpu) and I thought i should add my own two cents on how i solved it.

     

    As IJSaul stated the Problem surfaces when unraid is booting in Uefi mode. Why Is that? In Uefi boot the efifb driver gets loaded. It's purpose is to get your Display resolution so the video output is rightly scaled. Doing so the driver uses the gpu which leads to the 'device busy' error.

    You can also probably see that happening when you compare your System booting. In my case the driver detects my 4k screen and scales acording to that.

     

    So how can we get rid of it?

    1. Either we go back to legacy boot and solve it that way.

    2. Or we tell unraid to disable efifb at boot.

    This guy made a nice video about it.

    Please note that when doing that you can't see the unraid booting process on your display. And if you are using multiple gpu's I'm not sure If it hinders you using them in your dockers.

     

    Anyway have fun and a good Day!

    • Like 1
    Link to comment

    I wanted to say thank you to JSaul! 

     

    I did an update on my asus Tuf x570 Gaming pro motherboard and I had the same issues with it booting into UEFI and not being able to do any passthrough on VM and getting the vfio_region_write failed: Device or resource busy. 

     

    After going back and making sure the flash drive booted in legacy mode, everything worked (I did not have to edit Syslinux Configuration or anything)

     

    Thank you! 

    Link to comment



    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.
    Note: Your post will require moderator approval before it will be visible.

    Guest
    Add a comment...

    ×   Pasted as rich text.   Restore formatting

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


  • Status Definitions

     

    Open = Under consideration.

     

    Solved = The issue has been resolved.

     

    Solved version = The issue has been resolved in the indicated release version.

     

    Closed = Feedback or opinion better posted on our forum for discussion. Also for reports we cannot reproduce or need more information. In this case just add a comment and we will review it again.

     

    Retest = Please retest in latest release.


    Priority Definitions

     

    Minor = Something not working correctly.

     

    Urgent = Server crash, data loss, or other showstopper.

     

    Annoyance = Doesn't affect functionality but should be fixed.

     

    Other = Announcement or other non-issue.

×
×
  • Create New...