yshui / picom

A lightweight compositor for X11 with animation support
https://picom.app/
Other
4.19k stars 588 forks source link

Frame drops when running fullscreen videos #933

Open negativeExponent opened 2 years ago

negativeExponent commented 2 years ago

Platform

archlinux

GPU, drivers, and screen setup

❯ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel (0x8086)
    Device: Mesa Intel(R) HD Graphics 2000 (SNB GT1) (0x102)
    Version: 22.2.3
    Accelerated: yes
    Video memory: 1536MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 3.3
    Max compat profile version: 3.3
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.0
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) HD Graphics 2000 (SNB GT1)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 22.2.3
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.3 (Compatibility Profile) Mesa 22.2.3
OpenGL shading language version string: 3.30
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.0 Mesa 22.2.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00

Environment

minimal bspwm

picom version

negative in ~  took 13s
❯ picom --version    
vgit-5d150

negative in ~ 
❯ picom --diagnostics 
**Version:** vgit-5d150

### Extensions:

* Shape: Yes
* XRandR: Yes
* Present: Present

### Misc:

* Use Overlay: Yes
* Config file used: /home/negative/.config/picom.conf

### Drivers (inaccurate):

Intel

### Backend: glx

* Driver vendors:
 * GLX: Mesa Project and SGI
 * GL: Intel
* GL renderer: Mesa Intel(R) HD Graphics 2000 (SNB GT1)
* Accelerated: 1

### Backend: egl

* Driver vendors:
 * EGL: Mesa Project
 * EGL driver: crocus
 * GL: Intel
* GL renderer: Mesa Intel(R) HD Graphics 2000 (SNB GT1)

Configuration:

Configuration file ``` # ▀ ▄▀▀ # ▄▄▄▄ ▄▄▄ ▄▄▄ ▄▄▄ ▄▄▄▄▄ ▄▄▄ ▄▄▄ ▄ ▄▄ ▄▄█▄▄ # █▀ ▀█ █ █▀ ▀ █▀ ▀█ █ █ █ █▀ ▀ █▀ ▀█ █▀ █ █ # █ █ █ █ █ █ █ █ █ █ █ █ █ █ █ # ██▄█▀ ▄▄█▄▄ ▀█▄▄▀ ▀█▄█▀ █ █ █ █ ▀█▄▄▀ ▀█▄█▀ █ █ █ # █ # ▀ # Shadow shadow = true; shadow-radius = 12; shadow-offset-x = -12; shadow-offset-y = -12; shadow-opacity = 0.7; shadow-exclude = [ "name = 'Notification'", "class_g = 'Conky'", "class_g ?= 'Notify-osd'", "class_g = 'Cairo-clock'", "class_g = 'slop'", "class_g = 'Firefox' && argb", "class_g = 'Brave-browser'", "class_g = 'Rofi'", "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'", "_GTK_FRAME_EXTENTS@:c", ]; # Logs #log-level = "ERROR"; #log-file = "~/.cache/picom-log.log"; # Opacity inactive-opacity-override = false; # Blur blur-method = "none"; blur-background-exclude = [ "window_type = 'desktop'", "window_type = 'utility'", "window_type = 'notification'", "class_g = 'slop'", "class_g = 'Firefox' && argb", "class_g = 'Brave-browser'", "name = 'rofi - Search'", "_GTK_FRAME_EXTENTS@:c" ]; # Fading fading = true; fade-delta = 3; fade-in-step = 0.07; fade-out-step = 0.07; # no-fading-openclose = true; # no-fading-destroyed-argb = true; fade-exclude = [ ]; # Corners corner-radius = 0; rounded-corners-exclude = [ "name *= 'rofi'", "name *= 'screenkey'", "name *= 'tint2'", "class_g = 'Conky'", "class_g = 'GLava'", "window_type = 'dock'", "window_type = 'desktop'", # "window_type = 'tooltip'", "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'", "_GTK_FRAME_EXTENTS@:c" ]; # Other backend = "glx"; vsync = true; mark-wmwin-focused = true; mark-ovredir-focused = true; use-ewmh-active-win = true; detect-rounded-corners = true; detect-client-opacity = true; unredir-if-possible = false; focus-exclude = [ "class_g = 'Cairo-clock'", "class_g ?= 'rofi'", "class_g ?= 'slop'", "class_g ?= 'Steam'" ]; detect-transient = true; detect-client-leader = true; invert-color-include = [ ]; # resize-damage = 1; # GLX backend glx-no-stencil = true; # glx-no-rebind-pixmap = true; # xrender-sync-fence = true; use-damage = true; # Window type settings wintypes: { tooltip = { shadow = false; focus = false; fade = true; }; normal = { shadow = false; }; dock = { shadow = false; }; dnd = { shadow = false; }; popup_menu = { shadow = true; focus = false; opacity = 0.90; }; dropdown_menu = { shadow = false; focus = false; }; above = { shadow = true; }; splash = { shadow = false; blur-background = false; }; utility = { shadow = false; focus = false; }; notification = { shadow = false; }; desktop = { shadow = false; }; menu = { shadow = true; focus = false; }; dialog = { shadow = true; }; }; ```

