Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

real double buffering #661

Open
stapelberg opened this issue Mar 2, 2012 · 13 comments
Open

real double buffering #661

stapelberg opened this issue Mar 2, 2012 · 13 comments
Assignees
Labels
enhancement tentatively_accepted This feature has been previously accepted, but needs to be re-evaluated now.

Comments

@stapelberg
Copy link
Member

At the moment, we set pixmaps as background for the different windows. There still is some flickering when switching cons in a stack. Maybe this is gone when we use real double-buffering (render to a second pixmap, switch pixmaps)? Also see if the X double buffer extension can help us, though probably not (not available on all systems I guess).

@i3bot
Copy link

i3bot commented Aug 29, 2012

[Original comment by Piotr Domagalski <piotr@…>]

As a workaround for this issue (and more general tearing) I use dcompmgr (http://git.openbox.org/?p=dana/dcompmgr.git;a=summary) with --gl option, as only using OpenGL allows for full synchronization with VSync so to get rid of tearing. Unfortunately, dcompmgr is using lots of CPU and with the default fade in/out there are some artifacts in i3 (but that may be not specific to i3), e.g. when a window firstly has a title, later is set to 1 pixel border - then, whenever you switch workspaces you can see that old window title during fade in.

Unfortunately, dcompmgr seems to be the only compositing manager using OpenGL that can be used with any WM.

@i3bot
Copy link

i3bot commented Sep 14, 2013

[Original comment by anonymous]

I use compton (https://github.com/chjj/compton) with --backend glx and --vsync opengl on Intel HD 4000 GPU. Eats almost no CPU when idle.

@i3bot
Copy link

i3bot commented Dec 1, 2013

[Original comment by TonyC]

I would recommend compton to anyone who is bothered by the "white flashes" when switching between windows. I can use the glx backend and my video card does the rest. It also eliminates the tearing in firefox when using smooth scrolling. It does seem to use between 2x and 3x the cpu, however this is acceptable.

I think i3 might benefit from a lightweight compositor project to get the full benefit of hardware acceleration (even compton is heavy for my purposes).

@i3bot
Copy link

i3bot commented Dec 30, 2013

[Original comment by TonyC]

I think this should be done in a way that implements window transparency. Lack of support for window transparency causes a bug in Eclipse when dragging tabs around. See #1013.

@i3bot
Copy link

i3bot commented Jan 3, 2014

[Original comment by TonyC]

I'm going to start looking at this now.

Goals

  • Pseudo-transparency
  • Fix flickering issue when changing workspaces
  • Fix tearing issue with Firefox smooth scroll
  • Use hardware acceleration when available
  • Don't rewrite rendering code

If I can get all these, I think it will make i3 much prettier and possibly much faster. If anyone has any guidance on how to do this properly, let me know.

@i3bot
Copy link

i3bot commented Feb 2, 2015

[Original comment by lkraav <leho@…>]

did this end up going anywhere, ever?

@i3bot
Copy link

i3bot commented Feb 2, 2015

[Original comment by TonyC]

Replying to comment 6 by lkraav <leho@…>:

did this end up going anywhere, ever?

No. I found that compton accomplished everything I needed. I highly recommend compton for every i3 user.

It would be possible to put a compositor into i3 to accomplish what compton does, but it would be duplicated effort with that project. It would also expose us to some video driver issues that I don't think we have the manpower to deal with.

Fixing transparency issues will definitely require a rewrite of the rendering code even if we did put a compositor into i3.

Perfect rendering will never be possible with X. The focus for development has switched to Wayland.

@lindhe
Copy link

lindhe commented Oct 28, 2015

I experience extensive tearing, particularly with youtube videos. Not everytime, but it is a sporadic and frequent problem for me. I've tried installing compton and running compton --backend glx --vsync opengl but there is no difference. Is there anything else I should do to get rid of the tearing?

@Airblader
Copy link
Member

Did you make sure you're running the latest driver for your graphics card?

@lindhe
Copy link

lindhe commented Oct 28, 2015

Yes. But, I just narrowed down the problem, and it might not be i3's fault after all. The problem was twofold: i3 without compton causes tearing, but so does driving two monitors with different orientation with xrandr, at least with the nvidia driver.

When using the same orientation and running compton the tearing problem was fixed.

I guess this is an xrandr bug. Or nvidia, hard to say. Does anyone know? According to the Arch wiki there does not seem to be a fix other than using the same orientation.

So it does not seem to be because of i3, but since i3 depends so heavily on xrandr it might be worth looking to solve it. Any ideas?

@Airblader
Copy link
Member

My guess would be a driver issue, which you could more or less easily verify by using nouveau to see if it has the same problem. i3 not being at fault here was pretty clear since we don't render clients. ;)

@lindhe
Copy link

lindhe commented Oct 28, 2015

Trying different drivers will be a mission for a day that is not the day before a math exam. I guess you are right, but I'll get back as soon as I can comfirm this.

@Airblader Airblader added the accepted Has been approved and is ok to start working on label Dec 26, 2015
@Airblader Airblader added tentatively_accepted This feature has been previously accepted, but needs to be re-evaluated now. and removed accepted Has been approved and is ok to start working on labels Dec 31, 2020
@andrei-korshikov
Copy link

TearFree option of modesetting driver works fine, so I don't use picom/compton at all. More info:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement tentatively_accepted This feature has been previously accepted, but needs to be re-evaluated now.
Projects
None yet
Development

No branches or pull requests

5 participants