Last active
June 4, 2021 15:06
-
-
Save jackson5sec/19cfe163fff8d7d5d185d32473945e16 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#set persistence mode for all GPU | |
sudo nvidia-smi -pm 1 | |
#Set gpu max power at 160w | |
sudo nvidia-smi -pl 160 | |
#Set Power level of specific GPU (1080) in watts | |
# sudo nvidia-smi -i 2 -pl 200 | |
# https://devtalk.nvidia.com/default/topic/1024489/linux/nvidia-settings-on-headless-server/ | |
# Harcode Fan Settings | |
# This will create empty X server config | |
nvidia-xconfig --allow-empty-initial-configuration | |
X -config ./XF86Config | |
export DISPLAY=:0 | |
nvidia-settings -a [gpu:0]/GPUFanControlState=1 | |
nvidia-settings -a [fan:0]/GPUTargetFanSpeed=75 | |
#Overclock and Fan Settings, just an example, you need to do this for all GPUs and fans ([gpu:0], [gpu:1], [fan:0], [fan:1], etc. for each card.) | |
# nvidia-settings -a '[gpu:0]/GPUPowerMizerMode=1' | |
# nvidia-settings -a '[gpu:0]/GPUGraphicsClockOffset[3]=100' | |
# nvidia-settings -a '[gpu:0]/GPUMemoryTransferRateOffset[3]=900' | |
# nvidia-settings -a '[gpu:0]/GPUFanControlState=1' | |
# nvidia-settings -a '[fan:0]/GPUTargetFanSpeed=85' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi. Does this script work without running X server on Linux (Ubuntu)?