Overclocking GPU on Ubuntu Linux

22/10/2023

Ubuntu Linux might not be the most user-friendly operating system for mining and overclocking graphics cards. If you're in the process of selecting an operating system for mining and still need to familiarize yourself with the complexities of working on Linux, we suggest exploring other options.

For instance, Windows, HiveOS, or RaveOS could be better choices. The latter two are essentially Linux-based but are specifically optimized for mining and overclocking graphics cards. They come with user-friendly interfaces designed for regular users, incorporate various enhancements, and are straightforward to navigate.

However, if you're determined to pursue mining on Ubuntu Linux and have consciously decided, we're here to assist you! It won't be a walk in the park, but it will undoubtedly be an intriguing journey ✨.

Overclocking with Miner Arguments

Let's begin by exploring a straightforward method for overclocking: using miner arguments.

This method applies exclusively to miners that support overclocking commands on Linux. It's crucial to carefully read the miner's description to ensure compatibility with your specific graphics card, chosen algorithm, and Linux overclocking capabilities.

  • Each miner comes with its unique set of commands for overclocking. It's vital to be attentive to the specific command required for each miner.
  • The miner.download website offers top-notch miners, comprehensive miner commands, and usage scenarios.
  • Detailed instructions on downloading, configuring, and running a miner can be found in the article "Mining on Ubuntu Linux."

This discussion will focus on overclocking your graphics card using the lolminer
lolminer is compatible with various algorithms and supports various graphics card manufacturers, including Nvidia, AMD, and Intel ARC.

Overclocking Your Graphics Card on Linux with a Shell Script

Regarding overclocking, the fundamental commands involve adjusting your graphics card's core frequency, memory frequency, and power limit. Remember that these settings will differ based on your specific graphics card and the algorithm you're using. For personalized overclocking profiles tailored to your graphics card, refer to our Overclocking Database.

This guide will demonstrate how to overclock the Nvidia RTX 3060 Ti graphics card for the NEXA algorithm.

  1. Navigate to the folder containing the downloaded miner.

  2. Open the shell script (sh file) corresponding to the cryptocurrency you intend to mine.

  3. Insert the overclocking commands after the wallet address and worker name, separated by spaces. *In this example, we'll overclock the core by 100 MHz, set the memory frequency to 5000 MHz, and limit power consumption to 160 Watts.
    --cclk 100 — increases the core frequency by 100 MHz.
    --mclk 5000 — sets the memory frequency to 5000 MHz.
    --pl 160 — limits the power consumption of the graphics card to 160 Watts.

    For a comprehensive list of commands tailored to miners, algorithms, and graphics cards, visit miner.download, the “Instructions” page. It provides detailed information on essential commands for various miners and scenarios.

  4. Save the file with your changes. Open the terminal from your miner folder, use the command su or sudo su to gain administrator privileges, and enter your account password.

  5. Launch the miner by executing the command ./Start-Nexa.sh. The miner will initiate using the settings from your Start-Nexa.sh script. In the miner window, you'll notice that the specified overclocking settings have been applied.

Overclocking Your Graphics Card on Linux via Terminal

  1. Open the terminal from your miner directory.

  2. Use the command su or sudo su to gain administrator privileges and enter your account password.

  3. Enter the miner start command in the terminal, adding the overclocking commands after the wallet address and worker name, separated by spaces. *For example, let's increase the core clock by 100 MHz, set the memory frequency at 5000 MHz, and cap the power consumption at 160 Watts.
    --*cclk 100 — increases the core clock by 100 MHz.
    --mclk 5000 — sets the memory frequency at 5000 MHz.
    --pl 160 — limits the graphics card power consumption to 160 Watts.
    Example:
    ./lolMiner --algo NEXA --pool nexa.kryptex.network:7777 --user nexa:nqtsq5g5ufvngn8yc2va8nf0ru4mq2d8kh0vr4zzvchqhsy6/MyFirstRig --cclk 100 --mclk 5000 --pl 160

  4. Press Enter, and the miner will initiate with the specified settings, applying your overclocking configurations.

Overclocking NVIDIA Graphics Cards Using nvidia-settings

