Picom Enable Vsync to Fix Screen Tearing

- Enable vsync in picom configuration
- Toggle picom on and off with gaming launch & exit script
  rather than unredir-if-possible setting
This commit is contained in:
Sravan Balaji
2021-09-22 15:52:45 -04:00
parent 8585a60daf
commit cac0719d5f
4 changed files with 136 additions and 132 deletions

View File

@@ -292,7 +292,7 @@ backend = "glx";
# Enable/disable VSync. # Enable/disable VSync.
# vsync = false # vsync = false
vsync = false vsync = true
# Enable remote control via D-Bus. See the *D-BUS API* section below for more details. # Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
# dbus = false # dbus = false
@@ -323,7 +323,6 @@ detect-client-opacity = true;
# try detecting this with X RandR extension. # try detecting this with X RandR extension.
# #
# refresh-rate = 60 # refresh-rate = 60
refresh-rate = 0
# Limit picom to repaint at most once every 1 / 'refresh_rate' second to # Limit picom to repaint at most once every 1 / 'refresh_rate' second to
# boost performance. This should not be used with # boost performance. This should not be used with
@@ -343,17 +342,17 @@ refresh-rate = 0
# to maximize performance for full-screen windows. Known to cause flickering # to maximize performance for full-screen windows. Known to cause flickering
# when redirecting/unredirecting windows. paint-on-overlay may make the flickering less obvious. # when redirecting/unredirecting windows. paint-on-overlay may make the flickering less obvious.
# #
# unredir-if-possible = false unredir-if-possible = false
unredir-if-possible = true; # unredir-if-possible = true;
# unredir-if-possible-exclude = [
# "class_g = 'looking-glass-client' && !focused"
# ]
# Delay before unredirecting the window, in milliseconds. Defaults to 0. # Delay before unredirecting the window, in milliseconds. Defaults to 0.
# unredir-if-possible-delay = 0 # unredir-if-possible-delay = 0
# Conditions of windows that shouldn't be considered full-screen for unredirecting screen. # Conditions of windows that shouldn't be considered full-screen for unredirecting screen.
# unredir-if-possible-exclude = [] # unredir-if-possible-exclude = []
# unredir-if-possible-exclude = [
# "class_g = 'looking-glass-client' && !focused"
# ]
# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows # Use 'WM_TRANSIENT_FOR' to group windows, and consider windows
# in the same group focused at the same time. # in the same group focused at the same time.

View File

@@ -1,2 +1,3 @@
#!/bin/bash #!/bin/bash
/home/sravan/.scripts/deadd.sh --unpause /home/sravan/.scripts/deadd.sh --unpause
/home/sravan/.scripts/picom.sh --on

View File

@@ -1,2 +1,3 @@
#!/bin/bash #!/bin/bash
/home/sravan/.scripts/deadd.sh --pause /home/sravan/.scripts/deadd.sh --pause
/home/sravan/.scripts/picom.sh --off

View File

@@ -2542,7 +2542,7 @@ backend = "glx";
# Enable/disable VSync. # Enable/disable VSync.
# vsync = false # vsync = false
vsync = false vsync = true
# Enable remote control via D-Bus. See the *D-BUS API* section below for more details. # Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
# dbus = false # dbus = false
@@ -2573,7 +2573,6 @@ detect-client-opacity = true;
# try detecting this with X RandR extension. # try detecting this with X RandR extension.
# #
# refresh-rate = 60 # refresh-rate = 60
refresh-rate = 0
# Limit picom to repaint at most once every 1 / 'refresh_rate' second to # Limit picom to repaint at most once every 1 / 'refresh_rate' second to
# boost performance. This should not be used with # boost performance. This should not be used with
@@ -2593,17 +2592,17 @@ refresh-rate = 0
# to maximize performance for full-screen windows. Known to cause flickering # to maximize performance for full-screen windows. Known to cause flickering
# when redirecting/unredirecting windows. paint-on-overlay may make the flickering less obvious. # when redirecting/unredirecting windows. paint-on-overlay may make the flickering less obvious.
# #
# unredir-if-possible = false unredir-if-possible = false
unredir-if-possible = true; # unredir-if-possible = true;
# unredir-if-possible-exclude = [
# "class_g = 'looking-glass-client' && !focused"
# ]
# Delay before unredirecting the window, in milliseconds. Defaults to 0. # Delay before unredirecting the window, in milliseconds. Defaults to 0.
# unredir-if-possible-delay = 0 # unredir-if-possible-delay = 0
# Conditions of windows that shouldn't be considered full-screen for unredirecting screen. # Conditions of windows that shouldn't be considered full-screen for unredirecting screen.
# unredir-if-possible-exclude = [] # unredir-if-possible-exclude = []
# unredir-if-possible-exclude = [
# "class_g = 'looking-glass-client' && !focused"
# ]
# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows # Use 'WM_TRANSIENT_FOR' to group windows, and consider windows
# in the same group focused at the same time. # in the same group focused at the same time.
@@ -6933,6 +6932,7 @@ ${font Montserrat Light:size=9}${color1}${top_mem name 10} ${color}${font} ${got
#+END_SRC #+END_SRC
* Gaming * Gaming
** Gamemode ** Gamemode
*** General *** General
@@ -7052,6 +7052,7 @@ inhibit_screensaver=1
; Timeout for scripts (seconds). Scripts will be killed if they do not complete within this time. ; Timeout for scripts (seconds). Scripts will be killed if they do not complete within this time.
;script_timeout=10 ;script_timeout=10
#+END_SRC #+END_SRC
** MangoHUD ** MangoHUD
#+BEGIN_SRC conf :tangle .config/MangoHud/MangoHud.conf #+BEGIN_SRC conf :tangle .config/MangoHud/MangoHud.conf
@@ -7850,6 +7851,7 @@ These are scripts that should be run from Lutris when launching or exiting a gam
#+BEGIN_SRC shell :shebang #!/bin/bash :tangle .scripts/game_launch.sh #+BEGIN_SRC shell :shebang #!/bin/bash :tangle .scripts/game_launch.sh
/home/sravan/.scripts/deadd.sh --pause /home/sravan/.scripts/deadd.sh --pause
/home/sravan/.scripts/picom.sh --off
#+END_SRC #+END_SRC
*** Post-Exit Script *** Post-Exit Script
@@ -7858,6 +7860,7 @@ These are scripts that should be run from Lutris when launching or exiting a gam
#+BEGIN_SRC shell :shebang #!/bin/bash :tangle .scripts/game_exit.sh #+BEGIN_SRC shell :shebang #!/bin/bash :tangle .scripts/game_exit.sh
/home/sravan/.scripts/deadd.sh --unpause /home/sravan/.scripts/deadd.sh --unpause
/home/sravan/.scripts/picom.sh --on
#+END_SRC #+END_SRC
** Control Center ** Control Center