SpaceinvaderOne / Dump_GPU_vBIOS

Script to dump the vbios from any GPU even if primary gpu on an Unraid Server
147 stars 45 forks source link

cat: rom: Input/output error #3

Open dazWiLLiE opened 3 years ago

dazWiLLiE commented 3 years ago

I followed your tutorial, and got the "cat: rom: Input/output error" error. Installed the "VFIO-PCI Config" plugin, marked both nvidia devices, saved config, rebooted and still get this error..

Script location: /tmp/user.scripts/tmpScripts/dump vbios/script
Note that closing this window will abort the execution of this script
You have selected this device to dump the vbios from
08:00.0 VGA compatible controller: NVIDIA Corporation GK208B [GeForce GT 710] (rev a1)

This does look like a valid GPU to me. Continuing .........

Checking if location to put vbios file exists
Vbios folder already exists

I will try and dump the vbios without disconnecting and reconnecting the GPU
This normally only works if the GPU is NOT the Primary or the only GPU
I will check the vbios at the end. If it seems wrong I will then retry after disconnecting the GPU

Defining temp vm with gpu attached
Domain dumpvbios defined from /tmp/dumpvbios.xml

Starting the temp vm to allow dump
Domain dumpvbios started

Waiting for a few seconds .....

Stopping the temp vm
Domain dumpvbios destroyed

Removing the temp vm
Domain dumpvbios has been undefined

Okay dumping vbios file named gt 710.rom to the location /mnt/user/isos/vbios/
cat: rom: Input/output error

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

This can be done in Unraid 6.8.3 with the use of the vfio config plugin or if you are on Unraid 6.9 or above it can be done
directly from the gui in Tools/System Devices .....So please do this and run the script again

Edit: I should mention that once I saw output on the screen connected to the card, it said something about not finding a file or something.

Edit2: I increased the sleep time in "startstopvm()" and could see the error messages:

Booting from Harddisk...
Boot failed: could not read the boot disk"
Booting from Floppy...
Boot failed: could not read the boot disk"
No bootable device
emeybee commented 3 years ago

I am having the same problem FYI.

0v3rcome commented 3 years ago

I had also received the cat: rom: Input/output error when dumping my RX550 vbios. I had to actually start a Windows VM that had the RX550 already passed through to it (no vbios specified). I then shut down that VM and ran the script. Which worked.

I had found the following in my syslog when the vbios dump script was run and failed.

kernel: pci 0000:01:00.0: Invalid PCI ROM header signature: expecting 0xaa55, got 0xffff

Searching for that brought me to https://www.redhat.com/archives/vfio-users/2019-March/msg00004.html

His experience was exactly the same as mine.

mherrema commented 3 years ago

I also am having the same problem. I tried what @0v3rcome mentioned (started a vm with GPU passed through, no Vbios, stopped it), and still see the same error unfortunately.

BrttClne22 commented 3 years ago

Adding this to the syslinux config (this can be easily accomplished through the Unraid UI), rebooting, then running the script worked for me:

vfio-pci.disable_idle_d3=1

You'll want to remove that and reboot once again after you've successfully dumped your vbios. Thanks @0v3rcome for the link to that thread.

tkodev commented 2 years ago

I have the same error: On 6.10.0rc2 w/ nvidia 2080 super founders

Script location: /tmp/user.scripts/tmpScripts/dump-vbios/script
Note that closing this window will abort the execution of this script
You have selected this device to dump the vbios from
01:00.0 VGA compatible controller: NVIDIA Corporation TU104 [GeForce RTX 2080 SUPER] (rev a1)

This does look like a valid GPU to me. Continuing .........

Checking if location to put vbios file exists
Vbios folder already exists

I will try and dump the vbios without disconnecting and reconnecting the GPU
This normally only works if the GPU is NOT the Primary or the only GPU
I will check the vbios at the end. If it seems wrong I will then retry after disconnecting the GPU

Defining temp vm with gpu attached
Domain 'dumpvbios' defined from /tmp/dumpvbios.xml

Starting the temp vm to allow dump
Domain 'dumpvbios' started

Waiting for a few seconds .....

Stopping the temp vm
Domain 'dumpvbios' destroyed

Removing the temp vm
Domain 'dumpvbios' has been undefined

Okay dumping vbios file named rtx-2080-super.rom to the location /mnt/user/isos/vbios/
cat: rom: Input/output error

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

This can be done in Unraid 6.8.3 with the use of the vfio config plugin or if you are on Unraid 6.9 or above it can be done
directly from the gui in Tools/System Devices .....So please do this and run the script again

I tried binding the card to vfio, appending the vfio-pci.disable_idle_d3=1 line above in main -> flash -> global configuration (with reboot), and tried setting forcereset from no to yes like in https://github.com/SpaceinvaderOne/Dump_GPU_vBIOS/issues/7#issuecomment-811645056

It always ends up with the same cat: rom: Input/output error. Any ideas?

CodyFraker commented 2 years ago

I was running into this error a lot, I followed all of the suggestions and no dice. What actually worked for me was trying one of the vbios from the techpowerup db, editing the hex file. Trying it out. That didn't work but when I shut down the VM and tried again, I got a 76kb vbios which worked - sorta. It at least allowed me to get into Windows but after doing all of the driver installs for the graphics card, I shut down the VM and ran the script again after going into System Information and binding the graphics card. (MAKE SURE THE VM ISN'T SET TO AUTOSTART), reboot after binding and presto, worked fine and got my 980 vbios.

bolzerrr commented 1 year ago

I am having the same issue with this device: Alder Lake-N [UHD Graphics] Tried everything mentioned but end up either with:

❯ echo 1 > /sys/bus/pci/devices/0000:00:02.0/enable
echo: write error: device or resource busy

Or:

❯ cat /sys/bus/pci/devices/0000:00:02.0/rom
cat: '/sys/bus/pci/devices/0000:00:02.0/rom': Input/output error
shriyash-shukla commented 1 year ago

@bolzerrr I too got the same error but what I did is followed spaceinvaders tutorial to get the vbios without dumping https://www.youtube.com/watch?v=1IP-h9IKof0&ab_channel=SpaceinvaderOne

0xE1 commented 7 months ago

I found that having device bound to any driver actually hinders the VBIOS dumping, use following commands to unbind and then rebind to vfio-pci driver (where 0000:02:00.0 is device address): echo '0000:02:00.0' > /sys/bus/pci/drivers/vfio-pci/unbind echo '0000:02:00.0' > /sys/bus/pci/drivers/vfio-pci/bind

shriyash-shukla commented 7 months ago

@0xE1 Thanks! I'll try it out later.

Casuallynoted commented 3 months ago

I'm also having this issue. Using an AMD RX560, so I don't believe the youtube tutorial linked a few messages ago will work for me (as it's for Nvidia GPUs). I've already tried each of the potential workarounds mentioned in this thread but have had no results.