nVidia

How to install and configure nVidia drivers and setup a default resolution and refresh rate




Install nVidia driver

pacman -S nvidia nvidia-libgl lib32-nvidia-libgl nvidia-settings

Enable persistence

systemctl enable nvidia-persistenced.service -f
systemctl start nvidia-persistenced.service

Enable runtime power management for nVidia VGA/3D controller devices on driver bind

/etc/udev/rules.d/80-nvidia-pm.rules
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="auto"
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="auto"
/etc/modprobe.d/nvidia-pm.conf
options nvidia "NVreg_DynamicPowerManagement=0x02"
xrandr -q
xrandr --output DP-0 --mode 3440x1440 --rate 200
cvt

Make nVidia Settings permanent

nvidia-settings first config /etc/X11/xorg.conf.d/20-nvidia.conf second config /home/wildw1ng/.nvidia-settings-rc

/etc/X11/xorg.conf.d/20-nvidia.conf
Section "Screen"
    Option         "Coolbits" "28"
    Option         "TripleBuffer" "off"
/etc/X11/xorg.conf.d/10-monitor.conf
Section "Monitor"
        Identifier "Monitor0"
        Modeline "3440x1440_200.00"  1569.78  3440 3760 4144 4848  1440 1441 1444 1619  -HSync +Vsync
        Option "Primary" "true"
        Option "PreferredMode" "3440x1440_200"
EndSection

Section "Screen"
    Identifier "Screen0"
    Monitor "Monitor0"
    DefaultDepth 24
    Option         "Coolbits" "28"
    Option         "TripleBuffer" "off"
    Option         "metamodes" "3440x1440_200 +0+0 {AllowGSYNCCompatible=On}"
    SubSection "Display"
        Modes "3440x1440_200"
    EndSubSection
EndSection

Section "Device"
    Identifier "Device0"
    Driver "nvidia"
EndSection

Custom TDP Limit on boot (without driver persistence)

/etc/systemd/system/nvidia-tdp.timer
[Unit]
Description=Set NVIDIA power limit on boot

[Timer]
OnBootSec=5

[Install]
WantedBy=timers.target
/etc/systemd/system/nvidia-tdp.service
Description=Set NVIDIA power limit

[Service]
Type=oneshot
ExecStart=/usr/bin/nvidia-smi -pl 320
systemctl enable nvidia-tdp.timer -f
~/.config/autostart/nvidia-powermizer.desktop
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=nVidia Performance Profile
Comment=Configure nVidia PowerMizer Settings
Exec=/usr/bin/nvidia-settings -c :0 -a '[gpu:0]/GPUPowerMizerMode=1'
Icon=/usr/share/pixmaps/nvidia-settings.png
Categories=__NVIDIA_SETTINGS_DESKTOP_CATEGORIES__
lspci | grep -i nvidia
nvidia-smi -q -d power
export DISPLAY=:0
X :0 &

Configure nVidia performance profile Settings

/usr/bin/nvidia-settings -c :0 -a '[gpu:0]/GPUPowerMizerMode=2'

GPUPowerMizerMode=0 Adaptive
GPUPowerMizerMode=1 Performance
GPUPowerMizerMode=2 Auto

nvidia-settings -q [gpu:0]/GPUPowerMizerMode
(sleep 20 && DISPLAY=":0.0" nvidia-settings -a [gpu:0]/GPUPowerMizerMode=2) &

GPU usage monitoring

watch -d -n 1 nvidia-smi

GWE GUI to control cooling and overclock of nVidia cards flatpak run com.leinardi.gwe –hide-window

/usr/lib/modprobe.d/zz-nvidia-modeset.conf
options nvidia_drm modeset=0
/etc/mkinitcpio.conf
MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)