Picom: Removal of xrender-sync-fence causing screen to not update on input

Created on 7 Nov 2018  Â·  36Comments  Â·  Source: yshui/picom

Platform

Arch Linux

GPU, drivers, and screen setup

Nvidia GTX 1080 ti, nvidia-drivers 410.66, mesa 18.2.4-1

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

Environment

AwesomeWM

Compton version

—— compton --version
v3-rc2-18-gc0d7f9d

Compton configuration:

#
# Backend
#

backend = "glx";
glx-no-stencil = true;
glx-swap-method = "copy";
glx-no-rebind-pixmap = true;
xrender-sync-fence = true;

#
# Fading
#

fading = true;
fade-delta = 4;
fade-in-step = 0.02;
fade-out-step = 0.02;
fade-exclude = [];

#
# Shadows
#

shadow = true;
no-dnd-shadow = true;
clear-shadow = true;
shadow-radius = 15;
shadow-offset-x = -15;
shadow-offset-y = -15;
shadow-opacity = 0.95;
shadow-exclude = [
  "_GTK_FRAME_EXTENTS@:c",
  "class_g = 'Bspwm' && class_i = 'presel_feedback'"
];

#
# Opacity
#

opacity-rule = [
  "50:class_g = 'Bspwm' && class_i = 'presel_feedback'"
];

#
# Other
#

paint-on-overlay = true;
unredir-if-possible = true;

#
# Window type
#

wintypes: {
  tooltip = {
    fade = true;
    shadow = false;
    opacity = 0.85;
  };
};

Steps of reproduction

  1. Start compton
  2. move between lines in vim and notice that the screen will stop updating

Expected behavior

The screen is always updated on input

Current Behavior

The screen isn't updated when it should be

Other details

This issue didn't start happening until these options were removed:

xrender-sync-fence = true;
xrender-sync = true;

per this commit.

revisit

All 36 comments

From what you said, it sounds like you tested compton v3-rc2-18-gc0d7f9d with and without xrender-sync-fence, is that correct?

Correct. When I enable xrender-sync-fence I get the following message:

parse_config(): "xrender-sync-fence" has been removed. If you encounter problems without this feature, please feel free to open a bug report.

So does v3-rc2-18 have this problem both with and without xrender-sync-fence? Or are you saying v3-rc-18 works fine when you gave it --xrender-sync-fence?

Sorry for the confusion, let me rephrase the issue:

I have been using xrender-sync-fence since August 2017 to fix the issue I'm reporting here. Today I updated my system and with it came the removal of this property. Since I can't set this property (I get parse_config(): "xrender-sync-fence" has been removed. If you encounter problems without this feature, please feel free to open a bug report. when I do), I'm experiencing the issue again.

I think I see where the confusion is coming from now. It looks like the removal of xrender-sync-fence and xrender-sync weren't supposed to occur until v4, which is a pre-release at the moment. 8 days ago the Arch compton package was updated to no longer point at v3 but instead at this commit which is the current head of the next branch.

So I guess there are 2 issues:

  • The Arch compton package is using a pre-release version
  • Eventually when v4 becomes stable and is released, the removal of xrender-sync* will cause issues

Thanks for the clarification! For now I suggest to downgrade to 3.0-1 and stay there. I think you should also raise this issue to nvidia, probably in their forums. (Seems to be an old problem which they already know of.)

Or, if this problem does not happen with the xrender backend, you can try switching to that.

BTW, what terminal emulator do you use to run vim? Does the lag happen in other windows as well? If the lag is obvious visually, can you record a video of it?

I can repro on Intel integrated graphics when using the xf86-video-intel DDX and its SNA renderer. No problem at all with Glamor on both Intel and AMD graphics.
I use urxvt but I wouldn't be surprised if other applications were affected. Rather than lag, it looks like compton misses some updates entirely for urxvt.

@Streetwalrus Does it happen with both backends?

I haven't done much testing with the xrender backend but I think it's unaffected.

@Streetwalrus And does --xrender-sync-fence fix this problem in older version of compton?

Yes.

I have both discrete Nvidia card running with proprietary driver, and intel card running with xf86-video-intel and SNA, and I cannot reproduce this problem.

I also did more digging on why x sync fence is used. I found some old forum threads and bug reports on this issue, but still can't find info of the rational behind using sync fence.

This is annoying. I made some enquiries on the nvidia forum, and will continue searching through old bug reports...

@xyproto By the way, the removal of sync fence isn't really supposed to be in any kind of releases yet. Can you update the arch package to instead cherry pick the fixes you need? Thanks a lot!

Or, if this problem does not happen with the xrender backend, you can try switching to that.

I'll try switching backends.

BTW, what terminal emulator do you use to run vim?

I'm using URxvt

Does the lag happen in other windows as well?

The only other window I've been able to reproduce it in is rofi

If the lag is obvious visually, can you record a video of it?

Here is a video. Sorry for the phone video, I tried using screenkey to show what keys I was pressing but I wasn't able to reproduce the issue with it running.

OK, I reverted the commit, the head of next should working fine again.

@yshui I wish to use the latest release version of compton, but for cases where a fix in the pipeline and will appear in the next release, I may use a specific commit. Patching or cherry-picking may occur in Arch Linux packages, but is generally against the current Arch Linux packaging policy, and to be avoided.

@xyproto OK, thanks for the clarification.

@yshui Updated the compton package to the latest git commit while awaiting the next release. Please let me know if you believe other options should be enabled/disabled by default. Thanks! https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/compton

@kschat @Streetwalrus Can you please test the latest next and see if it works again?

I just updated via pacman and I'm still seeing that xrender-sync-fence is removed. It looks like the version is the same v3-rc2-18-gc0d7f9d.

@kschat Are you able to git clone this repo and build compton from source?

Building from source works.

Re-enabled xrender-sync-fence by default in the compton package too.

@kschat Hi, can you also test the glx-sync-removal branch?

You do git fetch --all; git checkout glx-sync-removal in the git repo, then build from source.

Hmm, I think I might have broken the glx backend for anyone who doesn't have a nvidia card.

glx-sync-removal should fix it.

@xyproto BTW, can you enable the building of man pages in Arch packages?

@yshui Sure, updated the package to include the man pages.

@xyproto Thanks!

@yshui do you want me to test that branch with xrender-sync-fence?

@kschat Yes, that is correct.

Tested, issue is resolved in that branch.

@kschat Thanks. Closing this issue for now.

I can definitely say that setting both xrender-sync-fence and xrender-syncto false works without issues for xf86-video-amdgpu driver.

@aufkrawall It is known to impact NVIDIA users the most.

I also had this annoying issue until finding the --xrender-sync-fence option which indeed fixes it.

This only happened (without the fence option) on my Quadro P600 (and not on my iGPU), using NVIDIA proprietary drivers and the glx backend and a 4K external monitor. Glitch manifests intermittently in full screen terminals (under i3wm) in an i3 tab with the bottom few lines of the terminal not always refreshing properly when there is output there (for example the output of a long ls -l). Happened in urxvt and xterm. I can reproduce this issue very easily. xrender backend does not have this issue but introduces tearing in Firefox.

Was this page helpful?
0 / 5 - 0 ratings