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

Slow on Linux (Intel Integrated Graphics) #14088

Closed
1 task done
rayauxey opened this issue Jul 10, 2024 · 27 comments
Closed
1 task done

Slow on Linux (Intel Integrated Graphics) #14088

rayauxey opened this issue Jul 10, 2024 · 27 comments
Labels
defect [core label] linux performance Feedback for performance issues, speed, memory usage, etc

Comments

@rayauxey
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Running zed on my linux machine is relatively slow compared to other editors.
Scrolling lags and even highlighted items while moving the cursor are lagging.
I suspect zed is not utilizing the integrated graphics.
I have vulkan on my system and vkcube runs perfectly.

Environment

OS: Pop!_OS 22.04 LTS x86_64
CPU: Intel i7-8650U (8) @ 4.200GHz
GPU: Intel UHD Graphics 620

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

No response

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

Zed.log
2024-07-10T20:24:05 03:00 [INFO] Enabling Vulkan Portability
2024-07-10T20:24:05 03:00 [INFO] Enabling color space support
2024-07-10T20:24:05 03:00 [WARN] Rejecting Intel for not presenting when Nvidia is present (on Linux)
2024-07-10T20:24:05 03:00 [INFO] Adapter "llvmpipe (LLVM 15.0.7, 256 bits)"
2024-07-10T20:24:05 03:00 [INFO] No ray tracing extensions are supported
@rayauxey rayauxey added admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue labels Jul 10, 2024
@Gabriel-p
Copy link

I'm also experiencing noticeable lag.

elementary OS 7.1 Horus (based on Ubuntu 22.04.3 LTS)
CPU: Intel Core(TM) i7-3635QM CPU @ 2.40GHz 4 cores
Intel HD Graphics 4000
NVIDIA® GeForce® GT® 640M

@MrFoxPro
Copy link

MrFoxPro commented Jul 10, 2024

Not sure if it's related to Intel. When running Zed even on external nvidia gpu it starts lagging on cpu-intensive task (Zed log confirms that it runs on external Nvidia GPU).

Arch Linux
Intel i7-8550U NVIDIA GeForce MX150

zed_lags.mp4

@touhidrahman
Copy link

I am also noticing a great amount of lag. My specs:

Screenshot from 2024-07-10 22-17-24

@DoKoB0512

This comment was marked as spam.

@notpeter notpeter added performance Feedback for performance issues, speed, memory usage, etc linux and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Jul 11, 2024
@Akiyamka
Copy link

Akiyamka commented Jul 12, 2024

Can confirm that not related to Intel.
Fedora 40 (Gnome / wayland), Intel N200 (4 core, 4 threads), no gpu, works fine

@rayauxey
Copy link
Author

It seems to be a Pop OS issue
I have downloaded zed on a weaker laptop that uses Fedora and it has good performance.

@culebron
Copy link

Not having this issue.
image

@capacman
Copy link

I have same snippet in my logs:
2024-07-13T10:17:05 03:00 [INFO] keep_updated;
2024-07-13T10:17:05 03:00 [INFO] Enabling Vulkan Portability
2024-07-13T10:17:05 03:00 [INFO] Enabling color space support
2024-07-13T10:17:05 03:00 [WARN] Rejecting Intel for not presenting when Nvidia is present (on Linux)
2024-07-13T10:17:05 03:00 [INFO] Adapter "llvmpipe (LLVM 15.0.7, 256 bits)"
2024-07-13T10:17:05 03:00 [INFO] No ray tracing extensions are supported

though my laptop does not have nvidia. lspci:
00:00.0 Host bridge: Intel Corporation Device a708 (rev 01)
00:02.0 VGA compatible controller: Intel Corporation Device a7a1 (rev 04)
00:06.0 PCI bridge: Intel Corporation Device a74d (rev 01)
00:07.0 PCI bridge: Intel Corporation Device a76e (rev 01)
00:0a.0 Signal processing controller: Intel Corporation Device a77d (rev 01)
00:0d.0 USB controller: Intel Corporation Device a71e (rev 01)
00:0d.2 USB controller: Intel Corporation Device a73e (rev 01)
00:14.0 USB controller: Intel Corporation Alder Lake PCH USB 3.2 xHCI Host Controller (rev 01)
00:14.2 RAM memory: Intel Corporation Alder Lake PCH Shared SRAM (rev 01)
00:14.3 Network controller: Intel Corporation Device 51f1 (rev 01)
00:15.0 Serial bus controller: Intel Corporation Alder Lake PCH Serial IO I2C Controller #0 (rev 01)
00:15.1 Serial bus controller: Intel Corporation Alder Lake PCH Serial IO I2C Controller #1 (rev 01)
00:1c.0 PCI bridge: Intel Corporation Device 51bd (rev 01)
00:1f.0 ISA bridge: Intel Corporation Device 519d (rev 01)
00:1f.3 Audio device: Intel Corporation Device 51ca (rev 01)
00:1f.4 SMBus: Intel Corporation Alder Lake PCH-P SMBus Host Controller (rev 01)
00:1f.5 Serial bus controller: Intel Corporation Alder Lake-P PCH SPI Controller (rev 01)
01:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981/PM983
2d:00.0 SD Host controller: O2 Micro, Inc. SD/MMC Card Reader Controller (rev 01)

