Guest User

w10_gaming_10gb.sh

a guest
Dec 22nd, 2016
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.88 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. #multifunction is on for hdmi
  4. #x-vga is on for displayport access
  5. #-device vfio-pci,host=01:00.0,multifunction=on,x-vga=on \
  6.  
  7. #usb-host,hostbus=1,hostaddr=3 = razer
  8. #usb-host,hostbus=2,hostaddr=5 = usbhub_front_usb2left
  9. #usb-host,hostbus=2,hostaddr=6 = usbhub_front_usb2right
  10. #04f2:0116 chicony white keyboard
  11. #1532:0007 Razer mouse
  12. #0d8c:0102 usb itek sound
  13. #1131:1001 bluetooth
  14. #054c:0268 ps3
  15. #1d50:6022 lightpack
  16.  
  17. echo "terminating prismatik, to prevent figths"
  18. killall prismatik
  19.  
  20. echo "samba on"
  21. sudo systemctl start smbd.service
  22. sudo systemctl start nmbd.service
  23.  
  24. echo "Turning off DELL monitor, switch to HDMI1"
  25. echo "Sound via DELL's hdmi memory will be 10GB, so only 6GB for host, close your apps"
  26. echo "Stealing Razer mouse"
  27. sudo xrandr --output DP2 --off --output HDMI1 --auto --primary
  28. sudo qemu-system-x86_64 \
  29.   -enable-kvm \
  30.   -m 10240 \
  31.   -cpu host,kvm=off \
  32.   -smp 4,sockets=1,cores=4,threads=1 \
  33.   -vga none \
  34.   -rtc base=localtime \
  35.   -device ich9-usb-uhci3,id=uhci \
  36.   -device usb-ehci,id=ehci \
  37.   -device nec-usb-xhci,id=xhci \
  38.   -device vfio-pci,host=01:00.0,x-vga=on,multifunction=on \
  39.   -device vfio-pci,host=01:00.1 \
  40.   -device vfio-pci,host=00:14.0 \
  41.   -drive if=virtio,id=drive0,file=/home/pulec/vm/rawdisk/windows10.img,format=raw,cache=none,aio=native \
  42.   -drive if=virtio,id=drive1,file=/motherstorage/KVM/data_games.img,format=raw,cache=none,aio=native \
  43.   -usbdevice host:04f2:0116 \
  44.   -usbdevice host:1532:0007 \
  45.   -usbdevice host:1131:1001 \
  46.   -usbdevice host:054c:0268 \
  47.   -usbdevice host:1d50:6022 \
  48.   -netdev user,id=vmnic -device virtio-net,netdev=vmnic
  49.  
  50.  
  51.  
  52. #on igpu main monitor
  53. echo "Main monitor back on, reseting pulseaudio, restart deadbeef or web music"
  54. ~/scripts/two_monitors.sh
  55. #xrandr --output DP2 --auto --right-of HDMI1
  56.  
  57. echo "samba off"
  58. sudo systemctl stop smbd.service
  59. sudo systemctl stop nmbd.service
Advertisement
Add Comment
Please, Sign In to add comment