Steps of reproduction

run picom (picom repo or picom-git), run video fullscreen. i use youtube for example, enabling stats for nerds. see frame drops steadily increasing.

Meanwhile, when using the "picom-ibhagwan-git" repo, launching picom with the same flags and with the same config file, no noticeable frame drop is noticed.

Expected behavior

Current Behavior

Stack trace

OpenGL trace

Other details

TotallyARobot commented 2 years ago

I'm getting a very similar issue, however this issue is affecting everything, not just fullscreen video, and it has only started after the recent update to version 10. If I downgrade to version 9.1-3 it works perfectly.

GlxInfo: name of display: :0 display: :0 screen: 0 direct rendering: Yes Memory info (GL_NVX_gpu_memory_info): Dedicated video memory: 4096 MB Total available memory: 4096 MB Currently available dedicated video memory: 3514 MB OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: NVIDIA GeForce GTX 970/PCIe/SSE2 OpenGL core profile version string: 4.6.0 NVIDIA 520.56.06 OpenGL core profile shading language version string: 4.60 NVIDIA OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile `OpenGL version string: 4.6.0 NVIDIA 520.56.06` `OpenGL shading language version string: 4.60 NVIDIA` `OpenGL context flags: (none)` `OpenGL profile mask: (none)` OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 520.56.06 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

It may have something to do with the now old default config I'm using, I'll see what happens with a new config, but I doubt it will change anything.

Update: after trying a new config, it's still stuttering droping frames, I'm going to stick with the old version for now.

yshui commented 2 years ago

@TotallyARobot did you use --experimental-backends before? if so, does --legacy-backends change anything?

TotallyARobot commented 2 years ago

@yshui That did actually fix it even though I wasn't using experimental-backends before, is there something I should change to get the current backends working? Or are the new backends just causing problems in general?

yshui commented 2 years ago

yeah looks like the newer backends are causing the problem. people have been testing it more >1 year, but i did expect to see more problems surfacing now it's enabled by default

yshui commented 2 years ago

it's hard to grasp exactly what the symptom is, are you able to maybe record a video ?

TotallyARobot commented 2 years ago

It shows up best when using something with smooth animations like cava (which is exactly what I used he) to show the differences. You will also see some problems with the fade in and fade out effects used by picom.

https://user-images.githubusercontent.com/86170013/202938186-816dd95c-eeb8-4cdf-baf6-e1f7471e6825.mp4

negativeExponent commented 2 years ago

updated post, some notes were hidden by some "hidden" tags. youtube's simple frame drop counter would be a simple method to see frame drops. run video on fullscreen, enable stats for nerds

also, running picom with "--legacy-backend" are smoother than not having it but this disables blur methods

tenplus1 commented 7 months ago

Is there any real way to disable picom while on fullscreen mode with a specific setting ??