@back2Lobby
Copy link

Same issue on my Ubuntu 24, moving up and down the lines even with keyboard feels very laggy. I am using Nvidia 1050ti GPU.

@rayauxey rayauxey changed the title Slow on Linux (Intel Integrated Graphics) Slow on Linux (Intel Integrated Graphics, Pop!_OS ) Jul 13, 2024
@Gabriel-p
Copy link

Not sure why this got renamed to be a Pop!_OS issue. I'm running elementary OS and I also experience it, as do other people running other systems

@rayauxey rayauxey changed the title Slow on Linux (Intel Integrated Graphics, Pop!_OS ) Slow on Linux (Intel Integrated Graphics) Jul 13, 2024
@iam-arnab
Copy link

I am having the same problem.

Hardware Model: HP Laptop 15-da0xxx
Processor: Intel Core i3-7020U CPU @ 2.30 GHz x 4
Graphics: Mesa Intel HD Graphics 620 (KBL GT2)
OS: Pop!_OS 22.04 LTS
Windowing System: X11

@AnshumaanMishra
Copy link

AnshumaanMishra commented Jul 14, 2024

For me, the editor does not start at all when in iGPU mode:
OS: openSUSE Tumbleweed 20240712 x86_64
Host: 83GS (LOQ 15IAX9)
Kernel: Linux 6.9.7-1-default
CPU: 12th Gen Intel(R) Core(TM) i5-12450HX (12) @ 4.40 GHz
GPU: Intel UHD Graphics @ 1.30 GHz [Integrated]
Windowing System: X11(KDE Plasma 6.1.2)

but it runs well in dGPU mode(RTX 3050 6GB)

@hel8er
Copy link

hel8er commented Jul 14, 2024

manjaro/ intel hd also slow

@nykangash
Copy link

same issue on Kali / AMD

@DavidJS01
Copy link

I experienced the same issue on NixOS. I have a dedicated graphics card.

Hardware Information:

  • Hardware Model: ASUSTeK COMPUTER INC. P8Z77-V
  • Memory: 16.0 GiB
  • Processor: Intel® Core™ i7-3770K × 8
  • Graphics: NV136
  • Disk Capacity: 3.0 TB

Software Information:

  • Firmware Version: 1616
  • OS Name: NixOS 24.05 (Uakari)
  • OS Build: 24.05.2539.49ee0e94463a
  • OS Type: 64-bit
  • GNOME Version: 46
  • Windowing System: Wayland
  • Kernel Version: Linux 6.6.37

@MehulKhanna
Copy link

MehulKhanna commented Jul 15, 2024

Zed starts almost instantly (<1s) for me.

Hardware Information:
Hardware Model: HP Pavilion x360 Convertible 14-cd0xxx
Memory: 7677.0 MiB
CPU: Intel i3-8130U (4) @ 3.400GHz
GPU: Intel UHD Graphics 620

Software Information:
OS Name: Arch Linux x86_64
OS Type: 64-bit
Window Manager: Hyprland
Windowing System: Wayland
Kernel Version: 6.9.9-zen1-1-zen

Edit:
Scrolling and Rendering is fine for me as well.

@bajrangCoder
Copy link
Contributor

bajrangCoder commented Jul 15, 2024

Zed starts at a good speed compared to others on my device, approx <3s

Specs:
RAM: 8gb
CPU : Intel Xeon processor (of 2017 or 2018) with integrated GPU
Os: Arch linux with Kde plasma 6(with latest version of plasma), Wayland

Edit:
Scrolling and rendering stuffs also works fine but Sometimes some text rendered half either cut from top or bottom

@capacman
Copy link

i dont think this is about startup speed, its about rendering and latency. In my case scrolling file make zed process to consume 0 percent of the cpu(an entire core) and typing is not smooth

@shadmeoli
Copy link

I have tried manually accelerating zed but still getting lag.

My machine specs.

OS: Pop!_OS 22.04 LST x86_6
Gnome 42.9
GPU: Interl UHD Graphics 620
Memomry: 16gb
CPU: Intel i7-8650U (8) @ 4

@capacman
Copy link

I think i found the solution at least for me. As i mentioned before in my zed logs i found below lines:

2024-07-13T10:17:05 03:00 [WARN] Rejecting Intel for not presenting when Nvidia is present (on Linux)
2024-07-13T10:17:05 03:00 [INFO] Adapter "llvmpipe (LLVM 15.0.7, 256 bits)"

My laptop,system76 lemur pro, does not have any nvidia and i searched source code and found that zed is using blade library. https://github.com/kvark/blade/blob/473b71b20d492f753e1f6a938c0e60ac755762b0/blade-graphics/src/vulkan/init.rs#L128 line is printing above warning. That warning is behind an if condition https://github.com/kvark/blade/blob/473b71b20d492f753e1f6a938c0e60ac755762b0/blade-graphics/src/vulkan/init.rs#L116 and in some part it is checking for file called "/etc/prime-discrete" with a content "on" https://github.com/kvark/blade/blob/473b71b20d492f753e1f6a938c0e60ac755762b0/blade-graphics/src/vulkan/init.rs#L50

I edit the file /etc/prime-discrete and change the on string to off(actually any content other than on can work). Now in my zed logs i can see below line and cpu usage is about 2-3% :) which is nice

2024-07-15T22:30:36 03:00 [INFO] Adapter "Intel(R) Graphics (RPL-U)"

In the mean time you should be careful if you have nvidia prime because /etc/prime-discrete file should be related to that tech .

@shadmeoli
Copy link

I think i found the solution at least for me. As i mentioned before in my zed logs i found below lines:

2024-07-13T10:17:05 03:00 [WARN] Rejecting Intel for not presenting when Nvidia is present (on Linux) 2024-07-13T10:17:05 03:00 [INFO] Adapter "llvmpipe (LLVM 15.0.7, 256 bits)"

My laptop,system76 lemur pro, does not have any nvidia and i searched source code and found that zed is using blade library. https://github.com/kvark/blade/blob/473b71b20d492f753e1f6a938c0e60ac755762b0/blade-graphics/src/vulkan/init.rs#L128 line is printing above warning. That warning is behind an if condition https://github.com/kvark/blade/blob/473b71b20d492f753e1f6a938c0e60ac755762b0/blade-graphics/src/vulkan/init.rs#L116 and in some part it is checking for file called "/etc/prime-discrete" with a content "on" https://github.com/kvark/blade/blob/473b71b20d492f753e1f6a938c0e60ac755762b0/blade-graphics/src/vulkan/init.rs#L50

I edit the file /etc/prime-discrete and change the on string to off(actually any content other than on can work). Now in my zed logs i can see below line and cpu usage is about 2-3% :) which is nice

2024-07-15T22:30:36 03:00 [INFO] Adapter "Intel(R) Graphics (RPL-U)"

In the mean time you should be careful if you have nvidia prime because /etc/prime-discrete file should be related to that tech .

This actually works.

@flukejones
Copy link
Contributor

Quite a wide range of iGPU here. I see one that is 7 years old, and one that is 12 years old. That may have an impact on performance due to drivers if they even have vulkan drivers.

But you can see above that some are having LLVM pipe forced (CPU rendering) which will be even slower on old hardware.

Lastly if /etc/prime-discrete is "on", then it is expected that the user has set this so that their X11 desktop uses dGPU not iGPU. However I think here is where you might begin hitting issues - if you have this set (with the assumption that the related Xorg configs are also forced to dGPU) but are running a Wayland desktop it is (the xorg conf) completely ignored by pretty much every vulkan app around.

TLDR: if both iGPU and dGPU drivers fail then vulkan tries to use the last resort which is llvmpipe for cpu rendering and this is very slow.

@iam-arnab
Copy link

I think i found the solution at least for me. As i mentioned before in my zed logs i found below lines:

2024-07-13T10:17:05 03:00 [WARN] Rejecting Intel for not presenting when Nvidia is present (on Linux) 2024-07-13T10:17:05 03:00 [INFO] Adapter "llvmpipe (LLVM 15.0.7, 256 bits)"

My laptop,system76 lemur pro, does not have any nvidia and i searched source code and found that zed is using blade library. https://github.com/kvark/blade/blob/473b71b20d492f753e1f6a938c0e60ac755762b0/blade-graphics/src/vulkan/init.rs#L128 line is printing above warning. That warning is behind an if condition https://github.com/kvark/blade/blob/473b71b20d492f753e1f6a938c0e60ac755762b0/blade-graphics/src/vulkan/init.rs#L116 and in some part it is checking for file called "/etc/prime-discrete" with a content "on" https://github.com/kvark/blade/blob/473b71b20d492f753e1f6a938c0e60ac755762b0/blade-graphics/src/vulkan/init.rs#L50

I edit the file /etc/prime-discrete and change the on string to off(actually any content other than on can work). Now in my zed logs i can see below line and cpu usage is about 2-3% :) which is nice

