zed icon indicating copy to clipboard operation
zed copied to clipboard

Zed window flickers on every interaction on Linux stable build.

Open jub0t opened this issue 1 year ago • 10 comments

Check for existing issues

  • [X] Completed

Describe the bug / provide steps to reproduce it

I tried searching if anyone else had this error and how to fix it but couldn't find any similar issues.

On almost every keystroke, window resize or click the window flickers and exposes weird red and cyan shape placeholder for a split second.

Zed by itself runs very smooth it's just the quick flicker that makes it hard to work with.

Environment

Zed: v0.143.6 (Zed) OS: Linux Wayland ubuntu 22.04 Memory: 7.6 GiB Architecture: x86_64

If applicable, add mockups / screenshots to help explain present your vision of the feature

Screencast from 2024-07-10 22:30:07.webm

If applicable, attach your Zed.log file to this issue.

Zed.log

Caused by: No such file or directory (os error 2) 2024-07-10T22:29:55+02:00 [INFO] starting language server "zls", path: "/home/jub0t/Downloads/zed_deleteable", id: 5 2024-07-10T22:29:55+02:00 [ERROR] failed to start language server "zls": no asset found matching "zls-x86_64-linux.tar.gz" 2024-07-10T22:29:55+02:00 [ERROR] server stderr: Some("") 2024-07-10T22:29:55+02:00 [ERROR] Hit 4 reinstallation attempts for "zls" 2024-07-10T22:29:58+02:00 [INFO] Using surface present mode MAILBOX 2024-07-10T22:29:58+02:00 [WARN] Unable to forbid exclusive full screen 2024-07-10T22:29:59+02:00 [INFO] Using surface present mode MAILBOX 2024-07-10T22:29:59+02:00 [WARN] Unable to forbid exclusive full screen

jub0t avatar Jul 10 '24 20:07 jub0t

I have the same question, it is unable to use because the flickers.

I'm using Arch Linux,

Zed.log
2024-07-11T11:40:36+08:00 [ERROR] XIMClientError: Can't read xim message: Invalid Data ErrorCode: 0
2024-07-11T11:40:42+08:00 [ERROR] error downloading extension: request or operation took longer than the configured timeout time
2024-07-11T11:40:54+08:00 [ERROR] XIMClientError: Can't read xim message: Invalid Data ErrorCode: 0
2024-07-11T11:41:10+08:00 [ERROR] Platform<LinuxPlatform>::path_for_auxiliary_executable is not implemented yet
2024-07-11T11:41:13+08:00 [ERROR] Platform<LinuxPlatform>::path_for_auxiliary_executable is not implemented yet
2024-07-11T11:41:18+08:00 [ERROR] oneshot canceled
2024-07-11T11:41:22+08:00 [ERROR] XIMClientError: Can't read xim message: Invalid Data ErrorCode: 0
2024-07-11T11:41:27+08:00 [ERROR] error downloading extension: request or operation took longer than the configured timeout time
2024-07-11T11:43:03+08:00 [ERROR] oneshot canceled
2024-07-11T11:43:03+08:00 [ERROR] oneshot canceled
2024-07-11T11:43:31+08:00 [ERROR] error downloading extension: request or operation took longer than the configured timeout time
2024-07-11T11:43:48+08:00 [ERROR] window not found
2024-07-11T11:43:48+08:00 [ERROR] window not found
2024-07-11T11:47:27+08:00 [ERROR] XIMClientError: Can't read xim message: Invalid Data ErrorCode: 0
2024-07-11T11:47:33+08:00 [ERROR] error downloading extension: request or operation took longer than the configured timeout time
2024-07-11T11:47:41+08:00 [ERROR] XIMClientError: Can't read xim message: Invalid Data ErrorCode: 0

DawnMagnet avatar Jul 11 '24 03:07 DawnMagnet

I thought I'd try out Zed and hit this same issue. Installed using pacman -S zed.

  • Operating system: Arch Linux
  • Hardware: Lenovo ThinkPad X1 Carbon Gen 12
  • Processor: Intel Core Ultra 7 165U x 14
  • Memory: 64 GiB
  • Graphics: Intel Graphics (MTL)
  • GNOME Version: 46
  • Windowing System: X11
  • Kernel version: Linux 6.9.6-arch1-1

https://github.com/zed-industries/zed/assets/358014/78f3f3a6-f5e0-4ddc-a274-1c632236f89f

