update various scripts and stuff

master
Cole Deck 4 years ago
parent 1b152e7ad4
commit dc004a2176

14
ac.sh

@ -0,0 +1,14 @@
#!/bin/bash
xrandr --output eDP --mode 1920x1080 --rate 120
echo 1 | sudo tee /sys/devices/system/cpu/cpu8/online
echo 1 | sudo tee /sys/devices/system/cpu/cpu9/online
echo 1 | sudo tee /sys/devices/system/cpu/cpu10/online
echo 1 | sudo tee /sys/devices/system/cpu/cpu11/online
echo 1 | sudo tee /sys/devices/system/cpu/cpu12/online
echo 1 | sudo tee /sys/devices/system/cpu/cpu13/online
echo 1 | sudo tee /sys/devices/system/cpu/cpu14/online
echo 1 | sudo tee /sys/devices/system/cpu/cpu15/online
asusctl -p silent
sleep 0.5
sudo tlp start

@ -0,0 +1,15 @@
#!/bin/bash
xrandr --output eDP --mode 1920x1080 --rate 60
echo 0 | sudo tee /sys/devices/system/cpu/cpu8/online
echo 0 | sudo tee /sys/devices/system/cpu/cpu9/online
echo 0 | sudo tee /sys/devices/system/cpu/cpu10/online
echo 0 | sudo tee /sys/devices/system/cpu/cpu11/online
echo 0 | sudo tee /sys/devices/system/cpu/cpu12/online
echo 0 | sudo tee /sys/devices/system/cpu/cpu13/online
echo 0 | sudo tee /sys/devices/system/cpu/cpu14/online
echo 0 | sudo tee /sys/devices/system/cpu/cpu15/online
asusctl -p silent
sudo ryzenadj --max-gfxclk=800 --stapm-limit=5000
#sudo tlp start
#sudo sh -c 'echo "\\_SB.PCI0.GPP0.PG00._OFF" > /proc/acpi/call'
#./gpuoff.sh

@ -9,6 +9,7 @@ for dev in "$@"; do
rmmod nvidia_drm
rmmod nvidia_modeset
rmmod nvidia
echo $dev > /sys/bus/pci/devices/$dev/driver/unbind
echo "Unbound old driver"
fi
#echo $vendor $device > /sys/bus/pci/drivers/vfio-pci/new_id

@ -1,2 +1,2 @@
#!/bin/bash
optiprime glxinfo
/home/cole/g14gpu/gpuapp glxinfo

@ -1,23 +0,0 @@
#!/bin/bash
#sudo rmmod nvidia_drm
sudo rmmod nvidia_modeset
sudo rmmod nvidia
#sudo tee /proc/acpi/bbswitch <<<OFF
#echo $(cat /proc/acpi/bbswitch)
#sudo sh -c "echo 1 > /sys/bus/pci/devices/0000:01:00.0/remove; echo '\\_SB.PCI0.PEG0.PEGP._OFF' > /proc/acpi/call"
#output=$(optimus-manager --print-mode)
#echo $output
if xrandr --listproviders | grep NVIDIA; then
echo "GPU is in use for PRIME, keeping on"
else
sudo sh -c 'echo "\\_SB.PCI0.GPP0.PG00._OFF" > /proc/acpi/call'
echo "GPU powered off"
fi
#if [ "$(optimus-manager --print-mode)" = "
#
#Current GPU mode : amd" ]; then
# sudo sh -c 'echo "\\_SB.PCI0.GPP0.PG00._OFF" > /proc/acpi/call'
# echo $(sudo cat /proc/acpi/call)
# echo "GPU POWERED OFF"
#fi
#echo "script finished"

@ -1,8 +0,0 @@
#!/bin/bash
#sudo rmmod nvidia_drm
#sudo rmmod nvidia_modeset
#sudo rmmod nvidia
#sudo tee /proc/acpi/bbswitch <<<ON
#echo $(cat /proc/acpi/bbswitch)
sudo sh -c 'echo "\\_SB.PCI0.GPP0.PG00._ON" > /proc/acpi/call'
sleep 2

@ -0,0 +1,5 @@
#!/bin/bash
systemctl restart asusd
sleep 1
asusctl -k off
asusctl -p silent

@ -2,9 +2,9 @@
#export PATH=/bedrock/cross/pin/bin:/bedrock/bin:/usr/local/bin:/usr/local/sbin:/opt/bin:/opt/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/snap/bin:/bedrock/cross/bin:/home/cole/g14gpu
cd /home/cole/g14gpu
#if [ `which-driver-for-gpu` == "nvidia" ]; then
sudo sh -c 'echo "\\_SB.PCI0.GPP0.PG00._ON" > /proc/acpi/call'
sudo sh -c 'echo "ON" > /proc/acpi/bbswitch'
sleep 1
sudo binddev 0000:01:00.0 0000:01:00.1 0000:01:00.2 0000:01:00.3
sudo binddev 0000:01:00.0
#fi
vm
#sudo unbinddev 0000:01:00.0 0000:01:00.1 0000:01:00.2 0000:01:00.3

@ -0,0 +1,5 @@
#!/bin/bash
#sudo powerpill -Syu
yay -Sy
yay --pacman powerpill -Su --combinedupgrade

9
vm

@ -13,12 +13,13 @@ echo "Starting Scream"
scream -o pulse -i virbr0 &
echo "Starting Looking Glass"
#looking-glass-client -s no -d yes -g egl -a -M no egl:vsync yes &
looking-glass-client -s -d -g egl -a -M -K 120 &
#looking-glass-client -s -d -g egl -a -M -K 120 &
looking-glass-client -d -g egl -a -K 120 -j -m 69 -S &
while [ "$command" != "stop" ]; do
if jobs | grep looking | grep Running; then
read command
else
looking-glass-client -s -d -g egl -a -M -K 120 &
looking-glass-client -d -g egl -a -K 120 -j -m 69 -S &
fi
done
sudo whoami
@ -38,11 +39,11 @@ echo "VM is off"
echo "Freeing up memory"
echo 0 | sudo tee /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
echo "Unbinding from vfio-pci"
unbinddev 0000:01:00.0 0000:01:00.1 0000:01:00.2 0000:01:00.3
unbinddev 0000:01:00.0
sleep 1
echo "Enabling GPU power management"
#sudo modprobe nvidia NVreg_DynamicPowerManagement=0x02
sudo sh -c 'echo "\\_SB.PCI0.GPP0.PG00._OFF" > /proc/acpi/call'
sudo sh -c 'echo "OFF" > /proc/acpi/bbswitch'
sleep 2
#sudo systemctl start bumblebeed
sudo systemctl stop smb nmb

@ -59,7 +59,7 @@ or other application using the libvirt API.
<loader readonly='yes' type='pflash'>/usr/share/edk2-ovmf/x64/OVMF_CODE.fd</loader>
<nvram>/var/lib/libvirt/qemu/nvram/win10_VARS.fd</nvram>
<boot dev='hd'/>
<bootmenu enable='yes'/>
<bootmenu enable='no'/>
</os>
<features>
<acpi/>
@ -72,24 +72,32 @@ or other application using the libvirt API.
<runtime state='on'/>
<synic state='on'/>
<stimer state='on'/>
<reset state='on'/>
<vendor_id state='on' value='087D1028'/>
<frequencies state='on'/>
</hyperv>
<kvm>
<hidden state='on'/>
</kvm>
<vmport state='off'/>
</features>
<cpu mode='host-passthrough' check='none' migratable='on'>
<cpu mode='host-passthrough' check='none' migratable='off'>
<topology sockets='1' dies='1' cores='8' threads='2'/>
<cache mode='passthrough'/>
<feature policy='require' name='topoext'/>
<feature policy='require' name='svm'/>
<feature policy='require' name='apic'/>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='invtsc'/>
<feature policy='disable' name='amd-stibp'/>
</cpu>
<clock offset='localtime'>
<timer name='rtc' tickpolicy='catchup'/>
<timer name='pit' tickpolicy='delay'/>
<timer name='rtc' present='no' tickpolicy='catchup'/>
<timer name='pit' present='no' tickpolicy='delay'/>
<timer name='hpet' present='no'/>
<timer name='kvmclock' present='no'/>
<timer name='hypervclock' present='yes'/>
<timer name='tsc' present='yes' mode='native'/>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
@ -109,7 +117,7 @@ or other application using the libvirt API.
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/home/cole/Downloads/SW_DVD5_WIN_ENT_LTSC_2019_64-bit_English_MLF_X21-96425_KMS38_ESD.iso'/>
<target dev='sdb' bus='sata'/>
<target dev='sdb' bus='scsi'/>
<readonly/>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
@ -178,47 +186,44 @@ or other application using the libvirt API.
<target chassis='11' port='0x19'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x1'/>
</controller>
<controller type='virtio-serial' index='0'>
<address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
<controller type='pci' index='12' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='12' port='0x1a'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x2'/>
</controller>
<controller type='scsi' index='0' model='virtio-scsi'>
<driver queues='12' iothread='1'/>
<address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
<controller type='pci' index='13' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='13' port='0x1b'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x3'/>
</controller>
<controller type='usb' index='0' model='ich9-ehci1'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x7'/>
<controller type='pci' index='14' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='14' port='0x1c'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x4'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci1'>
<master startport='0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x0' multifunction='on'/>
<controller type='pci' index='15' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='15' port='0x1d'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x5'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci2'>
<master startport='2'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x1'/>
<controller type='usb' index='0' model='qemu-xhci' ports='15'>
<address type='pci' domain='0x0000' bus='0x0d' slot='0x00' function='0x0'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci3'>
<master startport='4'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x2'/>
<controller type='scsi' index='0' model='virtio-scsi'>
<address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
</controller>
<interface type='network'>
<mac address='52:54:00:fc:3f:b7'/>
<source network='default'/>
<model type='virtio'/>
<driver queues='8'/>
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</interface>
<serial type='pty'>
<target type='isa-serial' port='0'>
<model name='isa-serial'/>
</target>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<channel type='spicevmc'>
<target type='virtio' name='com.redhat.spice.0'/>
<address type='virtio-serial' controller='0' bus='0' port='1'/>
</channel>
<input type='mouse' bus='virtio'>
<address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
</input>
<input type='keyboard' bus='virtio'>
<address type='pci' domain='0x0000' bus='0x0c' slot='0x00' function='0x0'/>
</input>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='spice' autoport='yes'>
@ -254,19 +259,6 @@ or other application using the libvirt API.
</source>
<address type='pci' domain='0x0000' bus='0x0b' slot='0x00' function='0x0'/>
</hostdev>
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x8087'/>
<product id='0x0029'/>
</source>
<address type='usb' bus='0' port='4'/>
</hostdev>
<redirdev bus='usb' type='spicevmc'>
<address type='usb' bus='0' port='2'/>
</redirdev>
<redirdev bus='usb' type='spicevmc'>
<address type='usb' bus='0' port='3'/>
</redirdev>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</memballoon>
@ -279,11 +271,5 @@ or other application using the libvirt API.
<qemu:commandline>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/home/cole/vfio/acpitable.bin'/>
<qemu:arg value='-device'/>
<qemu:arg value='ich9-intel-hda,bus=pcie.0,addr=0x1b'/>
<qemu:arg value='-device'/>
<qemu:arg value='hda-micro,audiodev=hda'/>
<qemu:arg value='-audiodev'/>
<qemu:arg value='pa,id=hda,server=unix:/run/user/1000/pulse/native'/>
</qemu:commandline>
</domain>

Loading…
Cancel
Save