2024-07-15T22:30:36 03:00 [INFO] Adapter "Intel(R) Graphics (RPL-U)"

In the mean time you should be careful if you have nvidia prime because /etc/prime-discrete file should be related to that tech .

This worked for me too.

@nykangash
Copy link

I think i found the solution at least for me. As i mentioned before in my zed logs i found below lines:

2024-07-13T10:17:05 03:00 [WARN] Rejecting Intel for not presenting when Nvidia is present (on Linux) 2024-07-13T10:17:05 03:00 [INFO] Adapter "llvmpipe (LLVM 15.0.7, 256 bits)"

My laptop,system76 lemur pro, does not have any nvidia and i searched source code and found that zed is using blade library. https://github.com/kvark/blade/blob/473b71b20d492f753e1f6a938c0e60ac755762b0/blade-graphics/src/vulkan/init.rs#L128 line is printing above warning. That warning is behind an if condition https://github.com/kvark/blade/blob/473b71b20d492f753e1f6a938c0e60ac755762b0/blade-graphics/src/vulkan/init.rs#L116 and in some part it is checking for file called "/etc/prime-discrete" with a content "on" https://github.com/kvark/blade/blob/473b71b20d492f753e1f6a938c0e60ac755762b0/blade-graphics/src/vulkan/init.rs#L50

I edit the file /etc/prime-discrete and change the on string to off(actually any content other than on can work). Now in my zed logs i can see below line and cpu usage is about 2-3% :) which is nice

2024-07-15T22:30:36 03:00 [INFO] Adapter "Intel(R) Graphics (RPL-U)"

In the mean time you should be careful if you have nvidia prime because /etc/prime-discrete file should be related to that tech .

please help me on AMD gpu s
i'm using AMD Radeon 7400 HD

@asenetcky
Copy link

I think i found the solution at least for me. As i mentioned before in my zed logs i found below lines:

2024-07-13T10:17:05 03:00 [WARN] Rejecting Intel for not presenting when Nvidia is present (on Linux) 2024-07-13T10:17:05 03:00 [INFO] Adapter "llvmpipe (LLVM 15.0.7, 256 bits)"

My laptop,system76 lemur pro, does not have any nvidia and i searched source code and found that zed is using blade library. https://github.com/kvark/blade/blob/473b71b20d492f753e1f6a938c0e60ac755762b0/blade-graphics/src/vulkan/init.rs#L128 line is printing above warning. That warning is behind an if condition https://github.com/kvark/blade/blob/473b71b20d492f753e1f6a938c0e60ac755762b0/blade-graphics/src/vulkan/init.rs#L116 and in some part it is checking for file called "/etc/prime-discrete" with a content "on" https://github.com/kvark/blade/blob/473b71b20d492f753e1f6a938c0e60ac755762b0/blade-graphics/src/vulkan/init.rs#L50

I edit the file /etc/prime-discrete and change the on string to off(actually any content other than on can work). Now in my zed logs i can see below line and cpu usage is about 2-3% :) which is nice

2024-07-15T22:30:36 03:00 [INFO] Adapter "Intel(R) Graphics (RPL-U)"

In the mean time you should be careful if you have nvidia prime because /etc/prime-discrete file should be related to that tech .

This worked for me as well using pop_os! on one of system76's meerkat 8's!! I had 100% cpu usage and temps were skyrocketing. I didn't have the same problem on the amd framework13 with pop os.

@AnshumaanMishra
Copy link

For me, the editor does not start at all when in iGPU mode: OS: openSUSE Tumbleweed 20240712 x86_64 Host: 83GS (LOQ 15IAX9) Kernel: Linux 6.9.7-1-default CPU: 12th Gen Intel(R) Core(TM) i5-12450HX (12) @ 4.40 GHz GPU: Intel UHD Graphics @ 1.30 GHz [Integrated] Windowing System: X11(KDE Plasma 6.1.2)

but it runs well in dGPU mode(RTX 3050 6GB)

The issue was resolved upon updating the vulkan drivers for my system and reinstalling the intel-specific vulkan drivers
Steps followed:

$ sudo zypper rm libvulkan_intel
$ sudo zypper in libvulkan_intel
$ sudo reboot

Now, the lag is almost unnoticeable, although performance is not as good as using the dGPU

@stalkerg
Copy link

Hey! If you are using latest kernel latest intel/amd driver and it still slow, you should create a ticket here https://gitlab.freedesktop.org/mesa/mesa/-/issues it's project which responsible for your drivers.
I believe even for hasvk possible improve to perfect Zed work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect [core label] linux performance Feedback for performance issues, speed, memory usage, etc
Projects
None yet
Development

No branches or pull requests