Nvidia configuration

From wikinotes
Revision as of 21:04, 12 June 2021 by Will (talk | contribs) (→‎High Dynamic Range)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Tutorials

arch wiki https://wiki.archlinux.org/title/NVIDIA
ubuntu wiki: Xinerama how to https://help.ubuntu.com/community/XineramaHowTo
reddit triple monitor gaming on linux https://www.reddit.com/r/linux_gaming/comments/6n648l/triple_monitor_linux_gaming_gtx_1060_6gb/
nvidia forums: triple monitor https://forums.developer.nvidia.com/t/can-we-use-xrandr-to-configure-two-monitors-as-one-big-display-using-nvidia-drivers/35389

Windows

High Dynamic Range

Increases the rendered value range (darker low-value, brighter high-value)

Nvidia Control Panel:
  Display:
    Change Resolution:
      (dropdown) Output dynamic range: Full

Surround

Surround letsss you have 1x large screen spanning multiple monitors.

HeliosDisplayManagement can keep track of desktop/nvidia profiles and easily toggle them. https://github.com/falahati/HeliosDisplayManagement

Linux

High Dynamic Range

Increases the rendered value range (darker low-value, brighter high-value).
This is very important for ENB mods.

nvidia-settings:
  GPU - (GeForce …):
    DFP-1 - (Samsung …):
      Contols Tab (top):
        Color Controls:
          Color Range: Full

TwinView

TwinView is the linux version of surround (1x large screen, spanning multiple monitors).
Old documentation says max 2 monitors, but more are possible.

Twinview is usually enabled by default. You can test it.

nvidia-settings --query TwinView
# This may not be necessary
Section "Screen"
  Option "TwinView" "1"
  # ...
EndSection

You can tell nvidia to hide xinerama info which will treat your Xorg setup as having one large triple-wide monitor.
using nvidiaXineramaInfo.
All games I have tried have required this, but apparently some do not.

Section "Screen"
  Option "nvidiaXineramaInfo" "Off"
  # ...
EndSection

You may consider having a second xorg.conf. After making the change, you can restart X with:

systemctl restart lxdm.service  # restart your DisplayManager of choice

Xinerama

Xinerama is an older technology that presents multiple screens as one display.
It is slower, and it is not compatible alongside TwinView.

Screen Tearing

You can prevent screen tearing by enabling ForceFullCompositionPipeline on each monitor.
(or alternatively, only the monitor you want to prevent screen tearing on).

Runtime Fix

Temporary, Runtime Fix

nvidia-settings --assign CurrentMetaMode="$(nvidia-settings --query CurrentMetaMode | sed 's/}/, ForceFullCompositionPipeline=On}/g' | awk -F'::' '{ print $2 }')"

Or in long-form

# single monitor
nvidia-settings --assign \
    CurrentMetaMode="nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"

# for multi monitor, query CurrentMetaMode,
# then add {ForceCompositionPipeline=On} to each monitor you want to reduce screen tearing on
nvidia-settings --query CurrentMetaMode

nvidia-settings --assign \
    CurrentMetaMode="(wintermute:0.0): id=50, switchable=yes, source=xconfig :: \
                     DPY-3: nvidia-auto-select @1920x1080 +0+0 {ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0, ForceFullCompositionPipeline=On},\ 
                     DPY-5: nvidia-auto-select @2560x1440 +1920+0 {ViewPortIn=2560x1440, ViewPortOut=2560x1440+0+0, ForceFullCompositionPipeline=On},\
                     DPY-6: nvidia-auto-select @1920x1080 +4480+0 {ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0, ForceFullCompositionPipeline=On}"

Permanent Fix

Permanent, Configured Fix

# /etc/X11/Xorg.conf  (alt: /etc/X11/xorg.conf.d/*.conf)

Section "Screen"
    # ...

    # enable triple buffering, disable IndirectGlxProtocol, and add your {ForceFullCompositionPipeline=On} to the MetaModes options map.
    Option         "MetaModes" "nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On}" 
    Option         "AllowIndirectGLXProtocol" "off"
    Option         "TripleBuffer" "on"
EndSection