yshui / picom

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

Some window titles and terminal outputs flashes #268

Closed fuzunspm closed 3 months ago

fuzunspm commented 5 years ago

Platform

Linux 5.3.11-arch1-1

GPU, drivers, and screen setup

Single 144hz 1440p Monitor on:

name of display: :0.0 display: :0 screen: 0 direct rendering: Yes Memory info (GL_NVX_gpu_memory_info): Dedicated video memory: 8192 MB Total available memory: 8192 MB Currently available dedicated video memory: 7633 MB OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: GeForce GTX 1070 Ti/PCIe/SSE2 OpenGL core profile version string: 4.6.0 NVIDIA 440.31 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 440.31 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 440.31 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Environment

Xfce

picom version

picom vgit-9a88d

[11/18/2019 19:18:16.921 open_config_file_at WARN ] This compositor has been renamed to "picom", the old config file paths is deprecated. Please replace the "compton"s in the path with "picom" [ 11/18/2019 19:18:16.921 parse_config_libconfig WARN ] Option no-dock-shadow is deprecated, and will be removed. Please use the wintype option shadow of dock instead. [ 11/18/2019 19:18:16.921 parse_config_libconfig WARN ] Option no-dnd-shadow is deprecated, and will be removed. Please use the wintype option shadow of dnd instead. [ 11/18/2019 19:18:16.921 parse_config_libconfig WARN ] Option menu-opacity is deprecated, and will be removed.Please use the wintype option opacity of popup_menu and dropdown_menu instead. [ 11/18/2019 19:18:16.921 parse_config_libconfig WARN ] vsync option will take a boolean from now on. "opengl-swc" is interpreted as "true" for compatibility, but this will stop working soon [ 11/18/2019 19:18:16.921 parse_config_libconfig WARN ] glx-swap-method has been deprecated since v6, your setting "undefined" should be replaced by use-damage = true. [ 11/18/2019 19:18:16.921 parse_config_libconfig WARN ] "clear-shadow" is removed as an option, and is always enabled now. Consider removing it from your config file [ 11/18/2019 19:18:16.921 parse_config_libconfig WARN ] "paint-on-overlay" has been removed as an option, and is enabled whenever possible [ 11/18/2019 19:18:16.921 parse_config_libconfig WARN ] "alpha-step" has been removed, compton now tries to make use of all alpha values [ 11/18/2019 19:18:16.926 register_cm FATAL ERROR ] Another composite manager is already running

Despite the error above here is the terminal outputs of:

$ pgrep picom
5653
$ pgrep compton
no output

Configuration:

backend = "glx";
glx-no-stencil = true;
glx-copy-from-front = false;

shadow = true;
no-dnd-shadow = true;
no-dock-shadow = true;
clear-shadow = true;
shadow-radius = 5;
shadow-offset-x = -5;
shadow-offset-y = -5;
shadow-opacity = 0.5;

shadow-exclude = [
    "! name~=''",
    "name = 'Notification'",
    "name = 'Plank'",
    "name = 'Docky'",
    "name = 'Kupfer'",
    "name = 'xfce4-notifyd'",
    "name *= 'VLC'",
    "name *= 'compton'",
    "name *= 'picom'",
    "name *= 'Chromium'",
    "name *= 'Chrome'",
    "class_g = 'Firefox' && argb",
    "class_g = 'Conky'",
    "class_g = 'Kupfer'",
    "class_g = 'Synapse'",
    "class_g ?= 'Notify-osd'",
    "class_g ?= 'Cairo-dock'",
    "class_g ?= 'Xfce4-notifyd'",
    "class_g ?= 'Xfce4-power-manager'",
    "_GTK_FRAME_EXTENTS@:c",
    "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
];

shadow-ignore-shaped = false;

inactive-opacity = 1;
active-opacity = 1;
frame-opacity = 1;
inactive-opacity-override = false;
alpha-step = 0.06;

blur-background-fixed = false;
blur-background-exclude = [
    "window_type = 'dock'",
    "window_type = 'desktop'"
];

fading = false;
fade-delta = 4;
fade-in-step = 0.03;
fade-out-step = 0.03;

fade-exclude = [ ];

mark-wmwin-focused = true;
mark-ovredir-focused = true;
use-ewmh-active-win = true;
detect-rounded-corners = true;

detect-client-opacity = true;
refresh-rate = 0;
vsync = true;

dbe = false;

unredir-if-possible = true;

focus-exclude = [ ];
detect-transient = true;
detect-client-leader = true;

wintypes:
{
    tooltip =
    {
        fade = true;
        shadow = false;
        opacity = 0.85;
        focus = true;
    };
};
xrender-sync-fence = true;

Steps of reproduction

emacs

  1. Open emacs
  2. open 2 buffer at the same time or switch to buffer mini window

terminal

  1. Open Terminal
  2. neofetch

Current Behavior

Application's title menu bar flashing

Video Recording

Because of whenever i start recording, my issue is gone so i tried to capture it off screen with phone camera

videos' link

yshui commented 4 years ago

Does this still happen if you run picom --no-use-damage?

fuzunspm commented 4 years ago

