bspwm icon indicating copy to clipboard operation
bspwm copied to clipboard

Visual artifacts when resizing windows

Open zjeffer opened this issue 6 years ago • 16 comments

Copied from this stackExchange post

Examples:

  • https://youtu.be/1uOcOCSVsvM. Visual Studio Code: this one is obvious

  • https://youtu.be/PmRwh_S6gIY. 2 Sublime Text windows, tiled: This one is more subtle. You can see the scrollbars of both windows glitch out a bit. The right window is the most apparant.

  • https://youtu.be/oDE-CUMr6fI. 2 Thunar windows, tiled: Same issue: you can see the right side of the right window glitch out.

  • https://youtu.be/Zycu9PV6gMY. Firefox and Konsole, tiled: You can see the firefox window shows a white background when resizing. In the konsole window you can see the scrollbar glitches like the previous 2 points.

  • https://youtu.be/UqDJcKurbiw. gnome-terminal, tiled: This one is really weird: I resize the window with super+right-click. Only when I release the right mouse button, it shows the resized window. Also when I keep moving the mouse, for example in circles as I did in the video, the window size keeps decreasing.

What I've tried:

  • Testing without compton: same results
  • Testing with the Nvidia GPU disabled in BIOS: same results
  • Rebooting
  • Setting pointer_motion_interval from 17 to 40: slight improvement but the problem doesn't go away. Any higher and resizing windows will lag.
  • I use Nvidia's DRM KMS to eliminate tearing. I disabled it. Now I have the same problems, but with tearing.

I have no idea what to try next to troubleshoot this issue.


Specs:

OS: Arch Linux x86_64 
Host: 80WK Lenovo Y520-15IKBN 
Kernel: 5.0.13-arch1-1-ARCH 
Uptime: 7 hours, 9 mins 
Packages: 1653 (pacman) 
Shell: zsh 5.7.1 
Resolution: 1920x1080 
WM: bspwm 
Theme: OSX-Arc-Plus [GTK2/3] 
Icons: Papirus-Light [GTK2/3] 
Terminal: konsole 
Terminal Font: Hack 11 
CPU: Intel i7-7700HQ (8) @ 3.800GHz 
GPU: NVIDIA GeForce GTX 1050 Mobile 
GPU: Intel HD Graphics 630 
Memory: 2234MiB / 7867MiB

zjeffer avatar May 19 '19 19:05 zjeffer

You might try editing the value of pointer_motion_interval to be larger

neeasade avatar May 20 '19 16:05 neeasade

I set the pointer_motion_interval from 17 to 40 and that seems to make a slight improvement, but not enough (especially firefox and vscode). I tried setting it higher than that (50, 100) but that obviously makes resizing windows laggy. Is there something else that might cause these artifacts?

zjeffer avatar May 20 '19 17:05 zjeffer

Not a bspwm issue, configure your drivers and/or graphical toolkits. You may also try to test that on any other WM, Mutter, for example (as a WM with possibly the largest userbase).

laferuben avatar Jun 02 '19 19:06 laferuben

All my windows do this all the time. I've been through a ton of graphical settings, but some of the underlying troubles seems to stem from apps themselves. Particular terminal apps for example, st and newer versions of kitty, seem to resize without any glitching. So does mpv, mostly. However, my browser often glitches terribly.

rien333 avatar Aug 22 '19 07:08 rien333

Have you seen the same problems using other wms or DEs? If you have then you might try a Live USB Linux Variant like MXLinux (Debian not arch based) to see if the errors continue. If they do... then you might be experiencing/enjoying a hardware/firmware feature.

eirenicon avatar Aug 22 '19 10:08 eirenicon

Now that I'm using gnome-terminal instead of konsole, gnome-terminal seems to have a lot more glitching when resizing.

I used to use KDE Plasma with Kwin, and I don't remember having this issue then. I don't have a lot of time right now to do a lot of testing with other distros/DEs, so I'll test other DEs later.

I edited the original post with a video of gnome-terminal.

zjeffer avatar Aug 22 '19 11:08 zjeffer

fwiw I use kitty, xfce4-terminal all without problems.

eirenicon avatar Aug 22 '19 13:08 eirenicon

Yeah resizing in kitty is great now! It sucked prior to version 14 though, which is when it changed it's opengl rendering backend. I get the same white/black bars when resizing qutebrowser in openbox as I do in bspwm, one of the wm's I tried out per @eirenicon's suggestion. glitchy resizing in openbox seems to be largely on par with bspwm, maybe a tiny bit better.

rien333 avatar Aug 22 '19 14:08 rien333

Running without a compositor (or the xcompmgr) on the xf86-video-intel driver also helped me a lot. (you can still have polybar transparency without a compositor if you enable the pseudo-transparency setting)

rien333 avatar Aug 22 '19 14:08 rien333

Cleaning up old issues, I don't have these problems anymore.

zjeffer avatar Feb 16 '23 20:02 zjeffer

Hi, @zjeffer. I wonder if you got this problem solved, I'm experiencing the exactly same issues that you exposed here.

b92u avatar May 25 '23 23:05 b92u

  • I found the cause of the gnome-terminal resizing issue: https://gitlab.gnome.org/GNOME/gnome-terminal/-/issues/287#note_1734666
  • I don't have the vscode issue anymore
  • The other issues have become quite insignificant, I don't really notice them that often.

As for how I solved this, I can't really help you there. It's been so long and since opening this issue, I got a new laptop with different hardware (Ryzen 7 5800H + RTX 3070) but I don't know if that made the difference, or if I fixed it some other way.

zjeffer avatar May 26 '23 15:05 zjeffer

Actually, now that I test it again, the issue is still present. I just stopped noticing it.

For example, Firefox:

https://github.com/baskerville/bspwm/assets/4633209/7cfc8419-7df3-47dd-a194-76e0b634bb14

I think this is just a general issue with bspwm. Reopening.

zjeffer avatar May 26 '23 15:05 zjeffer

I'm also experiencing this both on bspwm and AwesomeWM, so I don't think it's a bspwm-specific issue.

Basically, the problem is that the previous contents of the screen remains as an artifact inside the space that the client has not finished rendering. This can also happen when spawning a new window.

I was thinking that this is only a problem with older nvidia cards, but it seems that it happens on your amd card too. I'm not really sure how dual GPU setups work, but are you using the amdgpu driver?

I wonder if this is just an unfixable X11 issue?

musjj avatar Sep 04 '23 11:09 musjj

Is this thing related to the same issue? image I'm trying using bspwm inside kde

CatalinPlesu avatar Jan 06 '24 15:01 CatalinPlesu

@CatalinPlesu doesn't look like it, you should open a separate issue.

zjeffer avatar Jan 06 '24 23:01 zjeffer