Try   HackMD

Control your GPU on Linux

1. NVIDIA

1. Install drivers

2. Configuration

2.1 Generate config File: /etc/X11/xorg.conf

sudo nvidia-xconfig

2.2 Installation GWE

sudo apt install python3-pip python3-dev python3-cairo-dev build-essential cmake gcc meson ninja-build libgirepository1.0-dev gir1.2-appindicator3-0.1 libdazzle-1.0-dev gnome-shell-extension-appindicator appstream-util libxml2-utils

Build from source

mkdir Projects
cd Projects
git clone --recurse-submodules -j4 https://gitlab.com/leinardi/gwe.git
cd gwe
git checkout master
sudo -H pip3 install python3-cairo-dev PyGObject
sudo -H pip3 install -r requirements.txt
meson . build --prefix /usr
ninja -v -C build
sudo ninja -v -C build install

3. Change configuration file

sudo gedit /etc/X11/xorg.conf

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Structure:


Section "Device"
      Identifier     "Device0"
      Driver         "nvidia"
      VendorName     "NVIDIA Corporation"
      BusID          "PCI:1:0:0"
      BoardName      "NAME OF YOUR CARD"
      Option         "Coolbits" "8"  # bits FERMI+
EndSection

Change to(Example of my case):


Section "Device"
      Identifier     "Device0"
      Driver         "nvidia"
      VendorName     "NVIDIA Corporation"
      BusID          "PCI:1:0:0"
      BoardName      "NVIDIA RTX 6000 Ada Generation"
      Option         "Coolbits" "8" 
EndSection

Coolbits it's the most important parameter.

The Coolbits value is the sum of its component bits in the binary numeral system. The component bits are:

1 (bit 0) - Enables overclocking of older (pre-Fermi) cores on the Clock Frequencies page in nvidia-settings.
2 (bit 1) - When this bit is set, the driver will "attempt to initialize SLI when using GPUs with different amounts of video memory".
4 (bit 2) - Enables manual configuration of GPU fan speed on the Thermal Monitor page in nvidia-settings.
8 (bit 3) - Enables overclocking on the PowerMizer page in nvidia-settings. Available since version 337.12 for the Fermi architecture and newer.[4]
16 (bit 4) - Enables overvoltage using nvidia-settings CLI options. Available since version 346.16 for the Fermi architecture and newer.[5]
To enable multiple features, add the Coolbits values together. For example, to enable overclocking and overvoltage of Fermi cores, set Option "Coolbits" "24".

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

4. If you want by CLI

Structure PowerLimit: nvidia-smi -i CARD_NUMBER -PL (W power limit)

sudo nvidia-smi -i 0 -pl 250

Structure GPU & Memory offset:

nvidia-settings -a [gpu:0]/GPUGraphicsClockOffset[3]=50
nvidia-settings -a [gpu:0]/GPUMemoryTransferRateOffset[3]=500

2. AMD

sudo add-apt-repository ppa:ernstp/mesarc
sudo apt-get update
sudo apt install corectrl

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

LACT

https://github.com/ilya-zlobintsev/LACT

sudo systemctl enable --now lactd
sudo dpkg -i *.deb

Monitoring GPU

sudo apt-get install nvtop
pip3 install nvitop # ONLY NVIDIA
git clone --recursive https://github.com/aristocratos/btop.git
cd btop
mkdir build 
cd build
cmake .. -DCMAKE_PREFIX_PATH="/opt/rocm" -DCMAKE_INSTALL_PREFIX="/usr/local" -DBUILD_SHARED_LIBS=ON -DBTOP_GPU=true
make -j$(nproc)
sudo make install

AMD

wget https://github.com/Umio-Yasuno/amdgpu_top/releases/download/v0.10.4/amdgpu-top_0.10.4-1_amd64.deb
sudo dpkg -i amdgpu-top_0.10.4-1_amd64.deb