Advertisement
Guest User

Untitled

a guest
Oct 12th, 2017
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.33 KB | None | 0 0
  1. This will be for Debian Stretch
  2.  
  3. ==GUIDE ON HOW TO RUN GNU/LINUX AND GET VIDYA AT THE SAME TIME==
  4.  
  5. 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.
  6.  
  7. 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.
  8.  
  9.  
  10. >Go to BIOS and Check if VT-d is enabled
  11.  
  12. >Install GNU/Linux
  13. https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-9.2.0-amd64-netinst.iso
  14. https://rufus.akeo.ie/
  15.  
  16. >Open a terminal and enter sudo nano /etc/default/grub then hit enter
  17.  
  18. > Add intel_iommu=on or amd_iommu=on at the end of GRUB_CMDLINE_LINUX_DEFAULT, make sure the " is at the end
  19.  
  20. > Save with CTRL X and Y then put sudo update-grub then hit enter
  21.  
  22. >Restart PC
  23.  
  24. >Open terminal back up and type in lspci -nn then hit enter
  25.  
  26. >Find your GPU Address (Examples: 01:00.0 and 01:00.1)
  27.  
  28. >Write down the numbers at the end for later (Example:10de:13c0 and 10de:0fbb)
  29.  
  30. >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
  31.  
  32. ==IF YOU NEED THE ACS PATCH PAY ATTENTION==
  33.  
  34. >Go into terminal and type in sudo apt-get install linux-source libqt4-dev build-essential libssl-dev then hit enter
  35.  
  36. >Go to https://aur.archlinux.org/cgit/aur.git/tree/?h=linux-vfio right click add-acs-overrides.patch and save it
  37.  
  38. >open your file manager and go to /usr/src/linux-source.tar.xz
  39.  
  40. >copy and paste that into your downloads folder
  41.  
  42. >rename the patch file in your folder acs-patch
  43.  
  44. >In Terminal type cd Downloads hit enter
  45.  
  46. > Type in cd linux-source then hit enter
  47.  
  48. > Type in patch -p1 <
  49.  
  50. > Go to your file manager and drag the acs-patch.patch file into your terminal
  51.  
  52. > Hit enter
  53.  
  54. > type in make xconfig
  55.  
  56. >A window will pop up, hit ctrl f and type in version
  57.  
  58. >click local version and it should allow you to type below, enter -acs-patch then hit enter
  59.  
  60. >hit the floppy drive at the top right to save
  61.  
  62. > type in make -j4 deb-pkg then hit enter
  63.  
  64. >if you get an error edit the config file with nano .config
  65.  
  66. >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
  67.  
  68. >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.
  69.  
  70. >Rename them linux-image.deb and linux-headers.deb
  71.  
  72. >go into terminal and type in cd ~ then cd Downloads
  73.  
  74. >type in sudo dpkg -i linux-image.deb linux-headers.deb
  75.  
  76. >once that finishes type sudo apt-get install virt-manager ovmf
  77.  
  78. >Edit grub again with sudo nano /etc/default/grub then where you put the intel/amd thing
  79.  
  80. >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)
  81.  
  82. >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
  83.  
  84. >Go into terminal and type in sudo nano /etc/modules
  85.  
  86. > Add
  87. vfio
  88. vfio_iommu_type1
  89. vfio_pci
  90. vfio_virqfd
  91.  
  92. then save
  93.  
  94. >Reboot your machine
  95.  
  96. >Open terminal and type lspci -k you should see your GPU with vfio_pci driver in use
  97.  
  98. >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
  99.  
  100. >Open virt manager and go to connection details then go to Virtual Networks
  101.  
  102. >Make sure that On Boot is checked before Applying and exiting out
  103.  
  104. >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
  105.  
  106. >When it shows the last screen you need to check Customize config before install
  107.  
  108. > In Overview change Firmware to UEFI and Chipset to Q35
  109.  
  110. >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)
  111.  
  112. >Memory is 8 or More
  113.  
  114. >Boot Menu is enabled
  115.  
  116. >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
  117.  
  118. >Under your Windows ISO you need to make it a SATA CDROM
  119.  
  120. >NIC device model needs to be changed to VirtIO
  121.  
  122. >Sound varies but for Windows 10 I use ich9.
  123.  
  124. >Remove the Display Spice, Console, Video QXL, and Channel Spice
  125.  
  126. >Add Hardware and select your downloads folder where the virtio drivers are, make sure its a SATA Disk.
  127.  
  128. >Under boot menu make sure that the Windows ISO is check marked
  129.  
  130. >Add Hardware and select your graphics card stuff under the PCI menu.
  131.  
  132. >After the machine starts and you see a logo on the monitor that is hooked to the card turn the virtual machine off
  133.  
  134. >Type in sudo virsh edit [machine name]
  135.  
  136. >Change first line from <domain type='kvm'> to <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  137.  
  138. >In <hyperv> you need to add <vendor_id state='on' value='whatever'/> in the middle
  139.  
  140. >If you want to use one pair of headphones and put
  141.  
  142. <qemu:commandline>
  143. <qemu:env name='QEMU_AUDIO_DRV' value='pa'/>
  144. <qemu:env name='QEMU_PA_SERVER' value='/run/user/1000/pulse/native'/>
  145. </qemu:commandline>
  146.  
  147. inbetween </devices> and </domain>
  148.  
  149. >Go into terminal and type sudo nano /etc/libvirt/qemu.conf then make #user = " " to user ="(your username on machine)"
  150.  
  151. >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.
  152.  
  153. >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.
  154.  
  155. >Start the machine with the green play button
  156.  
  157. >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
  158.  
  159. >Once windows is installed fully you want to make sure the virtio disk is the one checked and not the windows disk.
  160.  
  161. >In the Windows you need to install the network in the same method as the storage
  162.  
  163. >Install Nvidia/AMD GPU Drivers
  164.  
  165. >Go to Windows Devices and there is an unlisted PCI device which is the Ballon driver
  166.  
  167. >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)
  168.  
  169. >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
  170.  
  171. and it should work if you restart the program
  172.  
  173. >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.
  174.  
  175. 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.
  176.  
  177. 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