various improvements

master
Cole Deck 4 years ago
parent 813932361d
commit c36a1b9f0e

@ -9,6 +9,7 @@ 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 profile normal sudo systemctl restart auto-cpufreq
sleep 0.5 sleep 0.5
sudo tlp start #sudo tlp start
asusctl profile normal

@ -9,8 +9,9 @@ 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
xrandr --output eDP --mode 1920x1080 --rate 60 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 #sleep 0.5; echo "ON" | sudo tee /proc/acpi/bbswitch; sleep 1; echo "OFF" | sudo tee /proc/acpi/bbswitch
sudo systemctl restart auto-cpufreq

@ -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

@ -2,9 +2,10 @@
#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 "ON" > /proc/acpi/bbswitch' #sudo sh -c 'echo "ON" > /proc/acpi/bbswitch'
echo 1 | sudo tee /sys/bus/pci/devices/0000:00:01.0/rescan
sleep 1 sleep 1
sudo binddev 0000:01:00.0 sudo binddev 0000:01:00.0 0000:01:00.1 0000:01:00.2 0000:01:00.3
#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

@ -2,9 +2,10 @@
#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 "ON" > /proc/acpi/bbswitch' #sudo sh -c 'echo "ON" > /proc/acpi/bbswitch'
echo 1 | sudo tee /sys/bus/pci/rescan
sleep 1 sleep 1
sudo binddev 0000:01:00.0 sudo binddev 0000:01:00.0 0000:01:00.1 0000:01:00.2 0000:01:00.3
#fi #fi
vmrdp vmrdp
#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

@ -11,10 +11,10 @@ for dev in "$@"; do
while [[ -e "/sys/bus/pci/devices/${dev}" ]]; do while [[ -e "/sys/bus/pci/devices/${dev}" ]]; do
sleep 0.1 sleep 0.1
done done
echo "Rescanning..." #echo "Rescanning..."
echo 1 | sudo tee /sys/bus/pci/rescan #echo 1 | sudo tee /sys/bus/pci/rescan
while [[ ! -e "/sys/bus/pci/devices/${dev}" ]]; do #while [[ ! -e "/sys/bus/pci/devices/${dev}" ]]; do
sleep 0.1 # sleep 0.1
done #done
done done
sudo rmmod vfio-pci sudo rmmod vfio-pci

8
vm

@ -13,8 +13,8 @@ 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 -d -g egl -a -K 120 -j -m 69 -S &
looking-glass-client -g egl -j -m 283 -S egl:vsync & #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
@ -39,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 unbinddev 0000:01:00.0 0000:01:00.1 0000:01:00.2 0000:01:00.3
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 "OFF" > /proc/acpi/bbswitch' #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

@ -17,7 +17,7 @@ remmina &
#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 -g egl -j -m 283 -S egl:vsync & #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 remmina | grep Running; then
read command read command
else else
#looking-glass-client -d -g egl -a -K 120 -j -m 69 -S & #looking-glass-client -d -g egl -a -K 120 -j -m 69 -S &

Loading…
Cancel
Save