Browse Source

Add additional scripts

merge-requests/1/head
Cole Deck 1 year ago
parent
commit
27bdcae559
  1. 7
      gpuoff.sh
  2. 7
      gpuon.sh
  3. 8
      iommu.sh
  4. 8
      power.fish

7
gpuoff.sh

@ -0,0 +1,7 @@
#!/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"

7
gpuon.sh

@ -0,0 +1,7 @@
#!/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.PEG0.PEGP._ON' > /proc/acpi/call; echo 1 > /sys/bus/pci/rescan"

8
iommu.sh

@ -0,0 +1,8 @@
#!/bin/bash
shopt -s nullglob
for g in /sys/kernel/iommu_groups/*; do
echo "IOMMU Group ${g##*/}:"
for d in $g/devices/*; do
echo -e "\t$(lspci -nns ${d##*/})"
done;
done;

8
power.fish

@ -0,0 +1,8 @@
#!/usr/bin/fish
echo ""
while true
printf "\033[1A" # move cursor one line up
printf "\033[K"
echo (math (cat /sys/class/power_supply/BAT0/power_now) / 1000000)"w"
sleep 2
end
Loading…
Cancel
Save

Proudly self-hosted by Cole Deck. Fast loading powered by Turbo.