yshui / picom

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

Strange text editing issues with compton #256

Open vikigenius opened 5 years ago

vikigenius commented 5 years ago

Platform

Void Linux Desktop x86_64 (5.3.8 kernel)

GPU, drivers, and screen setup

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

Environment

i3-gaps, rxvt-unicode terminal

picom version

v7

Configuration:

backend = "glx";
glx-no-stencil = true;
glx-no-rebind-pixmap = true;
use-damage = true;
popup_menu    = { shadow = false; opacity = 1 };
dropdown_menu = { shadow = false; opacity = 1 };
utility       = { shadow = false; };
dnd           = { shadow = false; };
dock          = { shadow = false; };
shadow = false;
shadow-radius = 0;
shadow-offset-x = 2;
shadow-offset-y = 2;
shadow-opacity = 0.15;
shadow-ignore-shaped = true;

inactive-opacity = 1;
active-opacity = 1;
frame-opacity = 1;
inactive-opacity-override = false;

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

fading = true;
fade-delta = 4;
fade-in-step = 0.03;
fade-out-step = 0.03;
no-fading-openclose = true;
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 = 75;
vsync = false;
dbe = false;
unredir-if-possible = false;

focus-exclude = [ ];

detect-transient = true;
detect-client-leader = true;

wintypes:
{
    tooltip =
    {
        fade = true;
        shadow = false;
        opacity = 0.85;
        focus = true;
    };
};
opacity-rule = [
  "0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
];

Expected behavior

Text editing using terminal URXVT should work fine

Current Behavior

Portions of text simply disappears while scrolling, and if I enable cursor blinking in urxvt portions of text start blinking as well. This weird behavior stops when I kill compton.

Another example is I open vim, edit something and close it, the bottom part of my text file appears on my terminal even after I close vim.

Other details

I am including a sample debug log from a run:

[ 10/31/2019 17:49:25.281 atom_getter DEBUG ] Atom _NET_WM_WINDOW_OPACITY is 365
[ 10/31/2019 17:49:25.281 atom_getter DEBUG ] Atom _NET_FRAME_EXTENTS is 361
[ 10/31/2019 17:49:25.281 atom_getter DEBUG ] Atom WM_STATE is 350
[ 10/31/2019 17:49:25.281 atom_getter DEBUG ] Atom _NET_WM_NAME is 313
[ 10/31/2019 17:49:25.281 atom_getter DEBUG ] Atom _NET_WM_PID is 366
[ 10/31/2019 17:49:25.281 atom_getter DEBUG ] Atom WM_NAME is 39
[ 10/31/2019 17:49:25.281 atom_getter DEBUG ] Atom WM_CLASS is 67
[ 10/31/2019 17:49:25.281 atom_getter DEBUG ] Atom WM_TRANSIENT_FOR is 68
[ 10/31/2019 17:49:25.281 atom_getter DEBUG ] Atom WM_WINDOW_ROLE is 353
[ 10/31/2019 17:49:25.281 atom_getter DEBUG ] Atom WM_CLIENT_LEADER is 351
[ 10/31/2019 17:49:25.281 atom_getter DEBUG ] Atom _NET_ACTIVE_WINDOW is 343
[ 10/31/2019 17:49:25.281 atom_getter DEBUG ] Atom _COMPTON_SHADOW is 367
[ 10/31/2019 17:49:25.281 atom_getter DEBUG ] Atom _NET_WM_WINDOW_TYPE is 323
[ 10/31/2019 17:49:25.281 atom_getter DEBUG ] Atom _NET_WM_WINDOW_TYPE_DESKTOP is 368
[ 10/31/2019 17:49:25.281 atom_getter DEBUG ] Atom _NET_WM_WINDOW_TYPE_DOCK is 325
[ 10/31/2019 17:49:25.281 atom_getter DEBUG ] Atom _NET_WM_WINDOW_TYPE_TOOLBAR is 328
[ 10/31/2019 17:49:25.281 atom_getter DEBUG ] Atom _NET_WM_WINDOW_TYPE_MENU is 330
[ 10/31/2019 17:49:25.281 atom_getter DEBUG ] Atom _NET_WM_WINDOW_TYPE_UTILITY is 327
[ 10/31/2019 17:49:25.282 atom_getter DEBUG ] Atom _NET_WM_WINDOW_TYPE_SPLASH is 329
[ 10/31/2019 17:49:25.282 atom_getter DEBUG ] Atom _NET_WM_WINDOW_TYPE_DIALOG is 326
[ 10/31/2019 17:49:25.282 atom_getter DEBUG ] Atom _NET_WM_WINDOW_TYPE_NORMAL is 324
[ 10/31/2019 17:49:25.282 atom_getter DEBUG ] Atom _NET_WM_WINDOW_TYPE_DROPDOWN_MENU is 331
[ 10/31/2019 17:49:25.282 atom_getter DEBUG ] Atom _NET_WM_WINDOW_TYPE_POPUP_MENU is 332
[ 10/31/2019 17:49:25.282 atom_getter DEBUG ] Atom _NET_WM_WINDOW_TYPE_TOOLTIP is 333
[ 10/31/2019 17:49:25.282 atom_getter DEBUG ] Atom _NET_WM_WINDOW_TYPE_NOTIFICATION is 334
[ 10/31/2019 17:49:25.282 atom_getter DEBUG ] Atom _NET_WM_WINDOW_TYPE_COMBO is 369
[ 10/31/2019 17:49:25.282 atom_getter DEBUG ] Atom _NET_WM_WINDOW_TYPE_DND is 370
[ 10/31/2019 17:49:25.282 atom_getter DEBUG ] Atom _GTK_FRAME_EXTENTS is 371
[ 10/31/2019 17:49:25.282 atom_getter DEBUG ] Atom _NET_WM_STATE is 322
[ 10/31/2019 17:49:25.284 atom_getter DEBUG ] Atom COMPTON_VERSION is 373
[ 10/31/2019 17:49:25.284 atom_getter DEBUG ] Atom _NET_WM_CM_S0 is 374
[ 10/31/2019 17:49:25.285 init_overlay DEBUG ] overlay = 0x000001db
[ 10/31/2019 17:49:25.308 glx_has_extension INFO ] Found GLX extension GLX_SGI_video_sync.
[ 10/31/2019 17:49:25.308 glx_has_extension INFO ] Found GLX extension GLX_SGI_swap_control.
[ 10/31/2019 17:49:25.308 glx_has_extension INFO ] Missing GLX extension GLX_OML_sync_control.
[ 10/31/2019 17:49:25.308 glx_has_extension INFO ] Missing GLX extension GLX_MESA_swap_control.
[ 10/31/2019 17:49:25.308 glx_has_extension INFO ] Found GLX extension GLX_EXT_swap_control.
[ 10/31/2019 17:49:25.308 glx_has_extension INFO ] Found GLX extension GLX_EXT_texture_from_pixmap.
[ 10/31/2019 17:49:25.308 glx_has_extension INFO ] Found GLX extension GLX_ARB_create_context.
[ 10/31/2019 17:49:25.308 glx_has_extension INFO ] Found GLX extension GLX_EXT_buffer_age.
[ 10/31/2019 17:49:25.363 gl_has_extension INFO ] Missing GL extension GL_GREMEDY_string_marker.
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x0040000c
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x0040000d
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x0040000f
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x00400011
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x00400013
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x00400015
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x0040004f
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x00400054
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x00400017
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x00400019
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x0040001d
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x0040005b
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x0040001b
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x00e00001
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x00e00010
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x00a00001
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x00e00013
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x00e00016
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x01200001
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x01400001
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x01600001
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x00e0002d
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x01000001
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x01c00001
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x02000001
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x01a00001
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x00e0003a
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x00e00036
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x02200001
[ 10/31/2019 17:49:25.363 add_win DEBUG ] Adding window 0x01e00002
vikigenius commented 5 years ago

Further debugging shows other weird behavior when compton is running.

  1. When i am editing text in vim, say I am in line 221, if I press the down arrow key, part of the text goes blank but the line indicator says i am in line 2, now if press the down arrow key again I am in line 223 and the text reappears, this keeps happening almost every other line.

This issue disappears when I kill compton and seems to happen only on urxvt, so possibly it could be a problem with urxvt doing something wrong when compton is running.

vikigenius commented 5 years ago

After a few more hours of searching I found https://github.com/chjj/compton/issues/152. Using the --xrender-sync-fence switch as suggested has solved the issue.

yshui commented 5 years ago

@vikigenius Mmm, this should be automatic for NVIDIA drivers.

Can you post the output of compton --diagnostics?

vikigenius commented 5 years ago

Sure thing @yshui

**Version:** v7

### Extensions:

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

### Misc:

* Use Overlay: Yes
* Config file used: /home/void/.config/compton.conf

### Drivers (inaccurate):

NVIDIA,  
yshui commented 5 years ago

@vikigenius The driver is properly detected, so --xrender-sync-fence is automatically enabled.

Are you sure passing that flag does solve the problem?

vikigenius commented 5 years ago

I am sure, it is now completely resolved after passing the flag, no more weirdness, it was not very subtle so it is easy to notice.