#!/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