gpufix: create script
This commit is contained in:
parent
05ff1b18f7
commit
819365a8d5
1 changed files with 21 additions and 0 deletions
21
scripts/gpufix/script.sh
Normal file
21
scripts/gpufix/script.sh
Normal file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
# For some reason, the GTX1060 GPU in my system draws 5W more when
|
||||
# nvtop is not open. This creates a tmux session with nvtop open
|
||||
# on startup in an attempt to fix it.
|
||||
set -euo pipefail
|
||||
|
||||
source "$HL_LIB"
|
||||
|
||||
_ch_001-install_deps() {
|
||||
sudo apt-get install -y nvtop tmux;
|
||||
}
|
||||
|
||||
_ch_002-install_crontab() {
|
||||
echo "@reboot $USER tmux has-session -t gpumon || tmux new -d -s gpumon nvtop -d 200" | sudo tee /etc/cron.d/$USER-gpufix
|
||||
}
|
||||
|
||||
_ch_003-run_immediately() {
|
||||
tmux has-session -t gpumon || tmux new -d -s gpumon nvtop -d 200
|
||||
}
|
||||
|
||||
_run_checkpoints
|
Loading…
Reference in a new issue