User avatar
gmol1
Posts: 62
Joined: Fri Dec 04, 2015 12:33 am

Re: [Guide] VGA Passthrough

Sat Feb 18, 2017 8:06 am

Hi Zack, this guide is out of date. IOMMU is now enabled in the kernel by default.

Zackptg5
Posts: 6
Joined: Tue Feb 14, 2017 4:25 pm

Re: [Guide] VGA Passthrough

Mon Feb 20, 2017 10:47 pm

Ok, so is the rest of the guide still up to date or are there any other changes I should be aware of? Thanks

Also, my main goal is to passthrough my nvidia card. The caveat is that it is an optimus card so would that be possible?

User avatar
gmol1
Posts: 62
Joined: Fri Dec 04, 2015 12:33 am

Re: [Guide] VGA Passthrough

Wed Feb 22, 2017 12:53 pm

As far as I know its not possible to passthrough an optimus card but I could be wrong. Anyways everything else in the guide should work.

genie137
Posts: 6
Joined: Mon Mar 06, 2017 5:27 pm

Re: [Guide] VGA Passthrough

Sat Apr 08, 2017 2:31 pm

Hey, im trying this on my desktop currently. But after doing the script you provided my Nvidia card is still using the nouveau driver.
If read that this is possible because the nouveau driver is loaded earlier than the vfio-pci driver.
Is this true? And how can I fix it?

Code: Select all

02:00.0 VGA compatible controller: NVIDIA Corporation Device 1380 (rev a2)
	Subsystem: ASUSTeK Computer Inc. Device 84bb
	Kernel driver in use: nouveau

captaine
Posts: 4
Joined: Wed Dec 21, 2016 2:55 am

Re: [Guide] VGA Passthrough

Sat May 13, 2017 10:22 pm

genie137 wrote:
Sat Apr 08, 2017 2:31 pm
Hey, im trying this on my desktop currently. But after doing the script you provided my Nvidia card is still using the nouveau driver.
If read that this is possible because the nouveau driver is loaded earlier than the vfio-pci driver.
Is this true? And how can I fix it?

Code: Select all

02:00.0 VGA compatible controller: NVIDIA Corporation Device 1380 (rev a2)
	Subsystem: ASUSTeK Computer Inc. Device 84bb
	Kernel driver in use: nouveau
I found it necessary to add the following to /usr/lib/dracut/dracut.conf.d/vfio.conf:

Code: Select all

force_drivers+="vfio vfio_iommu_type1 vfio_pci vfio_virqfd"
Followed by rebuilding initrd using:

Code: Select all

# dracut -f --kver `uname -r` $(ls /boot/initrd-com.solus-project*) $(uname -r)
Hope this helps!

Uziah_
Posts: 1
Joined: Sun May 14, 2017 1:48 pm

Re: [Guide] VGA Passthrough

Sun May 14, 2017 1:51 pm

None of this works for me. I tried running the script, I also attempted manually. I also tried the advice from previous posts. Still using the amdgpu driver.

My setup.

Reinstalled fresh as of 7th of May 2017.

Running EFI Boot.
Budgie Desktop
Xeon 1230 v5 CPU
16gb Ram
MSI 1050ti - for linux host
AMD R9 Fury - for VM

I know it is possible for my hardware config as I have done it successfully under *buntu.

Nitric
Posts: 4
Joined: Sat May 13, 2017 1:29 am

Re: [Guide] VGA Passthrough

Sun May 21, 2017 9:39 pm

captaine wrote:
Sat May 13, 2017 10:22 pm
genie137 wrote:
Sat Apr 08, 2017 2:31 pm
Hey, im trying this on my desktop currently. But after doing the script you provided my Nvidia card is still using the nouveau driver.
If read that this is possible because the nouveau driver is loaded earlier than the vfio-pci driver.
Is this true? And how can I fix it?

Code: Select all

02:00.0 VGA compatible controller: NVIDIA Corporation Device 1380 (rev a2)
	Subsystem: ASUSTeK Computer Inc. Device 84bb
	Kernel driver in use: nouveau
I found it necessary to add the following to /usr/lib/dracut/dracut.conf.d/vfio.conf:

Code: Select all

force_drivers+="vfio vfio_iommu_type1 vfio_pci vfio_virqfd"
Followed by rebuilding initrd using:

Code: Select all

# dracut -f --kver `uname -r` $(ls /boot/initrd-com.solus-project*) $(uname -r)
Hope this helps!
I have the same problem and this does not fix it. The Nvidia GTX 970 I have is still using the nouveau driver.

Bunker
Posts: 7
Joined: Tue Aug 29, 2017 9:31 pm

Re: [Guide] VGA Passthrough (OUTDATED!)

Mon Dec 04, 2017 11:07 pm

I'm currently working on getting an updated set of instructions to get pci passthrough working on solus.

As I have a ryzen 5 1600 cpu, I'm following the guide from Wendell over at level1 techs but I have to work out some small problems with files that are not in the same place on solus as in Fedora which is used in the guide.

PCI pass through on Fedora by Level1techs.com

Also there is significant work being done by a user of the forum over at level1techs to have pci passthrough working in a window instead of on a physical screen. The project is almost release ready, he is mostly waiting to sort out ryzen threadripper support and for a proprietary blob of code to clear.

I just necro'ed this post to get people informed and will update this post when I have made my updated tutorial thread.

paramnesia
Posts: 1
Joined: Sat Nov 18, 2017 7:52 am

Re: [Guide] VGA Passthrough (OUTDATED!)

Thu Jan 04, 2018 8:15 am

Hi guys,

I got passthrough working.

I'll list my config files and appropriate steps to get them to 'take.' This is to get lspci -nnk to recognize your graphics card as belonging to the vfio-pci driver.

I used this topic and the Arch wiki (https://wiki.archlinux.org/index.php/PC ... h_via_OVMF) as a starting point.

Replace ids, devs, etc as necessary. NB: This is really messy and probably not quite optimized. Tread with caution.

1) Setup boot options:

# cat /etc/kernel/cmdline.d/20_vfio.conf

Code: Select all

intel_iommu=on
vfio-pci.ids=10de:1c82,10de:0fb9
isolcpus=14-17,32-35
nohz_full=14-17,32-35
rcb_nocbs=14-17,32-35
# sudo clr-boot-manager update

2) setup modprobe options (unknown if necessary):

# cat /etc/modprobe.d/vfio.conf

Code: Select all

options vfio-pci ids=10de:1c82,10de:0fb9

3) setup dracut options:

# cat /usr/lib/dracut/modules.d/40vfio-bind/module-setup.sh

Code: Select all

#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
check() {
return 0
}

depends() {
return 0
}

install() {
inst_hook pre-trigger 91 "$moddir/vfio-bind.sh"
}

installkernel() {
instmods vfio vfio_iommu_type1 vfio_pci vfio_virqfd
}
# cat /usr/lib/dracut/modules.d/40vfio-bind/vfio-bind.sh

Code: Select all

#!/bin/sh

DEVS="0000:01:00.0 0000:01:00.1"

for DEV in $DEVS; do
    echo "vfio-pci" > /sys/bus/pci/devices/$DEV/driver_override
done

modprobe -i vfio-pci
# cat /etc/dracut.conf

Code: Select all

# PUT YOUR CONFIG IN separate files
# in /etc/dracut.conf.d named "<name>.conf"
# SEE man dracut.conf(5) for options
#

add_dracutmodules+="vfio-bind"
# cat /etc/dracut.conf.d/vfio.conf

Code: Select all

force_drivers+=" vfio vfio_iommu_type1 vfio-pci vfio_virqfd "
# dracut -f --kver `uname -r` $(ls -1t /boot/initrd-com.solus-project.current.* | tail -1) $(uname -r)

I'll edit this if/when I realize I forgot a step. But it's a start!

aalhitennf
Posts: 19
Joined: Thu Nov 02, 2017 12:15 pm

Re: [Guide] VGA Passthrough (OUTDATED!)

Mon May 14, 2018 3:12 pm

I'm planning to do passthrough with intel cpu and nvidia gpu. Is there any point even trying with this guide or is passthrough possible in solus?

Return to “Tutorials”