** VIDEO GUIDE - How to Easily Dump a vBIOS from any GPU directly from the Server for passthrough


49 posts in this topic Last Reply

Recommended Posts

Hi Guys. So I have found that recently i have had to use a vbios with both my GPUs in my server whether Primary or Secondary GPUs.

So i thought i would try and write a script that would automatically dump the vbios from a GPU in the server even if its a Primary GPU without having to do any command line work or without having to download a vbios from techpowerup and then hex edit it.

 

I have tested this in about a half a dozen servers and it has worked for all of them.  Before running the script I recommend shuting down the server completely (not rebooting)  the start it back up.  Make sure no containers are running (disable docker service) and make sure no VMs are running. This is because if the GPU is Primary the script will need to temporarily put the server to sleep for a few seconds to allow the GPU to be in a state where it can have the vbios dumped from it. If alot of containers are running the server doesnt always goto sleep and the script fails.

 

How the script works.

It will list the GPUs in the server showing the ids. Then with your choosen GPU id  the script will dump the vbios using these steps. It will make a temporary seabios vm with the card attached, then quickly start and stop the vm with GPU passed through. This will put the GPU in the correct state to dump the vBios.

It will then delete the temporary vm as no longer needed.

It will try to dump the vbios of the card then check the size of the vbios.

If the vbios looks correct (which normally if gpu is NOT primary it will be) it will finish the process and put the vbios in the location specified in the script (default /mnt/user/isos/vbios)

However if the vbios looks incorrect and the vbios is under 70kb then it was probably dumped from a primary GPU and will need an additional stage. This is because the vbios was shadowed during the boot process of the server and so the resulting vbios is a small file which is not correct. So the script will now disconnect the GPU then put the server to sleep. Next it will prompt you to press the power button to resume the server from its sleep state. Once server is woken the script will rescan the pci bus reconnecting the GPU. This now allows the primary gpu to be able to have the vbios dumped correctly. Script will then redump the vbios again putting the vbios in the loaction specified in the script (defualt /mnt/user/isos/vbios)

 

Here is a video showing how to use the script

 

 

Of course you will need squids excellent user scripts plugin to use this script. You wil find the dump script on my github here  https://github.com/SpaceinvaderOne/Dump_GPU_vBIOS

I was hoping that if this script works for most people then we could get a big repository of dumped vbioses (not hexedited) and I will put them in the github. I have made a start with a few of my GPUs. So if you want to contribute then please post a link too your vbios and i will add it. Please name the vbios like this.

Tith type, vendor and model and memory size. For example RTX 2080ti - Palit GAMING PRO - 11G  The vbios collection is here https://github.com/SpaceinvaderOne/Dump_GPU_vBIOS/tree/master/vBIOSes

Well I hope the script works for you and you find it useful.  Oh and as its the now 12 midnight here in the UK - its Christmas day. So merry christmas fellow Unraiders I hope you have a great day and a good new year :)

 

Link to post

I followed your instructions on setting up a VM and then dumping the bios and before I upgraded to a ryzen 2600 I had videocard passthru.  I thought maybe it was me dumping the bios wrong and eagerly waded into your newest video.  If I run vnc I get a video image.  If I use the dumped bios, I get a black screen when I load up splashtop for the VM.  I know the bios is right because if it isn't the VM pegs one cpu 100% and never changes.  Its like its hanging on initialization.  I'm new to this and still on my trial, but if I can't get this working and its been 2 months almost, maybe this isn't for me.    I'm open to troubleshooting help I just need to know what to do.  Thanks in advance

 

 

Strangest thing.  When I press the ctrl-alt-delete during the black screen it brings up the task manager.  I choose logout, then it shows proper screen and I can log in like nothing is wrong.  It just isn't showing video until I control alt delete, sign out and sign back in.

 

Second edit.  Now when I log in with splashtop to the VM I get a black screen and pressing the ctrl alt delete brings up the task manager but if I logout or sign in with another user I just get a black screen.  I can see its working in the background due to certain programs running on startup that affect external conditions, but I'm blind.  I hope this is an isolated incident fixed in 6.9 since I'm running 6.8.3

Edited by Merlinjr
more information
Link to post

I have been unsuccessful dumping a GTX 570 Rev. 2 vbios. I also receive the cat: rom: Input/output error. I thought this may have been due to the SMB security, but even set as public it had no change. When it does go through the initial steps it sometimes reports 70Kb seems to small and does the sleep/wake method but always ends with the Input/output error.

 

Is there a deeper log I can look into for this?

 

Love the video's SpaceInvaderOne.

Link to post

Got the following error:

cat: rom: Input/output eror

Did powerdown the server stopped docker and had all VM's set to not autostart. The Tools/System Devices does have the Video and Audio checked. GPU is not primary.

961404004_ScreenShot2020-12-27at10_33_26AM.png.827a35589ac9c1b5fde728dbc9846fe1.png

Screen Shot 2020-12-27 at 10.43.41 AM.png

Edited by soana
added info
Link to post

@soana  @frodr @reporrted

Some extra things you can try .

1. Stub gpu

2 Shutdown fully the server then start server. (not reboot)

3. make a temp vm using ovmf attach the gpu you want vbios from start vm up then after couple seconds force stop.(the script makes one with seabios )

run script

If still getting an error repeat above then edit sctipt and look for a variable forcereset="no" and change it to yes. This will force the scr4upt to always disconnect sleep the server then reconnect before dumping the vbios.

 

 

Link to post
On 12/26/2020 at 6:28 PM, reporrted said:

I have been unsuccessful dumping a GTX 570 Rev. 2 vbios. I also receive the cat: rom: Input/output error. I thought this may have been due to the SMB security, but even set as public it had no change. When it does go through the initial steps it sometimes reports 70Kb seems to small and does the sleep/wake method but always ends with the Input/output error.

 

Is there a deeper log I can look into for this?

 

Love the video's SpaceInvaderOne.

No sorry no more logs are available. If you get it to dump and it says its less than 70kb you could just stop the script at that point and see if that vbios is in fact okay. Some older gpus may have a smaller vbios size ( i have a very old card a cirus logic from the 1990s that is a pci card, i use in a pcie to pci bridge, its vbios is only 30kb !) 

Link to post
On 12/28/2020 at 6:55 PM, SpaceInvaderOne said:

@soana  @frodr @reporrted

Some extra things you can try .

1. Stub gpu

2 Shutdown fully the server then start server. (not reboot)

3. make a temp vm using ovmf attach the gpu you want vbios from start vm up then after couple seconds force stop.(the script makes one with seabios )

run script

If still getting an error repeat above then edit sctipt and look for a variable forcereset="no" and change it to yes. This will force the scr4upt to always disconnect sleep the server then reconnect before dumping the vbios.

 

 

Many thanks,

 

I was able to download the vbios. But I am not able to connect with the Vega 64 as GPU. I do get an IP address. When setting the GPU as secondary GPU I only get a black screen and no IP. I might be that it is something wrong with the GPU. I will pull it out, build it back to air cooling from current liquid cooling, and start all over again. 

Link to post
12 minutes ago, Lunch said:

@frodr which one of the extra options worked for you?  I am in similiar situation with a GTX 1660, getting same message as you posted above....

Well, not really sure. The first one not work out, then tried the second. I somehow misunderstood and the end. Well up and running again, I ram the script with forcereset="no". And then it worked. 

Link to post

Trying to dump a bios from a Ryzen 4650g APU was not possible. It was the only graphics in the system and was bound to the vfio,

bit it still gave errors... is it possible to dump the vbios from An apu?

 

Has anybody tried to do so? Can anybody help or provide a dump of a Ryzen 4650g APU?

 

I added a VBIOS from my "old" AMD Radeon R7-370+ with 2GB

AMD Radeon R7-370_2G.rom

Edited by DrMucki
Asking for help, added VBIOS
Link to post

This is the dump of my Galax 1660 GTX 6GB GDDR5 rom

Incidentally, and it must be something I did before I stumbled across this excellent video, every time I restart the server, and thereby windows VM, I get a black screen on my monitor, ie it will turn on but nothing will show.  If I run this script again, once ive gone through it, and I start the VM again, it works every time...I think it is the script releasing the GPU from maybe unraid system?  Before I read up on this fully when I was building this unraid server I downloaded the Nvidia app which I think may have bu**ered me up a bit!

gpu gtx 1660.rom

Link to post
  • 2 weeks later...

