Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- This will be for Debian Stretch
- ==GUIDE ON HOW TO RUN GNU/LINUX AND GET VIDYA AT THE SAME TIME==
- Requirements: Two Monitors, Keyboard, Two Mice, Motherboard with VT-D support, i7 with VT-D/AMD Equivalent before Ryzen (i5 maybe but it will kind of be shit & Ryzen is not there yet but you can try), Integrated Graphics + GPU or Two GPU's, Windows ISO, Synergy, and Autism.
- I know Windows 10 works but Windows 7 works but its more of a pain. The only bug I have found is that I have to restart my machine and then switch to ich6 audio before then switching it back to ich9 once the machine starts and then stops.
- >Go to BIOS and Check if VT-d is enabled
- >Install GNU/Linux
- https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-9.2.0-amd64-netinst.iso
- https://rufus.akeo.ie/
- >Open a terminal and enter sudo nano /etc/default/grub then hit enter
- > Add intel_iommu=on or amd_iommu=on at the end of GRUB_CMDLINE_LINUX_DEFAULT, make sure the " is at the end
- > Save with CTRL X and Y then put sudo update-grub then hit enter
- >Restart PC
- >Open terminal back up and type in lspci -nn then hit enter
- >Find your GPU Address (Examples: 01:00.0 and 01:00.1)
- >Write down the numbers at the end for later (Example:10de:13c0 and 10de:0fbb)
- >Type in find /sys/kernel/iommu_groups/ -type l then hit enter. If you see other devices have that 01 number, if so you need ACS patch
- ==IF YOU NEED THE ACS PATCH PAY ATTENTION==
- >Go into terminal and type in sudo apt-get install linux-source libqt4-dev build-essential libssl-dev then hit enter
- >Go to https://aur.archlinux.org/cgit/aur.git/tree/?h=linux-vfio right click add-acs-overrides.patch and save it
- >open your file manager and go to /usr/src/linux-source.tar.xz
- >copy and paste that into your downloads folder
- >rename the patch file in your folder acs-patch
- >In Terminal type cd Downloads hit enter
- > Type in cd linux-source then hit enter
- > Type in patch -p1 <
- > Go to your file manager and drag the acs-patch.patch file into your terminal
- > Hit enter
- > type in make xconfig
- >A window will pop up, hit ctrl f and type in version
- >click local version and it should allow you to type below, enter -acs-patch then hit enter
- >hit the floppy drive at the top right to save
- > type in make -j4 deb-pkg then hit enter
- >if you get an error edit the config file with nano .config
- >In that file hit CTRL W and look for CONFIG_SYSTEM_TRUSTED_KEYS and add a # to the front of it before running the -j4 deb-pkg again
- >It will take some time but when its done there will be just a blank terminal go into your Downloads and delete everything except for linux-headers and linux-image, not the debug one.
- >Rename them linux-image.deb and linux-headers.deb
- >go into terminal and type in cd ~ then cd Downloads
- >type in sudo dpkg -i linux-image.deb linux-headers.deb
- >once that finishes type sudo apt-get install virt-manager ovmf
- >Edit grub again with sudo nano /etc/default/grub then where you put the intel/amd thing
- >You type in vfio-pci.ids="numbers" and take those numbers (Example:10de:13c0 and 10de:0fbb) and put them like this (Example: intel_iommu=on vfio-pci.ids=10de:13c0,10de:0fbb)
- >If you are using the ACS patch you add pcie_acs_override=downstream after the numbers before saving it with CTRL X and Y once again
- >Go into terminal and type in sudo nano /etc/modules
- > Add
- vfio
- vfio_iommu_type1
- vfio_pci
- vfio_virqfd
- then save
- >Reboot your machine
- >Open terminal and type lspci -k you should see your GPU with vfio_pci driver in use
- >Download these drivers for your VM but keep them as an iso https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/virtio-win.iso
- >Open virt manager and go to connection details then go to Virtual Networks
- >Make sure that On Boot is checked before Applying and exiting out
- >Go to the monitor with the play icon and create a new machine with your Windows ISO, make sure to give it at least 8 Gigs of RAM
- >When it shows the last screen you need to check Customize config before install
- > In Overview change Firmware to UEFI and Chipset to Q35
- >CPU page under config type in host-passthrough and under topology manually set it so its Socket: 1 Threads: 2 Cores: Use all except for the last (Example i7 with 4 cores and hyperthreading gets 3 so 1 core to Linux)
- >Memory is 8 or More
- >Boot Menu is enabled
- >Find where your the .qcow2 source path disk is and make sure in the advanded options its VirtIO and its performance is set to writeback
- >Under your Windows ISO you need to make it a SATA CDROM
- >NIC device model needs to be changed to VirtIO
- >Sound varies but for Windows 10 I use ich9.
- >Remove the Display Spice, Console, Video QXL, and Channel Spice
- >Add Hardware and select your downloads folder where the virtio drivers are, make sure its a SATA Disk.
- >Under boot menu make sure that the Windows ISO is check marked
- >Add Hardware and select your graphics card stuff under the PCI menu.
- >After the machine starts and you see a logo on the monitor that is hooked to the card turn the virtual machine off
- >Type in sudo virsh edit [machine name]
- >Change first line from <domain type='kvm'> to <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
- >In <hyperv> you need to add <vendor_id state='on' value='whatever'/> in the middle
- >If you want to use one pair of headphones and put
- <qemu:commandline>
- <qemu:env name='QEMU_AUDIO_DRV' value='pa'/>
- <qemu:env name='QEMU_PA_SERVER' value='/run/user/1000/pulse/native'/>
- </qemu:commandline>
- inbetween </devices> and </domain>
- >Go into terminal and type sudo nano /etc/libvirt/qemu.conf then make #user = " " to user ="(your username on machine)"
- >Go back to your virtual machine, once your mouse gets passed through its done unless the machine is turned off so you need to make sure you dont passthrough both mice.
- >If you want to add the second mouse double click until you see the screen that shows what your machine has and select add hardware then USB devices then the mouse/keyboard you want.
- >Start the machine with the green play button
- >In the windows install it wont find your drive so you have to browse the virtio disk to find virtstor and select your OS then windows should install fine
- >Once windows is installed fully you want to make sure the virtio disk is the one checked and not the windows disk.
- >In the Windows you need to install the network in the same method as the storage
- >Install Nvidia/AMD GPU Drivers
- >Go to Windows Devices and there is an unlisted PCI device which is the Ballon driver
- >Install synergy software on both machines so you can share the same keyboard (Mice is shit with vidya which is why you gotta have a second to swap)
- >Download this http://ftp.us.debian.org/debian/pool/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u6_amd64.deb and sudo dpkg -i to get synergy to work properly on debian
- and it should work if you restart the program
- >In thoery if you did this right you will have 1 keyboard and two mice that work across both machines along with native GPU performance.
- If you have any issues refer to these two links which includes an older but more clean version of what I said and a video.
- https://forum.level1techs.com/t/play-games-in-windows-on-linux-pci-passthrough-quick-guide/108981
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement