Skip to content

Instantly share code, notes, and snippets.

@bergkvist
Created August 3, 2021 03:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bergkvist/26605aae4b11f9105d0d8e97a90039f2 to your computer and use it in GitHub Desktop.
Save bergkvist/26605aae4b11f9105d0d8e97a90039f2 to your computer and use it in GitHub Desktop.
Avoid vertical screen tears when you have an Nvidia Graphics card
#!/bin/bash
s="$(nvidia-settings -q CurrentMetaMode -t)"
MODE="${1:-On}"
if [[ "${s}" != "" ]]; then
s="${s#*" :: "}"
nvidia-settings -a CurrentMetaMode="${s//\}/, ForceCompositionPipeline=$MODE, ForceFullCompositionPipeline=$MODE\}}"
fi
# Check if composition pipeline is enabled:
# nvidia-settings -q CurrentMetaMode -t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment