TIP: NVIDIA Mild Flickering on Fresh Install

Wanted to post this here in case someone comes across this issue.

When I first installed the Xfce (ultimate, but shouldn't matter) there was a mild flicker, which is not uncommon when using compositing window managers with NVIDIA cards.

The fix for it in my experience, has always been to create a xorg.conf file to force to use the compositing pipeline. There are many approaches to do this, but easiest one is using nvidia-xconfig or nvidia-settings, but you can manually create or edit the Xorg.conf file too.

  1. nvidia-xconfig offers these compositing configuration options:
❯ nvidia-xconfig -A | grep "composition\|\[options\]" -C1

nvidia-xconfig [options]

  --allow-glx-with-composite, --no-allow-glx-with-composite
      Enable or disable the "AllowGLXWithComposite" X configuration option.
  --composite, --no-composite
      Enable or disable the "Composite" X extension.
  --damage-events, --no-damage-events
      Use OS-level events to notify the X server when a direct-rendering client has performed rendering that needs to be composited to the screen.  Improves performance when using GLX with the composite extension.

  --force-composition-pipeline=FORCE-COMPOSITION-PIPELINE, --no-force-composition-pipeline
      Enable or disable the "ForceCompositionPipeline" X configuration option.

  --force-full-composition-pipeline=FORCE-FULL-COMPOSITION-PIPELINE, --no-force-full-composition-pipeline
      Enable or disable the "ForceFullCompositionPipeline" X configuration option.

In my experience, simply enabling the below is enough, but I welcome you to try some different settings and share with the rest of us:

$ nvidia-xconfig --force-composition-pipeline=FORCE-COMPOSITION-PIPELINE

  1. nvidia-xsettings (to save the Xorg file you may need to run as sudo)

In either scenario, the Arch Linux wiki Nvidia Article recommends saving the configuration file at /etc/X11/xorg.conf.d/20-nvidia.conf, but simply saving at /etc/X11/nvidia.conf is also enough.

The effective file will contain the lines similar to (this is not a complete configuration, merely an excerpt):

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "metamodes" "1920x1080_144 +0+0 {ForceCompositionPipeline=On}"
EndSection

Not that is wholly applicable to this case, here is a copy of my:
/etc/X11/xorg.conf.d/20-nvidia.conf

I'm not the most well versed in the complexities of compositing, but even if not optimal, it worked for me, and while I would love to figure out if this is the best solution, I thought it could help anyone seeing this issue. :slight_smile:

1 Like

Thank you and

garuda-orange-welcome-200

This might be interesting for @Yorper

3 Likes

Hey don’t blame me for nvidia :sweat_smile:

3 Likes