├── README.md ├── oc-multiple-cards.sh └── oc.sh /README.md: -------------------------------------------------------------------------------- 1 | # overclock-nvidia-ubuntu-linux 2 | Overclock NVIDIA Cards on Ubuntu and Linux based non-mining OS 3 | 4 | If those do not work for your (newer) version of Linux/Drivers, please consider the following: 5 | 6 | If Xorg is not running in root mode try this: 7 | 8 | 1. `sudo vi /etc/gdm3/custom.conf` 9 | 2. Uncomment the "WaylandEnable" line and make sure it says "WaylandEnable=false" 10 | 3. `sudo vi /etc/X11/Xwrapper.config` 11 | 4. Add "needs_root_rights = yes" to the end of the file 12 | 5. Reboot 13 | 14 | See the following for more info: 15 | 16 | * https://wiki.archlinux.org/title/NVIDIA/Troubleshooting#Overclocking_not_working_with_Unknown_Error 17 | * https://wiki.archlinux.org/title/Xorg#Rootless_Xorg 18 | -------------------------------------------------------------------------------- /oc-multiple-cards.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # Update on https://github.com/ethereum-mining/ethminer/pull/18#issuecomment-312506214 4 | # For needed OS setting to make this work, refer to oc.sh in this repo 5 | 6 | SET='/usr/bin/nvidia-settings' 7 | 8 | NUMGPU="$(nvidia-smi -L | wc -l)" 9 | 10 | echo "Setting up ${NUMGPU} GPU(s)" 11 | 12 | n=0 13 | while [ $n -lt $NUMGPU ]; 14 | do 15 | 16 | ${SET} -a [gpu:${n}]/GPUFanControlState=1 \ 17 | -a [fan:${n}]/GPUTargetFanSpeed=60 \ 18 | -a [gpu:${n}]/GPUPowerMizerMode=1 \ 19 | -a [gpu:${n}]/GPUGraphicsClockOffsetAllPerformanceLevels=100 \ 20 | -a [gpu:${n}]/GPUMemoryTransferRateOffsetAllPerformanceLevels=1000 21 | 22 | let n=n+1 23 | done 24 | echo "Complete"; 25 | exit 0; -------------------------------------------------------------------------------- /oc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # README 4 | # Before proceeding make sure that you set your coolbits to 31 5 | # Open a terminal and do 6 | # $ sudo nvidia-xconfig -a --cool-bits=31 --allow-empty-initial-configuration 7 | 8 | # To be able to set the power limit you need to enable sudo commands without password 9 | # Do 10 | # $ sudo visudo 11 | # And then at the end of the file add the following while changing username to your user 12 | # Note the tabs after username as otherwise it won't work 13 | # username ALL = (ALL) NOPASSWD: /usr/bin/nvidia-persistenced 14 | # username ALL = (ALL) NOPASSWD: /usr/bin/nvidia-smi 15 | # Reboot the system now and continue setting the OC limits 16 | 17 | # =========================== Define OC limts =========================================== 18 | # Fans speed is in % 19 | POWER_LIMIT=150 20 | FANS_SPEED=65 21 | GPU_OFFSET=200 22 | # Memory offset has to be the actual desired amount. 23 | MEMORY_OFFSET=1300 24 | 25 | # ======================================================================================== 26 | # It is advisable not to change anything below this line if you don't know what you are doing 27 | 28 | SET='/usr/bin/nvidia-settings' 29 | 30 | #Set Power Limit 31 | sudo nvidia-smi -pl $POWER_LIMIT 32 | 33 | # Set power persistence mode to ON so your power limit setting can persist even no UI app is running 34 | ${SET} -a [gpu:0]/GpuPowerMizerMode=1 35 | 36 | # Set fan target level 37 | ${SET} -a [gpu:0]/GPUFanControlState=1 38 | 39 | ${SET} -a [fan:0]/GPUTargetFanSpeed=$FANS_SPEED 40 | ${SET} -a [fan:1]/GPUTargetFanSpeed=$FANS_SPEED 41 | 42 | # Set clocks speeds 43 | ${SET} -a [gpu:0]/GPUGraphicsClockOffsetAllPerformanceLevels=$GPU_OFFSET 44 | 45 | ACTUAL_MEMORY_OFFSET=$(( MEMORY_OFFSET*2 )) 46 | ${SET} -a [gpu:0]/GPUMemoryTransferRateOffsetAllPerformanceLevels=$ACTUAL_MEMORY_OFFSET 47 | 48 | #Send notification 49 | notify-send "OC Done: Fans = $FANS_SPEED% | GPU=$GPU_OFFSET | Memory=$MEMORY_OFFSET" -t 4000 -i messagebox_info 50 | 51 | --------------------------------------------------------------------------------