i realized that picom is not using my config in /etc/xdg/picom.conf or ~/.config/picom.conf (these two are identical and correct config for me)

I manually ran picom --config /etc/xdg/picom.confand it seems ok for now

Edit: unfortunately it keeps flashing windows

yshui commented 4 years ago

Have you tried running with --no-use-damage?

fuzunspm commented 4 years ago

picom: unrecognized option '--no-use-damage'

yshui commented 4 years ago

Can you remove glx-swap-method from the configuration file?

behollder commented 4 years ago

picom: unrecognized option '--no-use-damage'

I have the same issue and with --no-use-damage and removed glx-swap-method it appears in 2/10 cases. But it only still present with my emacs which has own transparent and if it's turned on.

Thanks.

fuzunspm commented 4 years ago

I'm using with the same config for a while and it looks like fixed at the moment. Do not know if updated nvidia drivers helped or not, but i keep my picom config without any modificaitons

yshui commented 4 years ago

@behollder is the issue fixed for you as well?

behollder commented 4 years ago

@yshui I didn't build src with new changes. Today I can't do this. On my manjaro in package manager it have version 7.5.3 with build date 02/24/2020, and this issue not fixed. But for me it cares only for emacs program and only when mouse moves through menu bar, in others program which I use I cannot see this issue. Thank you.

dymn commented 4 years ago

I have this problem with xfce4-terminal. Gentoo, last 9999 (git) build, compiled 14.04.2020.

yochaigal commented 4 years ago

It happens for me in Xubuntu 20.04, but not only to xfce4-terminal. It also happens for other applications. I can't really predict when it will happen, so it's hard to record. Clicking on another window resolves the issue; maybe something to do with focus?

yshui commented 4 years ago

As the old video is offline, can you (@yochaigal and @dymn) record some videos?

yochaigal commented 4 years ago

Since I didn't want to use screen recording software all the time, I had to use my phone camera (sorry): https://i.imgur.com/RmjVG3M.mp4

Edit to be clear, I'm on the latest build.

dymn commented 4 years ago

Since I didn't want to use screen recording software all the time, I had to use my phone camera (sorry): https://i.imgur.com/RmjVG3M.mp4

I confirm the same behavior.

yshui commented 4 years ago

Hmm, this could be a number of things.

Can you record an apitrace for me? Thanks

dymn commented 4 years ago

I cannot reproduce the error with apitrace trace picom. Apitrace is needed exactly when the window title blinks?

yshui commented 4 years ago

@dymn unfortunately you cannot enable apitrace on the fly

yshui commented 4 years ago

btw, can you try run with --xrender-sync-fence, see if that fixes the problem?

dymn commented 4 years ago

I did not mean when the bug is visible, but in general when it is not there.

Also i have this bug with evince-3.34.2. while scrolling pdf with embedded images. https://imgur.com/a/MuTuO9H But when i start apitrace trace picom - there no such problem.

There are no such problems with backend=xrender. With --xrender-sync-fence and evince - i have blinking.

dymn commented 4 years ago

My fast workaround is replacing evince with qpdfview and xfce4-terminal with kitty. But it would be better if picom were fixed.

yshui commented 4 years ago

@dymn What's your GPU and driver?

yshui commented 4 years ago

@dymn And what's the output of LIBGL_DEBUG=verbose glxinfo -B?

dymn commented 4 years ago

Gentoo x86_64 GF 1650 Super 4 Gb (and before GF 1050 2 Gb), nvidia-drivers-440.82 (and earlier).

mesa-19.3.5 (X classic dri3 egl gbm gles2 libglvnd -d3d9 -debug -gallium -gles1 -llvm -lm-sensors -opencl -osmesa -pax_kernel -selinux -test -unwind -vaapi -valgrind -vdpau -vulkan -vulkan-overlay -wayland -xa -xvmc ABI_X86="64 -32 -x32" VIDEO_CARDS="-freedreno -i915 -i965 -intel -iris -lima -nouveau -panfrost -r100 -r200 -r300 -r600 -radeon -radeonsi -vc4 -virgl -vivante -vmware")

xorg-server-1.20.7 (elogind libglvnd suid udev xorg xvfb -debug -dmx -doc -ipv6 -kdrive -libressl -minimal -selinux -static-libs -systemd -unwind -wayland -xcsecurity -xephyr -xnest)

$ LIBGL_DEBUG=verbose glxinfo -B
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: 3592 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTX 1650 SUPER/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 440.82
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 440.82
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 440.82
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
dymn commented 4 years ago

My picom.conf

shadow = true;
shadow-radius = 7;
shadow-offset-x = -7;
shadow-offset-y = -7;
log-level = "warn";
# log-file = "/path/to/your/log/file";
# shadow-opacity = 0.7;
# shadow-red = 0.0;
# shadow-green = 0.0;
# shadow-blue = 0.0;
shadow-exclude = [
    "name = 'Notification'",
    "n:w:*VirtualBox*",
    "i:e:Conky",
    "class_g = 'Cairo-clock'",
    "class_g ?= 'Notify-osd'",
        "class_g ?= 'VirtualBox'",
        "class_g ?= 'Xfce4-notifyd'",
        "class_g ?= 'Xfce4-power-manager'",
        "class_g ?= 'Xfce4-panel'",
        "class_g ?= 'Xfce4-screenshooter'",
    "class_g = 'Firefox' && class_i = 'Popup' && width < 64",
    "class_g = 'Firefox' && argb",
    "name *= 'Telegram' && argb",
    "_GTK_FRAME_EXTENTS@:c"
];