Hi Space Invader I recently Dumped my new Asus Dual OC RTX 3070 8gb bios Rom with GPU-Z I have attached it below I couldn't remove the Nvidia header because it didn't look the same as was stated on your past video if you could have alook for me id appreciate it I'm not looking to put this in my server as of yet!! but may do in the future once I get a much bigger case hopefullly this will help other people with RTX 3070

Asus Dual OC RTX 3070.rom

Link to post

Great script, thanks for doing this.

 

Unfortunately, I cannot get it to work. Please see error message below. It is stubbed and VM/Docker are off.

 

Okay dumping vbios file named AMD/ATI Radeon RX 470/480/570/570X/580/580X/590 to the location /mnt/user/isos/vbios/
/tmp/user.scripts/tmpScripts/dump vbios/script: line 301: /mnt/user/isos/vbios/AMD/ATI
Radeon RX 470/480/570/570X/580/580X/590: No such file or directory

Um.... somethings gone wrong and I couldn't dump the vbios for some reason
Sometimes when this happens all we need to do to fix this is 'stub' or 'bind to the vfio' the gpu and reboot the server

Link to post
11 hours ago, steve1977 said:

Great script, thanks for doing this.

 

Unfortunately, I cannot get it to work. Please see error message below. It is stubbed and VM/Docker are off.

 

Okay dumping vbios file named AMD/ATI Radeon RX 470/480/570/570X/580/580X/590 to the location /mnt/user/isos/vbios/
/tmp/user.scripts/tmpScripts/dump vbios/script: line 301: /mnt/user/isos/vbios/AMD/ATI
Radeon RX 470/480/570/570X/580/580X/590: No such file or directory

Um.... somethings gone wrong and I couldn't dump the vbios for some reason
Sometimes when this happens all we need to do to fix this is 'stub' or 'bind to the vfio' the gpu and reboot the server

I had the same thing for my RX580. It's all the slashes in the filename, so it's trying to create a massive folder tree (and can't function).

 

Fix: edit the script, you'll see a config option a few lines down to change the filename. Change it to something (e.g. I went for rx580.rom) and that should fix it :)

 

 

rx580.rom

Link to post

Getting stuck here every time. 

image.thumb.png.92b4e9c293ce01dfd8504ed9cd5ab971.png

 

Any idea why it will not start the temp vm?

I have already tried deleting the folder where it is supposed to save the vBIOS

I have to force shutdown after this as you cant cancel the script correctly and the array will not unmount the disks. When restarting this VM was stood up, but starting it freezes everything as well.

 

image.thumb.png.18e037924e3d7c47dad80f3b14d19a7a.png

Edited by stelks
Link to post
On 1/23/2021 at 10:21 AM, stelks said:

Getting stuck here every time. 

image.thumb.png.92b4e9c293ce01dfd8504ed9cd5ab971.png

 

Any idea why it will not start the temp vm?

I have already tried deleting the folder where it is supposed to save the vBIOS

I have to force shutdown after this as you cant cancel the script correctly and the array will not unmount the disks. When restarting this VM was stood up, but starting it freezes everything as well.

 

 

 

Are you running unraid in the GUI mode? I was having the same problem. I switched over to the non-gui mode and after the reset it worked on the first try.

Link to post
  • 2 weeks later...
On 1/26/2021 at 11:28 PM, RedCelicaTRD said:

 

Are you running unraid in the GUI mode? I was having the same problem. I switched over to the non-gui mode and after the reset it worked on the first try.

Still getting errors. I did bind the gpu to the vfio as it says. Any ideas?image.thumb.png.710b3aaa1294b0564aa19730cf76a001.png 

image.png

 

 

 

EDIT: I was able to manually edit a vbios I found online to get it to work in my VM. Turning off GUI mode did at least make that part of setting up a VM work, just cant get this script working. 

Edited by stelks
Link to post
  • 2 weeks later...

I have succesfully extracted the Vbios from a HD 5430 mobility Radeon, But am unable to boot an VM with it, so far :S

 

--update, i have succesfully booted an VM with this Vbios.

--update2, i have 3 VMs, but only 1 of them is able use the passthrough, the others keep throwing errors the device is bussy (1 VM active at a time, so not trying to share the resource) And switching it on and off a couple times between VM's tends to crash Unraid alltogether.

 

AMD5430.rom

Edited by Caennanu
updates
Link to post

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...

×   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.