g105b avatar Jul 11 '24 10:07 g105b

Same here.

Arch, Kernel 6.9.8, Thinkpad X1 Carbon gen 12, Intel GPU, Wayland (Hyprland).

mw4rf avatar Jul 11 '24 17:07 mw4rf

cc: @kvark, might be blade related somehow :)

mikayla-maki avatar Jul 11 '24 20:07 mikayla-maki

Same issue on Arch with kernel 6.9.8-arch1-1 running on Dell Precision 5490 with Intel Ultra 7 165H.

0000:00:02.0 VGA compatible controller [0300]: Intel Corporation Meteor Lake-P [Intel Arc Graphics] [8086:7d55] (rev 08)
	Subsystem: Dell Device [1028:0cc7]
	Kernel driver in use: i915
	Kernel modules: i915, xe

bmatv avatar Jul 12 '24 03:07 bmatv

Here to report the same issue. My main PC does not have this issue and is using an NVIDIA driver. Both computers run Ubuntu Linux of some form. My slim laptop is a different story when it comes to hardware and I think this issue is related to the lack of GPU power. I have 3.5 GB of RAM on this thing and the GPU is nothing to speak of - called it Intel Celeron N3350/Pentium N42

image

Screencast from 07-12-2024 04:13:03 PM.webm

LuckyLuc96 avatar Jul 12 '24 20:07 LuckyLuc96

Same issue here. Zed flickers, whenever Zed starts, resizes, moves window or anything at all. It just flickers, whenever it feels like it.

  • CPU: Intel Pentium N4200 (4) @ 2.500GHz
  • GPU: Intel Celeron N3350/Pentium N4200/Atom E3900 Series
  • OS: Linux Mint 21.3 x86_64
  • Kernel: 5.15.0-113-generic
  • Zed Version: 0.143.7
  • DE: Cinnamon 6.0.4
  • WM: Mutter (muffin)

2024-07-13 11-25-12.webm

denlub avatar Jul 13 '24 10:07 denlub

Also having the same issue here

https://github.com/user-attachments/assets/d69e9056-5881-4635-b46c-dcf4b484dd03

zed

Abdulrasheed1729 avatar Jul 14 '24 14:07 Abdulrasheed1729

Thank you for all the reports! It looks pretty bad. Is this a regression? Did anyone experience this, say, on 0d760d8d19680b9af2cb7f333c912f6982afed2b before #12340 went in?

kvark avatar Jul 14 '24 17:07 kvark

Thank you for all the reports! It looks pretty bad. Is this a regression? Did anyone experience this, say, on 0d760d8d19680b9af2cb7f333c912f6982afed2b before #12340 went in?

I think for a lot of us, this is our first time running it on a Linux machine. It seems to be related to both Linux and Intel graphics cards

LuckyLuc96 avatar Jul 14 '24 18:07 LuckyLuc96

Can confirm that this doesn't happen when using NVidia vulkan driver but only happens while using the Intel GPU (With Intel Ultra 7 155H meteorlake iGPU).

$ # Flickers
$ VK_DRIVER_FILES=/usr/share/vulkan/icd.d/intel_icd.x86_64.json \
  zeditor
$ # Doesn't flicker
$ VK_DRIVER_FILES=/usr/share/vulkan/icd.d/nvidia_icd.json \
  zeditor

This is using Zed built from Git commit 684d9dd.

The problem didn't seem to go away with some Intel mesa flags like INTEL_DEBUG=noccs,nofs . Didn't get to test with latest mesa git build though.

System details:

  • OS: Arch linux
  • Kernel: 6.9.9
  • Mesa: 24.1.3
  • CPU: Intel Ultra 7 155H
  • GPU: NVIDIA GeForce RTX 4050 Max-Q / Mobile

Jaakkonen avatar Jul 15 '24 09:07 Jaakkonen

I also meet this problem image

jinzhongjia avatar Jul 21 '24 07:07 jinzhongjia

I had the same issue.

Here's my environment:

  • OS: EndeavourOS x86_64
  • CPU: Intel(R) Celeron(R) N4020 (2) @ 1.10 GHz
  • GPU: Intel UHD Graphics 600 @ 0.65 GHz [Integrated]
  • Kernel: Linux 6.9.10-arch1-1

image

Gusase avatar Jul 21 '24 23:07 Gusase