# Opacity
frame-opacity = 1.0;
inactive-opacity-override = false;
blur-kern = "3x3box";
blur-background-exclude = [
    "window_type = 'dock'",
    "window_type = 'desktop'",
    "_GTK_FRAME_EXTENTS@:c"
];

# Fading
fading = false;
fade-in-step = 0.03;
fade-out-step = 0.03;
# no-fading-openclose = true;
# no-fading-destroyed-argb = true;
fade-exclude = [ ];

# Other
backend = "glx";
#backend = "xrender";
mark-wmwin-focused = true;
mark-ovredir-focused = true;
detect-rounded-corners = true;
detect-client-opacity = true;
refresh-rate = 60;
#vsync = true;
# sw-opti = true;
# unredir-if-possible = true;
# unredir-if-possible-delay = 5000;
# unredir-if-possible-exclude = [ ];
focus-exclude = [ "class_g = 'Cairo-clock'" ];
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;
use-ewmh-active-win = true;

# Window type settings
wintypes:
{
  tooltip = { fade = true; shadow = true; opacity = 0.9; focus = true; full-shadow = false; };
  dock = { shadow = false; }
  dnd = { shadow = false; }
  #popup_menu = { opacity = 0.95; }
  #dropdown_menu = { opacity = 0.95; }
};
yshui commented 4 years ago

@dymn Hmmmm. And you don't get any error messages from picom?

yshui commented 4 years ago

Feels like either this is a driver problem, or picom is doing something the NVIDIA driver doesn't like. Can you report this problem on the NVIDIA developer forum? Hopefully they can give us more information.

If you do, please post a link to your post here.

dymn commented 4 years ago

@dymn Hmmmm. And you don't get any error messages from picom?

Only this after closing problem application: [ 27.04.2020 17:28:03.112 win_clear_flags WARN ] Flags cleared on a destroyed window 0x00a00871 (6_klass_Algebra(1974)(Makarychev).djvu)

dymn commented 4 years ago

If you do, please post a link to your post here.

https://forums.developer.nvidia.com/t/some-window-titles-and-terminal-outputs-flashes-with-picom-glx-backend/121220

dymn commented 4 years ago

@yshui, Any thoughts after replies to the nvidia forum?

By the way: with glx backend and ForceFullCompositionPipeline i have with __GL_SYNC_TO_VBLANK=0 glxgears about 1750 fps. Without picom i have about 43000 fps. It is normal?

yochaigal commented 4 years ago

This issue has gone away for me, btw.

Kolbasyatin commented 4 years ago

I have blinking too. There are errors in logs

31.05.2020 19:09:30.108 x_fence_sync ERROR ] Failed to trigger the fence (X error 136 XSyncBadFence request 134 minor 15 serial 2004)

[ 31.05.2020 19:09:30.108 paint_all ERROR ] x_fence_sync failed, xrender-sync-fence will be disabled from now on.

Here is example

I use i3wm.

ankitson commented 4 years ago

@yshui

I had this problem too, easily reproducible flicker on many apps using i3wm with picom compiled from stable/8, NVIDIA drivers 440.82 and a GTX 1070.

use_damage = false fixed it but noticeably slowed down rendering for fast moving text.

However, launching picom with --xrender-sync-fence DID fix the problem for me. Launching picom without the flag also shows an error:

ankitp@pop-os ~> picom --version
vgit-e553e

ankit@pop-os ~> picom -f --config /home/ankitp/.config/regolith/compton/config
[ 06/10/2020 22:52:35.021 x_fence_sync ERROR ] Failed to trigger the fence (X error 136 XSyncBadFence request 134 minor 15 serial 1973)
[ 06/10/2020 22:52:35.021 paint_all ERROR ] x_fence_sync failed, xrender-sync-fence will be disabled from now on.
^C

ankit@pop-os ~> picom -f --config /home/ankitp/.config/regolith/compton/config --xrender-sync-fence
(no output)

After some reading, I traced the problem and discovered you have already fixed it here -

https://github.com/yshui/picom/commit/cbe34158f3a364ff87bce948c787e0383e0b0c54#diff-facacfb5d72224a496b34279f2da0c11

This was exactly the problem in my case! The fence was not initialized on the first paint call and it would then auto disable. Works perfect on picom compiled from the next branch.

junetried commented 3 years ago

I am having this issue exactly as described by yochaigal here. Though, I am not using NVIDIA hardware at all, but Intel graphics on my laptop.

Nothing described here fixes it. Changing the backend from glx to xrender fixes this, though it introduces terrible screen tearing.

yshui commented 3 months ago

Close as stale. Open another issue if this is still relevant to you, thanks.