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_drm
rmmod nvidia_modeset rmmod nvidia_modeset
rmmod nvidia rmmod nvidia
echo $dev > /sys/bus/pci/devices/$dev/driver/unbind
echo "Unbound old driver" echo "Unbound old driver"
fi fi
#echo $vendor $device > /sys/bus/pci/drivers/vfio-pci/new_id #echo $vendor $device > /sys/bus/pci/drivers/vfio-pci/new_id

@ -1,2 +1,2 @@
#!/bin/bash #!/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 #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 cd /home/cole/g14gpu
#if [ `which-driver-for-gpu` == "nvidia" ]; then #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 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 #fi
vm vm
#sudo unbinddev 0000:01:00.0 0000:01:00.1 0000:01:00.2 0000:01:00.3 #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 & scream -o pulse -i virbr0 &
echo "Starting Looking Glass" echo "Starting Looking Glass"
#looking-glass-client -s no -d yes -g egl -a -M no egl:vsync yes & #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 while [ "$command" != "stop" ]; do
if jobs | grep looking | grep Running; then if jobs | grep looking | grep Running; then
read command read command
else 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 fi
done done
sudo whoami sudo whoami
@ -38,11 +39,11 @@ echo "VM is off"
echo "Freeing up memory" echo "Freeing up memory"
echo 0 | sudo tee /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages echo 0 | sudo tee /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
echo "Unbinding from vfio-pci" 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 sleep 1
echo "Enabling GPU power management" echo "Enabling GPU power management"
#sudo modprobe nvidia NVreg_DynamicPowerManagement=0x02 #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 sleep 2
#sudo systemctl start bumblebeed #sudo systemctl start bumblebeed
sudo systemctl stop smb nmb 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> <loader readonly='yes' type='pflash'>/usr/share/edk2-ovmf/x64/OVMF_CODE.fd</loader>
<nvram>/var/lib/libvirt/qemu/nvram/win10_VARS.fd</nvram> <nvram>/var/lib/libvirt/qemu/nvram/win10_VARS.fd</nvram>
<boot dev='hd'/> <boot dev='hd'/>
<bootmenu enable='yes'/> <bootmenu enable='no'/>
</os> </os>
<features> <features>
<acpi/> <acpi/>
@ -72,24 +72,32 @@ or other application using the libvirt API.
<runtime state='on'/> <runtime state='on'/>
<synic state='on'/> <synic state='on'/>
<stimer state='on'/> <stimer state='on'/>
<reset state='on'/>
<vendor_id state='on' value='087D1028'/> <vendor_id state='on' value='087D1028'/>
<frequencies state='on'/>
</hyperv> </hyperv>
<kvm> <kvm>
<hidden state='on'/> <hidden state='on'/>
</kvm> </kvm>
<vmport state='off'/> <vmport state='off'/>
</features> </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'/> <topology sockets='1' dies='1' cores='8' threads='2'/>
<cache mode='passthrough'/> <cache mode='passthrough'/>
<feature policy='require' name='topoext'/> <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'/> <feature policy='disable' name='amd-stibp'/>
</cpu> </cpu>
<clock offset='localtime'> <clock offset='localtime'>
<timer name='rtc' tickpolicy='catchup'/> <timer name='rtc' present='no' tickpolicy='catchup'/>
<timer name='pit' tickpolicy='delay'/> <timer name='pit' present='no' tickpolicy='delay'/>
<timer name='hpet' present='no'/> <timer name='hpet' present='no'/>
<timer name='kvmclock' present='no'/>
<timer name='hypervclock' present='yes'/> <timer name='hypervclock' present='yes'/>
<timer name='tsc' present='yes' mode='native'/>
</clock> </clock>
<on_poweroff>destroy</on_poweroff> <on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot> <on_reboot>restart</on_reboot>
@ -109,7 +117,7 @@ or other application using the libvirt API.
<disk type='file' device='cdrom'> <disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/> <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'/> <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/> <readonly/>
<address type='drive' controller='0' bus='0' target='0' unit='1'/> <address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk> </disk>
@ -178,47 +186,44 @@ or other application using the libvirt API.
<target chassis='11' port='0x19'/> <target chassis='11' port='0x19'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x1'/>
</controller> </controller>
<controller type='virtio-serial' index='0'> <controller type='pci' index='12' model='pcie-root-port'>
<address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> <model name='pcie-root-port'/>
<target chassis='12' port='0x1a'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x2'/>
</controller> </controller>
<controller type='scsi' index='0' model='virtio-scsi'> <controller type='pci' index='13' model='pcie-root-port'>
<driver queues='12' iothread='1'/> <model name='pcie-root-port'/>
<address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/> <target chassis='13' port='0x1b'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x3'/>
</controller> </controller>
<controller type='usb' index='0' model='ich9-ehci1'> <controller type='pci' index='14' model='pcie-root-port'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x7'/> <model name='pcie-root-port'/>
<target chassis='14' port='0x1c'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x4'/>
</controller> </controller>
<controller type='usb' index='0' model='ich9-uhci1'> <controller type='pci' index='15' model='pcie-root-port'>
<master startport='0'/> <model name='pcie-root-port'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x0' multifunction='on'/> <target chassis='15' port='0x1d'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x5'/>
</controller> </controller>
<controller type='usb' index='0' model='ich9-uhci2'> <controller type='usb' index='0' model='qemu-xhci' ports='15'>
<master startport='2'/> <address type='pci' domain='0x0000' bus='0x0d' slot='0x00' function='0x0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x1'/>
</controller> </controller>
<controller type='usb' index='0' model='ich9-uhci3'> <controller type='scsi' index='0' model='virtio-scsi'>
<master startport='4'/> <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x2'/>
</controller> </controller>
<interface type='network'> <interface type='network'>
<mac address='52:54:00:fc:3f:b7'/> <mac address='52:54:00:fc:3f:b7'/>
<source network='default'/> <source network='default'/>
<model type='virtio'/> <model type='virtio'/>
<driver queues='8'/>
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</interface> </interface>
<serial type='pty'> <input type='mouse' bus='virtio'>
<target type='isa-serial' port='0'> <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
<model name='isa-serial'/> </input>
</target> <input type='keyboard' bus='virtio'>
</serial> <address type='pci' domain='0x0000' bus='0x0c' slot='0x00' function='0x0'/>
<console type='pty'> </input>
<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='ps2'/> <input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/> <input type='keyboard' bus='ps2'/>
<graphics type='spice' autoport='yes'> <graphics type='spice' autoport='yes'>
@ -254,19 +259,6 @@ or other application using the libvirt API.
</source> </source>
<address type='pci' domain='0x0000' bus='0x0b' slot='0x00' function='0x0'/> <address type='pci' domain='0x0000' bus='0x0b' slot='0x00' function='0x0'/>
</hostdev> </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'> <memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/> <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</memballoon> </memballoon>
@ -279,11 +271,5 @@ or other application using the libvirt API.
<qemu:commandline> <qemu:commandline>
<qemu:arg value='-acpitable'/> <qemu:arg value='-acpitable'/>
<qemu:arg value='file=/home/cole/vfio/acpitable.bin'/> <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> </qemu:commandline>
</domain> </domain>

Loading…
Cancel
Save