Jump to content

NVIDIA on Linux: Difference between revisions

From SameTeem
No edit summary
No edit summary
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Install Proprietary Driver ==
The default Nouveau driver works just well enough to get a desktop, installing the proprietary driver unlocks the full GPU capabilities.<tabber>
|-|Arch Based =
sudo pacman -S nvidia-open-dkms
|-|Debian Based =
sudo apt install nvidia-open-kernel-dkms nvidia-driver
|-|Fedora Based =
<pre>
sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
</pre>
<pre>
sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda
</pre>
|-|RHEL =
<pre>
sudo dnf install --nogpgcheck https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm -E %rhel).noarch.rpm
</pre>
<pre>
sudo dnf install --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-$(rpm -E %rhel).noarch.rpm
</pre>
<pre>
sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda
</pre>
</tabber>


== Extra free performance ==
== Extra Free Performance ==
  sudo nano /etc/modprobe.d/nvidia.conf  
  sudo [[nano]] /etc/modprobe.d/nvidia.conf  
Add
Add
  <nowiki>options nvidia NVreg_UsePageAttributeTable=1 \   
  <nowiki>options nvidia NVreg_UsePageAttributeTable=1 \   
Line 9: Line 33:
   NVreg_EnableResizableBar=1 </nowiki>
   NVreg_EnableResizableBar=1 </nowiki>


== Don't allow GPU to stay at maximum power while running tasks ==
== Don’t Allow GPU to Stay at Maximum Power While Running Tasks ==




This will allow the graphics card to run at lower speeds while doing things that use CUDA, such as video decoding
This will allow the graphics card to run at lower speeds while doing things that use CUDA, such as video decoding
  sudo nano /etc/environment
  sudo [[nano]] /etc/environment
Add
Add
  CUDA_DISABLE_PERF_BOOST=1
  CUDA_DISABLE_PERF_BOOST=1
== X11 Tweaks ==
sudo [[nano]] /etc/X11/xorg.conf.d/01-nvidia.conf
Add
Section "ServerFlags"
        # Only applicable if you're using older Xlibre (<25.0.0.16), safe to remove otherwise
       Option "IgnoreABI" "true"
        # Increase the max clients allowed, this helps prevent your system being unable to launch apps
       Option "MaxClients" "2048"
        # Will improve performance when it's fully supported.
       Option "Debug" "dmabuf_capable"
EndSection
== (WW) NVIDIA: Failed to bind sideband socket to ==
Only occurs if running rootless X11
sudo [[nano]] /etc/X11/xorg.conf.d/01-nvidia.conf
Add
  Section "Device"
     Identifier     "Device0"
     Driver         "nvidia"
     VendorName     "NVIDIA Corporation"
     Option         "SidebandSocketPath" "/var/run/nvidia-xdriver/"
  EndSection
We also need to set up a method for making the folder with the correct permissions every boot.
sudo [[nano]] /etc/tmpfiles.d/nvidia-sideband.conf
Insert this line to make the folder.
d /run/nvidia-xdriver 0770 root users
Add your user to the users group, you may already be in the group but this ensures it.
usermod -a -G users <your username here>
Reboot the system.

Latest revision as of 15:33, 8 July 2026

Install Proprietary Driver

The default Nouveau driver works just well enough to get a desktop, installing the proprietary driver unlocks the full GPU capabilities.

sudo pacman -S nvidia-open-dkms

sudo apt install nvidia-open-kernel-dkms nvidia-driver

sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda

sudo dnf install --nogpgcheck https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm -E %rhel).noarch.rpm
sudo dnf install --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-$(rpm -E %rhel).noarch.rpm
sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda

Extra Free Performance

sudo nano /etc/modprobe.d/nvidia.conf 

Add

options nvidia NVreg_UsePageAttributeTable=1 \  
   NVreg_DynamicPowerManagement=0x02 \ 
   NVreg_InitializeSystemMemoryAllocations=1 \ 
   NVreg_RegistryDwords=RMIntrLockingMode=1 \ 
   NVreg_EnableResizableBar=1 

Don’t Allow GPU to Stay at Maximum Power While Running Tasks

This will allow the graphics card to run at lower speeds while doing things that use CUDA, such as video decoding

sudo nano /etc/environment

Add

CUDA_DISABLE_PERF_BOOST=1

X11 Tweaks

sudo nano /etc/X11/xorg.conf.d/01-nvidia.conf

Add

Section "ServerFlags" 
       # Only applicable if you're using older Xlibre (<25.0.0.16), safe to remove otherwise 
       Option "IgnoreABI" "true" 
       # Increase the max clients allowed, this helps prevent your system being unable to launch apps
       Option "MaxClients" "2048" 
       # Will improve performance when it's fully supported.
       Option "Debug" "dmabuf_capable" 
EndSection

(WW) NVIDIA: Failed to bind sideband socket to

Only occurs if running rootless X11

sudo nano /etc/X11/xorg.conf.d/01-nvidia.conf

Add

 Section "Device" 
     Identifier     "Device0" 
     Driver         "nvidia" 
     VendorName     "NVIDIA Corporation" 
     Option         "SidebandSocketPath" "/var/run/nvidia-xdriver/" 
 EndSection 

We also need to set up a method for making the folder with the correct permissions every boot.

sudo nano /etc/tmpfiles.d/nvidia-sideband.conf

Insert this line to make the folder.

d /run/nvidia-xdriver 0770 root users

Add your user to the users group, you may already be in the group but this ensures it.

usermod -a -G users <your username here>

Reboot the system.