One of the things we can do, a very simple one and yet apparently very useful, is to (once again) just blindly prefer NVidia GPU if we are on a system with both Intel and Nvidia. At least on Linux. Presentation on Intel has proven to be problematic.

kvark avatar Jul 22 '24 00:07 kvark

Thank you for all the reports! It looks pretty bad. Is this a regression? Did anyone experience this, say, on 0d760d8 before #12340 went in?

I can't say when it started because I've been on holiday and had a couple of run ins with A&E, but some time ago (months) I was using the AUR git version, and it was working fine; albeit limited. Now I have this flickering issue, and due to some hocus pocus with Hyprland and nvidia, I'm unable to even work around it.

When I get a bit more time, I'll try and build from source, and track down the commit.

pms-fh avatar Jul 23 '24 10:07 pms-fh

One of the things we can do, a very simple one and yet apparently very useful, is to (once again) just blindly prefer NVidia GPU if we are on a system with both Intel and Nvidia. At least on Linux. Presentation on Intel has proven to be problematic.

My reported screencast was with a NVidia GPU, using the official drivers (the open source ones are extremely bad performance for my uses).

g105b avatar Jul 25 '24 14:07 g105b

In order to reduce the scope of the problem, it would be useful to have the affected users trying to reproduce this in Blade examples directly:

git clone https://github.com/kvark/blade
cd blade
cargo run --example bunnymark

(hit Space to spawn more bunnies)

kvark avatar Jul 26 '24 07:07 kvark

In order to reduce the scope of the problem, it would be useful to have the affected users trying to reproduce this in Blade examples directly:

git clone https://github.com/kvark/blade
cd blade
cargo run --example bunnymark

(hit Space to spawn more bunnies)

I'm on Manjaro Linux with an Intel CPU (Tiger Lake/Iris Xe) and have the same flickering issue. This is what the bunny mark example looks like. The gif quality is pretty bad, and I'm not sure what the example is supposed to look like exactly, but it does look a little strange. Let me know if I can provide more helpful details.

blade

altschuler avatar Jul 26 '24 16:07 altschuler

In order to reduce the scope of the problem, it would be useful to have the affected users trying to reproduce this in Blade examples directly:

git clone https://github.com/kvark/blade
cd blade
cargo run --example bunnymark

(hit Space to spawn more bunnies)

I am also having the same result as @altschuler . I'm on Linux Mint with Intel GeminiLake [UHD Graphics 600] GPU

https://github.com/user-attachments/assets/5e2e1bdb-86c9-4855-ac63-db04c7afcec3

Abdulrasheed1729 avatar Jul 26 '24 17:07 Abdulrasheed1729

Same issue on Arch with kernel 6.9.8-arch1-1 running on Dell Precision 5490 with Intel Ultra 7 165H.

0000:00:02.0 VGA compatible controller [0300]: Intel Corporation Meteor Lake-P [Intel Arc Graphics] [8086:7d55] (rev 08)
	Subsystem: Dell Device [1028:0cc7]
	Kernel driver in use: i915
	Kernel modules: i915, xe

@kvark Since then I 've updated to 6.10.1 kernel, zed-0.145.1-1 installed with pacman. Here's zed's window flickering:

https://github.com/user-attachments/assets/0c50bf45-90d6-4c15-a6a7-cd351ddf5cbd

and bunnymark (similar flickering issues with move, scene and vehicle while particle and ray-query examples work fine):

https://github.com/user-attachments/assets/34ebc9f8-21c8-40ee-a7d6-f939d18d674b

bmatv avatar Jul 27 '24 02:07 bmatv

hey, i'm using fedora 40 on wayland. my specs are: CPU: Intel Celeron N-4020 GPU: Intel® UHD Graphics 600 (GLK 2) RAM: 4GB I was using zed normally, and one day it started flickering as in the videos. Testing, I tried downgrading the mesa-vulkan-driver and it stoped flickering. Version without problem: Versión : 24.0.5 Version with problem: Versión : 24.1.4

Try it out please.

Edit: here it is listed in the terminal mesa-vulkan-drivers.i686 24.0.5-1.fc40 @fedora
mesa-vulkan-drivers.x86_64 24.0.5-1.fc40 @fedora

TicherWithoutTitle avatar Jul 28 '24 16:07 TicherWithoutTitle

Another user report of this issue in #15274. It looks like Intel Graphics may be the common denominator so I've edited the title.

Reported on:

  • Intel HD Graphics 500
  • Intel HD Graphics 505
  • Intel UHD Graphics 600 (x3)
  • Intel Arc Graphics (x3)

notpeter avatar Jul 28 '24 16:07 notpeter

hey, i'm using fedora 40 on wayland. my specs are: CPU: Intel Celeron N-4020 GPU: Intel® UHD Graphics 600 (GLK 2) RAM: 4GB I was using zed normally, and one day it started flickering as in the videos. Testing, I tried downgrading the mesa-vulkan-driver and it stoped flickering. Version without problem: Versión : 24.0.5 Version with problem: Versión : 24.1.4

Try it out please.

Edit: here it is listed in the terminal mesa-vulkan-drivers.i686 24.0.5-1.fc40 @fedora mesa-vulkan-drivers.x86_64 24.0.5-1.fc40 @fedora

Great find! This worked for me on arch linux with intel arc! I did not need to mess with the 32 bit version of vulkan, the only package I needed to downgrade was vulkan-intel.

I went ahead and went version by version to find out where this started with vulkan-intel. I got no flickering as recently as 24.1.2-1. As soon as I go to 24.1.3-1 I hit the bug. If others can confirm maybe we can submit a bug report to the driver provider? I'm not sure what the process looks like on that.

allisoneer avatar Jul 28 '24 18:07 allisoneer

hey, i'm using fedora 40 on wayland. my specs are: CPU: Intel Celeron N-4020 GPU: Intel® UHD Graphics 600 (GLK 2) RAM: 4GB I was using zed normally, and one day it started flickering as in the videos. Testing, I tried downgrading the mesa-vulkan-driver and it stoped flickering. Version without problem: Versión : 24.0.5 Version with problem: Versión : 24.1.4

Try it out please.

Edit: here it is listed in the terminal mesa-vulkan-drivers.i686 24.0.5-1.fc40 @fedora mesa-vulkan-drivers.x86_64 24.0.5-1.fc40 @fedora

Great find! This worked for me on arch linux with intel arc! I did not need to mess with the 32 bit version of vulkan, the only package I needed to downgrade was vulkan-intel.

I went ahead and went version by version to find out where this started with vulkan-intel. I got no flickering as recently as 24.1.2-1. As soon as I go to 24.1.3-1 I hit the bug. If others can confirm maybe we can submit a bug report to the driver provider? I'm not sure what the process looks like on that.

This did it for me. The visual artifacts are gone as well as soon as I downgraded to vulkan-intel 24.1.2-1.

The two later versions had the bug.

apognu avatar Jul 29 '24 12:07 apognu

  1. To downgrade on Fedora 40:
sudo dnf downgrade mesa-vulkan-drivers

The version I get is 24.0.5-1 and window no more repaint.

  1. Unfortunately, after system update, back to point one

buahaha avatar Aug 01 '24 01:08 buahaha

Thank you everyone for finding a solution to this problem! I am coming from Fedora 40 (KDE spin) and I confirm I have an Intel graphics card, which likely caused this issue. mesa-vulkan-drivers-24.0.5-1.fc40 indeed works with Zed.

@buahaha You can use versionlock command to lock the package version and not update it.

sudo dnf downagrade mesa-vulkan-drivers
sudo dnf versionlock add mesa-vulkan-drivers

dnf5 supports versionlock out of the box, and for dnf-4 you will need to install it as a plugin first:

sudo dnf install python3-dnf-plugins-extras-versionlock

ChocolateMagnate avatar Aug 02 '24 18:08 ChocolateMagnate

Bisected this one and opened Mesa upstream PR to fix the issue: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30499

It seems that there was commit removing memory coherency flag in anv memory allocator on Mesa Intel Vulkan driver that introduced this issue.

Jaakkonen avatar Aug 03 '24 10:08 Jaakkonen

@Jaakkonen that's very helpful! I can at least make sure that we are requesting the HOST_COHERENT flag where we are expecting it, knowing that it's related to the issue.

kvark avatar Aug 04 '24 00:08 kvark

@Jaakkonen would you be able to check with https://github.com/kvark/blade/pull/153 ?

kvark avatar Aug 04 '24 00:08 kvark

@kvark Checked the blade PR and it seems to fix the issue! I'll investigate if this Mesa change introduced some font flickering on VSCode and either close or update that MR. Anyway the issue on Zed's side should be now solved :)

Jaakkonen avatar Aug 04 '24 15:08 Jaakkonen