Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The app crashes on AMD iGPU #27

Open
kaanchinar opened this issue Apr 19, 2024 · 9 comments
Open

The app crashes on AMD iGPU #27

kaanchinar opened this issue Apr 19, 2024 · 9 comments

Comments

@kaanchinar
Copy link

I have AMD Ryzen 7600X CPU with Raphael iGPU and RTX 4060 dGPU.

I want to make iGPU pass to guest OS while Linux host using NVIDIA GPU. But after select the IOMMU groups the app crashes and returns panic.

panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/HikariKnight/quickpassthrough/internal/pages.genVBIOS_dumper(0xc000100870)
/home/runner/work/quickpassthrough/quickpassthrough/internal/pages/03_vbios_extract.go:30 +0x37f
github.com/HikariKnight/quickpassthrough/internal/pages.viewGPU(0xc000100870, {0x0?, 0x0, 0x2?})
/home/runner/work/quickpassthrough/quickpassthrough/internal/pages/02_select_gpu.go:107 +0x4de
github.com/HikariKnight/quickpassthrough/internal/pages.SelectGPU(0xc000100870)
/home/runner/work/quickpassthrough/quickpassthrough/internal/pages/02_select_gpu.go:36 +0x105
github.com/HikariKnight/quickpassthrough/internal/pages.Welcome()
/home/runner/work/quickpassthrough/quickpassthrough/internal/pages/01_welcome.go:48 +0x271
github.com/HikariKnight/quickpassthrough/internal.Tui()
/home/runner/work/quickpassthrough/quickpassthrough/internal/ui_main.go:23 +0xbb
main.main()
/home/runner/work/quickpassthrough/quickpassthrough/cmd/main.go:23 +0xa5

By the way, in the error log, the home directory is not same as mine. My /home is /home/kaan.

How can I solve that issue?

@HikariKnight
Copy link
Owner

HikariKnight commented Apr 20, 2024

can you provide the output of debug.log?

@kaanchinar
Copy link
Author

can you provide the output of debug.log?

Sure!

2024/04/21 11:45:27
Welcome to Quickpassthrough 3bda7ca!

2024/04/21 11:45:29
/etc/modprobe.d found on the system
Creating config/etc/modprobe.d

2024/04/21 11:45:29
Backup directory does not exist!
Creating backup directory for first run backup
2024/04/21 11:45:29
/etc/default found on the system
Creating config/etc/default

2024/04/21 11:45:29
/etc/mkinitcpio.conf found on the system
Creating config/etc/mkinitcpio.conf

2024/04/21 11:45:29
No first time backup of /etc/mkinitcpio.conf detected.
Creating a backup at backup/etc/mkinitcpio.conf

2024/04/21 11:45:29
/etc/default/grub found on the system
Creating config/etc/default/grub

2024/04/21 11:45:29
No first time backup of /etc/default/grub detected.
Creating a backup at backup/etc/default/grub

2024/04/21 11:45:29
Executing: utils/ls-iommu -g -F vendor:,prod_name,optional_revision:,device_id

2024/04/21 11:45:30
ls-iommu query returned
IOMMU Group  12: NVIDIA Corporation: AD107 [GeForce RTX 4060] (rev a1): [10de:2882]
IOMMU Group  26: Advanced Micro Devices, Inc. [AMD/ATI]: Raphael (rev c7): [1002:164e]

2024/04/21 11:45:32
Executing: utils/ls-iommu -g -r -i 26 -F vendor:,prod_name,optional_revision:,device_id

2024/04/21 11:45:32
ls-iommu query returned
IOMMU Group  26: Advanced Micro Devices, Inc. [AMD/ATI]: Raphael (rev c7): [1002:164e]

2024/04/21 11:45:35
Executing: utils/ls-iommu -g -r -i 26 --id

2024/04/21 11:45:35
ls-iommu query returned
1002:164e

2024/04/21 11:45:35
Executing: utils/ls-iommu -g -i 26 --rom

2024/04/21 11:45:36
ls-iommu query returned

@HikariKnight
Copy link
Owner

HikariKnight commented Apr 21, 2024

Seems like you are trying to setup passthrough for the igpu, this will not work from my knowledge.

a valid config (if the motherboard allows it) would be igpu for host and dgpu for the guest(VM).

I do however see where it is crashing and it is because you selected a card that has no vbios (since it is part of the cpu), so the crash actually stopped you from doing something you shouldn't.
I will fix it and put in a warning.

@kaanchinar
Copy link
Author

Seems like you are trying to setup passthrough for the igpu, this will not work from my knowledge.

a valid config (if the motherboard allows it) would be igpu for host and dgpu for the guest (VM).

I do however see where it is crashing and it is because you selected a card that has no vbios (since it is part of the cpu), so the crash actually stopped you from doing something you shouldn't. I will fix it and put in a warning.

So, it is impossible to pass iGPU to VM? Because my monitor connected to NVIDIA, and I have only 1 cable for my monitor.

@zen0bit
Copy link

zen0bit commented Apr 22, 2024

I would also love to pass iGPU to VM
(in desktop)

@HikariKnight
Copy link
Owner

HikariKnight commented Apr 22, 2024

i believe only intel supports passing through igpus and it is not well documented and the process is completely different to how you would pass through a pcie gpu which this is intended for, i should change the readme to reflect that since i didnt think people would try to passthrough an igpu to be honest.

amd has no support for it i believe.

and I have only 1 cable for my monitor.

look up "ghost display adapter" on amazon, get one (ideally displayport but hdmi works fine too)
that is what i use when using https://looking-glass.io with the pcie gpu i passed through to the windows VM

@zen0bit
Copy link

zen0bit commented Apr 22, 2024

But should be doable no?
If iGPU is in IOMMU group alone (yes)
Not bound to system (yes)
Upgraded to CPU + iGPU with that in mind...

@kaanchinar
Copy link
Author

But should be doable, no? If iGPU is in IOMMU group alone (yes) Not bound to system (yes) Upgraded to CPU + iGPU with that in mind...

well, i unplugged my hdmi from dgpu to igpu and all IOMMU stuff works well. the problem is with igPU i guess.

@HikariKnight
Copy link
Owner

But should be doable, no? If iGPU is in IOMMU group alone (yes) Not bound to system (yes) Upgraded to CPU + iGPU with that in mind...

well, i unplugged my hdmi from dgpu to igpu and all IOMMU stuff works well. the problem is with igPU i guess.

you will need to get a ghost display adapter for your dgpu to work in the VM though and then you setup looking-glass and you will be good (or you can setup sunshine, both options will need a ghost adapter)

There is a sampledriver for a fake display that you can also use but it is not recommended as it does not give the same performance. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants