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
21.3k stars 371 forks source link

Linux: Slow startup time. 1-2 minutes. #5098

Closed tnfssc closed 1 week ago

tnfssc commented 3 months ago

Dupe Check

Describe the bug

Warp starts up really slow on Linux. Upto 2 minutes from click to UI.

I tried both Deb and AppImage version. Both behave the same. I looked through the startup logs and found this, where most of time is spent. The full log is here warp-startup.log.

// snip
16:20:57 [INFO] Initializing app services
16:20:57 [INFO] Not sending telemetry event because telemetry is disabled.
16:22:52 [INFO] Instance version: 0x403113
16:22:52 [INFO] Debug utils not enabled: debug_utils_user_data not passed to Instance::from_raw
// snip

Edit: WGPU_BACKEND=gl warp-terminal opens the terminal instantly.

To reproduce

  1. Open Warp Terminal.
  2. Wait for 2 minutes for it to open.

Expected behavior

No response

Screenshots

No response

Operating system

Linux

Operating system and version

Ubuntu 24.04

Shell Version

No response

Current Warp version

No response

Regression

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

Recent working Warp date

No response

Additional context

The logs attached in the description are created using the RUST_LOG=wgpu_core=info,wgpu_hal=info MESA_DEBUG=1 EGL_LOG_LEVEL=debug warp-terminal command. Here's the same file again warp-startup.log. I couldn't find eglinfo in the logs.

System Details: Ubuntu 24.04 LTS Wayland AMD Ryzen 9 7940HS CPU AMD Radeon 780M Graphics ~Nvidia Geforce RTX 4070 GPU~ (disabled with envycontrol)

Similar issue with other applications: I had a very similar issue with VSCode. I later discovered that the issue was with Chromium itself. Chromium took very long time to open, sometimes over 10 minutes. I was able to mitigate Chromium's issue by disabling the GPU and the software rasterizer. The same flags work with VSCode too.

 chromium --disable-gpu --disable-software-rasterizer
 code --disable-gpu --disable-software-rasterizer

This Chromium issue, I was getting it in Fedora, Ubuntu and Manjaro. Both X11 and Wayland. Interestingly though, Flatpak Chromium works fine. Flatpak VSCode too.

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

dannyneira commented 3 months ago

Hi @tnfssc this may be related to the Nvidia drivers, I noticed you mentioned you disabled the discrete GPU with settings and once you forced OPEN GL it rendered instantly. I recommend updating the Nvidia drivers to the latest proprietary if possible. Also noticed you're on Wayland, were working on native Wayland support which may also help with rendering Warp on your system.

Also, make sure you use the latest version of Warp as we're releasing weekly updates to fix many of the issues.

To anyone else facing this issue, please add a 👍 to the original post at the top or comment with your details, and subscribe if you'd like to be notified.

OpenCode commented 3 months ago

Same here on Debian Debian 6.9.10-1

$ lspci | grep ' VGA ' | cut -d" " -f 1 | xargs -i lspci -v -s {}

00:02.0 VGA compatible controller: Intel Corporation Raptor Lake-P [UHD Graphics] (rev 04) (prog-if 00 [VGA controller])
    Subsystem: Lenovo Device 230e
    Flags: bus master, fast devsel, latency 0, IRQ 188, IOMMU group 0
    Memory at 603c000000 (64-bit, non-prefetchable) [size=16M]
    Memory at 4000000000 (64-bit, prefetchable) [size=256M]
    I/O ports at 2000 [size=64]
    Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
    Capabilities: <access denied>
    Kernel driver in use: i915
    Kernel modules: i915

@tnfssc solution doesn't work in my case

OpenCode commented 1 month ago

Hi @tnfssc this may be related to the Nvidia drivers, I noticed you mentioned you disabled the discrete GPU with settings and once you forced OPEN GL it rendered instantly. I recommend updating the Nvidia drivers to the latest proprietary if possible. Also noticed you're on Wayland, were working on native Wayland support which may also help with rendering Warp on your system.

