Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved]PCI Passthrough
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
element432
n00b
n00b


Joined: 16 Dec 2016
Posts: 61

PostPosted: Fri Jul 13, 2018 12:18 am    Post subject: [Solved]PCI Passthrough Reply with quote

So I have had PCI passthrough running on my system for over a month. The only real issue I have is every time I reboot my machine, sometimes my second GPU will not be bound, and wont bind, to vfio-pci. It is bound to nvidia. The only fix I found that makes it work is that if I restart my machine either once, or can be up to five times or so, it will be bound to vfio-pci. I'm just curious what could be causing this to happen randomly. Thanks for any tips!

PS. I am using open-rc.


Last edited by element432 on Mon Jul 16, 2018 10:47 pm; edited 1 time in total
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3131

PostPosted: Fri Jul 13, 2018 6:55 pm    Post subject: Reply with quote

Probably a race condition.
Blacklist or uninstall all other drivers for this GPU from host.
Back to top
View user's profile Send private message
element432
n00b
n00b


Joined: 16 Dec 2016
Posts: 61

PostPosted: Fri Jul 13, 2018 8:17 pm    Post subject: Reply with quote

That's what I thought about doing, but they are both Nvidia gpus.
Back to top
View user's profile Send private message
Imatimba
n00b
n00b


Joined: 06 Nov 2017
Posts: 6

PostPosted: Fri Jul 13, 2018 9:55 pm    Post subject: Reply with quote

How are you binding it?
If you're using the conf file try adding the module option directly as a kernel parameter in your bootloader config:
Code:
vfio-pci.ids=10de:13c2,10de:0fbb

Replacing the ids of course.
Back to top
View user's profile Send private message
element432
n00b
n00b


Joined: 16 Dec 2016
Posts: 61

PostPosted: Fri Jul 13, 2018 10:40 pm    Post subject: Reply with quote

I believe I tried this, but I don't remember so I'll try again once I get home haha. Thanks!
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6097
Location: Dallas area

PostPosted: Fri Jul 13, 2018 10:40 pm    Post subject: Reply with quote

Are you unbinding it, before you try and rebind it to vfio?
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
element432
n00b
n00b


Joined: 16 Dec 2016
Posts: 61

PostPosted: Fri Jul 13, 2018 11:01 pm    Post subject: Reply with quote

Whenever I try to manually unbind it when it is bound to Nvidia, it just hangs and sometimes causes it to crash.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6097
Location: Dallas area

PostPosted: Fri Jul 13, 2018 11:30 pm    Post subject: Reply with quote

I have an nvidia and radeon now, so it's a little different, since I can now blacklist the radeon card.

BUT when I was using 2 nvidia cards I had to do this

echo 0000:02:00.0 > /sys/bus/pci/drivers/nouveau/unbind
echo 0000:02:00.0 > /sys/bus/pci/devices/0000:02:00.0/driver/unbind

First unbind from nouveau (should be the same if using nvidia drivers)
then unbind the device itself.

If that doesn't work, don't know what else to tell you.
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
element432
n00b
n00b


Joined: 16 Dec 2016
Posts: 61

PostPosted: Sat Jul 14, 2018 12:06 am    Post subject: Reply with quote

I definitely didn't try unbinding from Nvidia first so I'll try that. I was almost at the point of just picking up a cheap Radeon card for the host haha.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6097
Location: Dallas area

PostPosted: Sat Jul 14, 2018 12:46 am    Post subject: Reply with quote

Radeon is definitely an easier pass through than nvidia, even if you had 2 radeon cards.
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
element432
n00b
n00b


Joined: 16 Dec 2016
Posts: 61

PostPosted: Mon Jul 16, 2018 10:47 pm    Post subject: Reply with quote

Thanks! That worked for me, may eventually change to a radeon card in the future though haha.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum