master
Cole Deck 4 years ago
parent 8a73972480
commit ebcfa14840

@ -9,6 +9,6 @@ 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/cpu13/online
echo 1 | sudo tee /sys/devices/system/cpu/cpu14/online echo 1 | sudo tee /sys/devices/system/cpu/cpu14/online
echo 1 | sudo tee /sys/devices/system/cpu/cpu15/online echo 1 | sudo tee /sys/devices/system/cpu/cpu15/online
asusctl -p silent asusctl profile normal
sleep 0.5 sleep 0.5
sudo tlp start sudo tlp start

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
xrandr --output eDP --mode 1920x1080 --rate 60 asusctl profile ss
echo 0 | sudo tee /sys/devices/system/cpu/cpu8/online 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/cpu9/online
echo 0 | sudo tee /sys/devices/system/cpu/cpu10/online echo 0 | sudo tee /sys/devices/system/cpu/cpu10/online
@ -8,8 +8,9 @@ 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/cpu13/online
echo 0 | sudo tee /sys/devices/system/cpu/cpu14/online echo 0 | sudo tee /sys/devices/system/cpu/cpu14/online
echo 0 | sudo tee /sys/devices/system/cpu/cpu15/online echo 0 | sudo tee /sys/devices/system/cpu/cpu15/online
asusctl -p silent xrandr --output eDP --mode 1920x1080 --rate 60
sudo ryzenadj --max-gfxclk=800 --stapm-limit=5000 sudo ryzenadj --max-gfxclk=800 --stapm-limit=5000
#sudo tlp start #sudo tlp start
#sudo sh -c 'echo "\\_SB.PCI0.GPP0.PG00._OFF" > /proc/acpi/call' #sudo sh -c 'echo "\\_SB.PCI0.GPP0.PG00._OFF" > /proc/acpi/call'
#./gpuoff.sh #./gpuoff.sh
sleep 0.5; echo "ON" | sudo tee /proc/acpi/bbswitch; sleep 1; echo "OFF" | sudo tee /proc/acpi/bbswitch

@ -6,9 +6,9 @@ for dev in "$@"; do
echo $vendor $device > /sys/bus/pci/drivers/vfio-pci/new_id echo $vendor $device > /sys/bus/pci/drivers/vfio-pci/new_id
if [ -e /sys/bus/pci/devices/$dev/driver ]; then if [ -e /sys/bus/pci/devices/$dev/driver ]; then
#echo $dev > /sys/bus/pci/devices/$dev/driver/unbind #echo $dev > /sys/bus/pci/devices/$dev/driver/unbind
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 $dev > /sys/bus/pci/devices/$dev/driver/unbind
echo "Unbound old driver" echo "Unbound old driver"
fi fi

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

@ -0,0 +1,10 @@
#!/bin/bash
#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 "ON" > /proc/acpi/bbswitch'
sleep 1
sudo binddev 0000:01:00.0
#fi
vmrdp
#sudo unbinddev 0000:01:00.0 0000:01:00.1 0000:01:00.2 0000:01:00.3

2
vm

@ -14,7 +14,7 @@ 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 & looking-glass-client -g egl -j -m 283 -S egl:vsync &
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

52
vmrdp

@ -0,0 +1,52 @@
#!/bin/bash
echo "Reserving hugepages"
echo 8192 | sudo tee /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
echo 3 | sudo tee /proc/sys/vm/drop_caches
echo 1 | sudo tee /proc/sys/vm/compact_memory
echo "Starting Network"
virsh --connect=qemu:///system net-start default
sudo systemctl start smb nmb
sleep 2
echo "Starting VM"
virsh --connect=qemu:///system start win10
echo "Starting Scream"
scream -o pulse -i virbr0 &
echo "Starting remmina"
remmina &
#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 -g egl -j -m 283 -S egl:vsync &
while [ "$command" != "stop" ]; do
if jobs | grep looking | grep Running; then
read command
else
looking-glass-client -d -g egl -a -K 120 -j -m 69 -S &
fi
done
sudo whoami
echo "Stopping VM..."
#stop
virsh --connect=qemu:///system shutdown win10
echo "Killing remmina"
kill -9 $(jobs -p)
vmstate=$(virsh --connect=qemu:///system domstate win10)
echo "Waiting for shutdown..."
while [ "$vmstate" != "shut off" ]; do
sleep 1
vmstate=$(virsh --connect=qemu:///system domstate win10)
done
sleep 1
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
sleep 1
echo "Enabling GPU power management"
#sudo modprobe nvidia NVreg_DynamicPowerManagement=0x02
sudo sh -c 'echo "OFF" > /proc/acpi/bbswitch'
sleep 2
#sudo systemctl start bumblebeed
sudo systemctl stop smb nmb
sleep 1
#clrgpu
Loading…
Cancel
Save