warpdotdev / Warp

Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster.
https://warp.dev
Other
20.97k stars 359 forks source link

Warp sometimes flickers whenever things move #4321

Open BlueCannonBall opened 6 months ago

BlueCannonBall commented 6 months ago

Discord username (optional)

No response

Describe the bug

The entire UI often flickers, such that the window becomes completely blank for a few frames before returning.

To reproduce

  1. Run a command that prints a lot of stuff. Although this is the easiest way to make it happen, it often happens at random.

Expected behavior

I did not expect the interface to flicker.

Screenshots

Here's a video showing the issue:

https://github.com/warpdotdev/Warp/assets/35404206/f625f06a-8806-4193-ba54-2ddf5a1c99bb

Operating system

Linux

Operating system and version

Ubuntu 20.04

Shell Version

zsh 5.8 (x86_64-ubuntu-linux-gnu)

Current Warp version

v0.2024.02.20.08.01.stable_02

Regression

No, this bug or issue has existed throughout my experience using Warp

Recent working Warp date

No response

Additional context

No response

Does this block you from using Warp daily?

Yes, this issue prevents me from using Warp daily.

Is this a Warp specific issue? (i.e. does it happen in Terminal, iTerm, Kitty, etc.)

Yes, this I confirmed this only happens in Warp, not other terminals.

Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e

None

Nebula-2003 commented 6 months ago

Facing the same issue.

PC version : image

Warp Version : v0.2024.02.20.08.01.stable_02

PeterJiV5 commented 6 months ago

Facing the same issue too. The flickering seems more like a re-rendering of the UI. My PC only has integrated graphics. Not sure if that's part of the problem. CPU: Intel i7 12700 GPU: Intel UHD Graphics 770

BlueCannonBall commented 6 months ago

My PC also only had integrated graphics. CPU: Intel Core i7-8550U GPU: Intel UHD Graphics 620

BlueCannonBall commented 6 months ago

Update: Running it with the environment variable WGPU_BACKEND=gl fixes the issue.

PeterJiV5 commented 6 months ago

Worked like magic! Thanks! May I ask how you came across this solution (if not too complicated)?

For reference, I ran WGPU_BACKEND=gl warp-terminal to fix the problem. A warning message keeps getting printed, in which X is a number (usually 2). [WARN] redraw_frame was called X times before the frame was drawn The message shows up whether WGPU_BACKEND is specified or not. Hope this can help with debugging.

alokedesai commented 6 months ago

Hi everyone, for folks experiencing this issue could you run glxinfo -B and send us the output so we can better debug? Thanks!

BlueCannonBall commented 6 months ago

Using this PPA to get the latest Mesa also seems to fix the issue, even without having to set WGPU_BACKEND.

May I ask how you came across this solution (if not too complicated)?

I found it at the bottom of this page.

On my machine glxinfo -B outputs this:

name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel (0x8086)
    Device: Mesa Intel(R) UHD Graphics 620 (KBL GT2) (0x5917)
    Version: 24.0.2
    Accelerated: yes
    Video memory: 11739MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) UHD Graphics 620 (KBL GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 24.0.2 - kisak-mesa PPA
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 24.0.2 - kisak-mesa PPA
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 24.0.2 - kisak-mesa PPA
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

I suspect that this might look different when not using the aforementioned PPA.

Nebula-2003 commented 6 months ago

running this command also worked me WGPU_BACKEND=gl

@alokedesai the debug log u asked for

glxinfo -B

name of display: :0 display: :0 screen: 0 direct rendering: Yes Extended renderer info (GLX_MESA_query_renderer): Vendor: Intel (0x8086) Device: Mesa Intel(R) Graphics (ADL-S GT1) (0x4692) Version: 21.2.6 Accelerated: yes Video memory: 3072MB Unified memory: yes Preferred profile: core (0x1) Max core profile version: 4.6 Max compat profile version: 4.6 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 3.2 OpenGL vendor string: Intel OpenGL renderer string: Mesa Intel(R) Graphics (ADL-S GT1) OpenGL core profile version string: 4.6 (Core Profile) Mesa 21.2.6 OpenGL core profile shading language version string: 4.60 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 21.2.6 OpenGL shading language version string: 4.60 OpenGL context flags: (none) OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 21.2.6 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

albertonoys commented 5 months ago

Same issue for me on v0.2024.04.02.08.02.stable_01. WGPU_BACKEND=gl warp-terminal seems to fix the problem:

glxinfo -B name of display: :0 display: :0 screen: 0 direct rendering: Yes Extended renderer info (GLX_MESA_query_renderer): Vendor: Intel (0x8086) Device: Mesa Intel(R) Graphics (ADL GT2) (0x46a6) Version: 21.2.6 Accelerated: yes Video memory: 3072MB Unified memory: yes Preferred profile: core (0x1) Max core profile version: 4.6 Max compat profile version: 4.6 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 3.2 OpenGL vendor string: Intel OpenGL renderer string: Mesa Intel(R) Graphics (ADL GT2) OpenGL core profile version string: 4.6 (Core Profile) Mesa 21.2.6 OpenGL core profile shading language version string: 4.60 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 21.2.6 OpenGL shading language version string: 4.60 OpenGL context flags: (none) OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 21.2.6 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

mpetronic commented 5 months ago

For me, using WGPU_BACKEND=gl does not stop the flickering. Sometimes the screen goes completely black and does not refresh until I move my mouse. Other times is flickers frequently as I am typing on the command line, or searching through previous command history. It flickers enough that it is too annoying to use. Guess I am going back to good old Terminator although, I really like Warp and would love to use it but the flickering is too much to deal with for me.

lsb_release -d Description: Debian GNU/Linux 11 (bullseye)

glxinfo -B name of display: :0 display: :0 screen: 0 direct rendering: Yes Extended renderer info (GLX_MESA_query_renderer): Vendor: Intel (0x8086) Device: Mesa Intel(R) Graphics (ADL-S GT1) (0x4680) Version: 20.3.5 Accelerated: yes Video memory: 3072MB Unified memory: yes Preferred profile: core (0x1) Max core profile version: 4.6 Max compat profile version: 4.6 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 3.2 OpenGL vendor string: Intel OpenGL renderer string: Mesa Intel(R) Graphics (ADL-S GT1) OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.3.5 OpenGL core profile shading language version string: 4.60 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 20.3.5 OpenGL shading language version string: 4.60 OpenGL context flags: (none) OpenGL profile mask: compatibility profile

OpenGL ES profile version string