Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[SOLVED] GPU Passthrough issue: BAR 0: can't reserve

Featured Replies

Hey guys,

since I've tried passingthrough my primary GPU (Saphire R9 280) my log gets spammed by this error:

Quote

Tower kernel: vfio-pci 0000:07:00.0: BAR 0: can't reserve [mem 0xe0000000-0xefffffff 64bit pref]

But everything is working as expected (Win10 VMs & Docker Container).
Somehow my log is getting filled up 100% and a majority of the entries are like:

Quote

Nov 27 15:53:37 Tower kernel: vfio-pci 0000:07:00.0: BAR 0: can't reserve [mem 0xe0000000-0xefffffff 64bit pref]
### [PREVIOUS LINE REPEATED 900803 TIMES] ###

And if I try to view the syslog via the 'tools' navigation, this error showed up:

Quote

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes) in /usr/local/emhttp/plugins/dynamix/include/Syslog.php on line 20

 

Does anyone have an idea how I could fix this issue(s)?

I tried adding 'video=efifb:off' to the flash's syslinux.cfg but it still occurs.

Unraid Version: 6.9.0-beta35


Diagnostics are attached below.


Kind regards,
Basti

tower-diagnostics-20201128-1721.zip

Solved by BastiArts

  • 2 weeks later...
  • Author
  • Solution

I finally found a fix, that works with my machine!

I added the following code to the /flash/config/go file:

#fix video for VM
echo 0 > /sys/class/vtconsole/vtcon0/bind
echo 0 > /sys/class/vtconsole/vtcon1/bind
echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind

Those lines unbind the console & by adding it to /flash/config/go will execute this piece of code on every boot of the system.

  • JorgeB changed the title to [SOLVED] GPU Passthrough issue: BAR 0: can't reserve
  • 3 months later...
On 12/13/2020 at 3:16 PM, BastiArts said:

I finally found a fix, that works with my machine!

tx, with this fix I was able to make passthrough work my AMD R9 280X, even used as primary GPU without any additional GPU in my system

  • 2 months later...

Hello there, i am a beginner to Unraid and have now the same issue - where exactly do i fill in those lines, in the flash where Unraid is installed?

  • Author
On 12/13/2020 at 3:16 PM, BastiArts said:

I added the following code to the /flash/config/go file:

As I've written above you need to paste those lines in the file /flash/config/go
Simply paste, save and restart ;)

Edited by BastiArts

like that?

#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &
#fix video for VM
echo 0 > /sys/class/vtconsole/vtcon0/bind
echo 0 > /sys/class/vtconsole/vtcon1/bind
echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind

 

  • Author
52 minutes ago, anthem221 said:

like that?

#!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &
#fix video for VM
echo 0 > /sys/class/vtconsole/vtcon0/bind
echo 0 > /sys/class/vtconsole/vtcon1/bind
echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind

 

Exactly :)

Really Impressive, thank you very much. Did not thought i can fix it so easy. Thanks!

  • Author
18 minutes ago, anthem221 said:

Really Impressive, thank you very much. Did not thought i can fix it so easy. Thanks!

I'm glad I could help :) Spent myself hours of finding a working fix for this issue

  • 2 months later...

Thanks for this fix! I had my system working with two GPUs passed through, but when I took one out for a different machine I had all kinds of trouble. This little bit saved me after banging my head on the wall for a couple of days. The GPU still in the system is a GTX 1050 Ti.

echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind

 

effectively unbinds efifb from being loaded and stealing the memory at the time of issuing the command, preventing the gpu to be active for the vm to which the gpu is passed through.

An alternative is to not load at all efifb with the boot arg:

video=efifb:off

 

But this will prevent you from reading the output when the host is loading.

 

In real this is not a general solution for the error:

kernel: vfio-pci 0000:07:00.0: BAR 0: can't reserve [mem 0xaaaaaaaaa-0xbbbbbbbb 64bit pref]

 

This is valid for oses booting with uefi, however, for example, if the os is booted with legacy bios efifb will not load, instead vesafb will be loaded.

 

A general approach to this is to look at what is preventing the memory to be mapped: we can do this in the host terminal, by looking at the output of:

cat /proc/iomem

 

We will see the memory regions together with what is using that range (0xaaaaaaaaa-0xbbbbbbbb in this example), so we can disable what is needed.

Edited by ghost82

  • 2 months later...
On 12/13/2020 at 4:16 PM, BastiArts said:

I finally found a fix, that works with my machine!

I added the following code to the /flash/config/go file:

#fix video for VM
echo 0 > /sys/class/vtconsole/vtcon0/bind
echo 0 > /sys/class/vtconsole/vtcon1/bind
echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind

Those lines unbind the console & by adding it to /flash/config/go will execute this piece of code on every boot of the system.

 

2 days of retracing all of my steps, swapping out GPUs and dumping ROMs, and it was 3 simple lines of code which didn't appear in any of the 

Spaceinvader One tutorials I watched.  I don't mean to necro, but I created an account so that I could sign in, thank you, and increase visibility for this solution.

 

x570 Aorus Pro, 5900X, 2 and ONLY 2 GTX 1080s in the system each in their own Win10 VM.

  • 2 months later...

OH MY GOD ....... AMAZING.

 

Spent hours trying to get VM working and this fixed it. Thank you :) :) :) 

Wanted to say thanks as well! Was somehow able to grab a GPU last week and got around to setting up a remote gaming VM just today. OP's fix worked for me when I encountered the log filling up to 100% issue. 

Well call me a necromancer, because this thread's alive!  ALIVE!  ....

to thank the solution's author.  Thank you.  I know I chose the path of pain despite Unraid being an excellent product, but it was discouraging to have extracted the rom, done this & that, and periodically get stuck with a resolution that would have wowed me only in my childhood.

  • 1 month later...

First, thank you.

 

Secondly, I would like to point out that this file is now at /boot/config/go

I'm just another lost soul who found your post and it worked perfectly, i wanted to say thank you! Add me to the list of fools who spent HOURS trying to fix this themselves - unsuccessfully.

 

 

On 3/26/2022 at 8:00 PM, nerbonne said:

First, thank you.

 

Secondly, I would like to point out that this file is now at /boot/config/go

depends how you're getting to it i think.

 

On 2/21/2022 at 1:07 PM, theone said:

Thanks adding these line work !!!

 

What do they actually do?

 

@ghost82 broke it down pretty well right there, i think.  

  • 1 month later...

Thanks, solved my issue also.

Updated to Version: 6.10.2-rc3 today and my Win 11 with RTX1080TI passthrough stopped working.

Now everything works again.

  • 1 month later...

Thanks, solved my issue also.

  • 1 month later...
On 12/13/2020 at 6:16 AM, BastiArts said:

I finally found a fix, that works with my machine!

I added the following code to the /flash/config/go file:

#fix video for VM
echo 0 > /sys/class/vtconsole/vtcon0/bind
echo 0 > /sys/class/vtconsole/vtcon1/bind
echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind

Those lines unbind the console & by adding it to /flash/config/go will execute this piece of code on every boot of the system.

This saved me after countless hours of searching for a fix and tinkering... My VM's stopped working out of nowhere and this was the solution to get them back up and running. I would get errors when trying to start my VM's and my log was 100% full (due to the VM errors spamming the syslog).

 

I know this is a fix, but what is the underlying issue that is causing this? Something seems very broken for this to just happen randomly...

  • 3 months later...
On 12/13/2020 at 4:16 PM, BastiArts said:

I finally found a fix, that works with my machine!

I added the following code to the /flash/config/go file:

#fix video for VM
echo 0 > /sys/class/vtconsole/vtcon0/bind
echo 0 > /sys/class/vtconsole/vtcon1/bind
echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind

Those lines unbind the console & by adding it to /flash/config/go will execute this piece of code on every boot of the system.

Many many thanks @BastiArts !!!

I am trying Unraid on an MSI B450 Tomahawk w a Ryzen 3600, and GPU passthrough of an GTX 1080Ti Founders Ed. was a nightmate, so much that I was on my way to Proxmox. I found your tip just as a last attempt.

 

And I have literraly tried any other solution and video for days... One at a time, combined...

In Proxmox it took me like 4-5 mins to Passthrough a Win10 system complete w NVME & GPU. Yet Unraid has other goodies...

 

again Many many Thanks!!!, may you be blessed for eternity :D

 

I come to add that XML editing has not been necessary for me since the fix. I checked the XML file and I don't use the extra code. Then again after passing through another audio card (extra) all worked nice and smoothly :)

Edited by apostolos55

Echoing many here.  Thanks @BastiArts

  • 2 weeks later...

Also echoing the fix.  Thank you!  Log went from 100% to 1% after reset.

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
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.