Also, make sure you use the latest version of Warp as we're releasing weekly updates to fix many of the issues.

To anyone else facing this issue, please add a 👍 to the original post at the top or comment with your details, and subscribe if you'd like to be notified.

New Wayland support doesn't solve this problem

Signe93 commented 1 month ago

I'm having the same issue on Debian. Don't have Nvidia GPU, just Intel integrated graphics. Updated earlier today but the problem still exists.

mrchantey commented 3 weeks ago

I'm also getting >1min startup times.

Warp version v0.2024.09.24.08.02.stable_01

Heres my specs # System Details Report --- ## Report details - **Date generated:** 2024-10-04 08:43:32 ## Hardware Information: - **Hardware Model:** ASUSTeK COMPUTER INC. ROG STRIX Z370-E GAMING - **Memory:** 32.0 GiB - **Processor:** Intel® Core™ i7-8700K × 12 - **Graphics:** NVIDIA GeForce RTX™ 3080 Ti - **Disk Capacity:** 4.0 TB ## Software Information: - **Firmware Version:** 2401 - **OS Name:** Ubuntu 24.04.1 LTS - **OS Build:** (null) - **OS Type:** 64-bit - **GNOME Version:** 46 - **Windowing System:** X11 - **Kernel Version:** Linux 6.8.0-45-generic

Edit: It opened immediately this morning, I had the computer running for 20 mins before opening it so it may be tied to time since boot.

Lendersmark commented 2 weeks ago

Same problem here, Ubuntu 24.10

aminya commented 2 weeks ago

The issue is Wayland. See the solution here: https://github.com/warpdotdev/Warp/issues/5367#issuecomment-2408890422

OpenCode commented 2 weeks ago

The issue is Wayland. See the solution here: #5367 (comment)

It doesn't work. This is my application launcher:

[Desktop Entry]
# The version of the desktop entry spec this conforms to.
Version=1.0

Type=Application

Name=Warp
GenericName=TerminalEmulator

Exec=warp-terminal %U
StartupWMClass=dev.warp.Warp

Keywords=shell;prompt;command;commandline;cmd;

Icon=dev.warp.Warp

Categories=System;TerminalEmulator;

# Don't run this application within a terminal.
Terminal=false

# Register ourselves as the handler for warp:// URLs.
MimeType=x-scheme-handler/warp;
aminya commented 2 weeks ago

Make sure no warp process is running

pkill warp

Then try to launch it again. It works for me under Kubuntu 24.10 with KDE.

Alternatively, you can log in with a X11 session.

psmgeelen commented 2 weeks ago

Same issue here, might be a Wayland issue? https://github.com/warpdotdev/Warp/issues/5367 The solution that was suggested

WAYLAND_DISPLAY=Z warp-terminal

Didn't work for me..

Signe93 commented 1 week ago

The issue is Wayland. See the solution here: #5367 (comment)

I've updated to v0.2024.10.08.08.02.stable_02 today, but the issue still persisted. Then I've tried to adjust my .desktop file like in the thread mentioned above and it starts immediately. Thanks! Here's my .desktop file, maybe it'll help somebody:

[Desktop Entry]
# The version of the desktop entry spec this conforms to.
Version=1.0

Type=Application

Name=Warp
GenericName=TerminalEmulator

Exec=env WAYLAND_DISPLAY=, warp-terminal %U
StartupWMClass=dev.warp.Warp

Keywords=shell;prompt;command;commandline;cmd;

Icon=dev.warp.Warp

Categories=System;TerminalEmulator;

# Don't run this application within a terminal.
Terminal=false

# Register ourselves as the handler for warp:// URLs.
MimeType=x-scheme-handler/warp;
psmgeelen commented 1 week ago

Should be resolved with new release https://github.com/warpdotdev/Warp/issues/5367

OpenCode commented 1 week ago

Should be resolved with new release #5367

Confirm. It works! 🎉