This method requires expertise in working with Linux. The effectiveness of this method hinges on your system's driver type and version. We recommend using the argument method for the miner.

  1. Open the terminal by pressing Ctrl+Alt+T.

  2. Execute the command su or sudo su to gain administrator privileges and enter your account password.

  3. Open the xorg.conf file using sudo nano /etc/X11/xorg.conf.

  4. Locate the sections Section "Device" and Section "Screen" within the file.

  5. Add the following setting to both sections, as shown in the screenshot: Option "Coolbits" "12"

  6. Save the changes to the file by pressing Ctrl+S and close the file with Ctrl+X.

  7. Restart your computer.

  8. Reopen the terminal using Ctrl+Alt+T.

  9. Execute the command su or sudo su to gain administrator privileges and enter your account password.

  10. Run the command nvidia-settings.

  11. The nvidia-settings window will open. Navigate to the PowerMizer tab.

  12. Input your desired settings in the Editable performance levels.

  13. Close the program after making the adjustments.

  14. Launch the terminal and execute the command nvidia-smi -i 0 -pl 140 if you wish to change the Power limit.
    -i 0 — refers to the graphics card number (counting starts from zero).
    -pl 140 — sets the power consumption limit in watts. For example, 140 means 140 Watts.

  15. Done! Your configured settings will be applied to your video card until you modify them again in the nvidia-settings program.

Overclocking AMD using radeon-profile

This method requires experience working with Linux. The success of this method will depend on the type and version of the driver you have installed. We recommend using the method with arguments for the miner.

  1. Open the terminal using Ctrl+Alt+T.

  2. Execute the command su or sudo su to grant administrator privileges and enter the account password.

  3. Paste the following commands into the terminal and then press Enter:

    apt-get install mesa-utils
    add-apt-repository ppa:radeon-profile/stable
    apt-get update
    apt-get install radeon-profile
    
  4. Once the installation is complete, you will see Radeon Profile in the list of applications. You can open it from there or execute the command radeon-profile.

  5. After the Radeon Profile is opened, go to the Overclock tab by clicking on it in the bottom part of the program.

  6. Enable Percent overclock and overclock your graphics card.

    Please note that overclocking is done in percentages. For example, to overclock an RX 580 by 100 MHz, you need to divide 100 MHz by its maximum frequency of 1340 MHz, resulting in 7.5%. You can find the maximum core frequency of your graphics card in the Overclock tab under the Manual Frequency control section, number 7, or for video memory, number 2.

  7. After all is done, press Apply to apply the changes you made. Ready! Your settings will be used for your video card until you change them in the Radeon Profile program.

Overclocking AMD Graphics Cards with CoreCtrl

Please note that this method requires Linux expertise. Its success depends on your installed driver's type and version. We recommend utilizing the argument method for the miner.

  1. Open the terminal using Ctrl+Alt+T.

  2. Run the command su or sudo su to grant administrator privileges and enter your account password.

  3. Add the repository with the command add-apt-repository ppa:ernstp/mesarc.

  4. Update the package versions with the command apt update.

  5. Install CoreCtrl by executing apt install corectrl.

  6. Add the program to autostart with the command
    cp /usr/share/applications/org.corectrl.corectrl.desktop ~/.config/autostart/org.corectrl.corectrl.desktop.

  7. Run the command pkaction --version and note the version.

  8. Create a file using sudo nano /etc/polkit-1/localauthority/50-local.d/90-corectrl.pkla.

  9. If the version displayed by the command pkaction --version is older than 0.106, insert the following settings into the file. Replace your-user-group with your user group name (usually the same as your username), which you can find using id username:

    [User permissions]
    Identity=unix-group:your-user-group
    Action=org.corectrl.*
    ResultActive=yes
    

    If the version is newer than 0.106, insert these settings into the file, replacing your-user-group with your group:

    polkit.addRule(function(action, subject) {
        if ((action.id == "org.corectrl.helper.init" ||
             action.id == "org.corectrl.helperkiller.init") &&
            subject.local == true &&
            subject.active == true &&
            subject.isInGroup("your-user-group")) {
                return polkit.Result.YES;
        }
    });
    
  10. Save the file using Ctrl+S and exit by pressing Ctrl+X.

  11. Open the file sudo nano /etc/default/grub.

  12. Find the line GRUB_CMDLINE_LINUX_DEFAULT= and add amdgpu.ppfeaturemask=0xffffffff" at the end as shown in the screenshot.

  13. Save the file using Ctrl+S and exit by pressing Ctrl+X.

  14. Run the command grub-mkconfig -o /boot/grub/grub.cfg.

  15. Restart your computer.

  16. Open the CoreCtrl program.

  17. In the Profiles tab, create a new profile and overclock your graphics card.

  18. Done! Your configured settings will be applied to your video card until you modify them in the created profile.

🚑Need help?

Something does not work?

Our friendly community and experienced support will be happy to help you!

Contact us throw the website support, in Telegram, or ask for help on our Discord.

This article is available in other languages: