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.99k stars 359 forks source link

Window resize glitching on Ubuntu #4363

Open kubijo opened 6 months ago

kubijo commented 6 months ago

Discord username (optional)

kubijo

Describe the bug

The window resizing is glitching both the background and in content of the terminal window. The content of the window seems to act in reverse to the resize direction

To reproduce

See the screencast.

Expected behavior

No response

Screenshots

Note that the built-in ubuntu screen recording tool also does not seem to play well with the way you render the window. What you don't see here is that the area of the terminal window outside the crop-out is completely black while recording.

Screencast from 2024-02-27 09-31-27.webm

Operating system

Linux

Operating system and version

Ubuntu 23.10

Shell Version

GNU bash, version 5.2.15(1)-release (x86_64-pc-linux-gnu)

Current Warp version

No response

Regression

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

Recent working Warp date

v0.2024.02.20.08.01.stable_02

Additional context

Does this block you from using Warp daily?

No

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

kubijo commented 6 months ago

As a sidenote ... you can't see a cursor because the gnome recording tool seems to be broken on described combination in regard to showing the cursor regardless of preference

LFd3v commented 6 months ago

Hi, there. Could you please try to start warp-terminal from another terminal emulator and share the output here inside a command block?

Also, the same happens if you start it using the OpenGL backend using WGPU_BACKEND=gl warp-terminal?

Thank you.

kubijo commented 6 months ago
❯ warp-terminal
stdout is a tty true, in CI false.  using logfile: false
17:09:42 [INFO] Spawning terminal server process...
17:09:42 [INFO] Running terminal server...
17:09:42 [WARN] Failed to load font Some("/usr/share/fonts/X11/Type1/NimbusMonoPS-Regular.pfb"): InvalidFontFormat("Type 1")
17:09:42 [WARN] Failed to load font Some("/usr/share/fonts/X11/Type1/StandardSymbolsPS.pfb"): InvalidFontFormat("Type 1")
17:09:42 [WARN] Failed to load font: Hack due to error Font family Hack does not contain any valid fonts
17:09:42 [INFO] Crash reporting setting is disabled; not initializing sentry.
17:09:42 [INFO] Starting warp with channel state ChannelState { channel: Stable, app_id: AppId { qualifier: "dev", organization: "warp", application_name: "Warp" }, additional_features: {}, firebase_api_key: "AIzaSyBdy3O3S9hrdayLJxJ7mriBR4qgUaUygAs", server_root_url: "https://app.warp.dev", ws_server_url: "wss://rtc.app.warp.dev/graphql", session_sharing_server_url: Some("wss://session-sharing-server-o3mgmiurkq-uk.a.run.app"), segment_write_key: "sTT9ZajzIaQ0phzLFOnqZ6VOqplJTlaJ", segment_root_url: "https://api.segment.io", releases_base_url: "https://releases.warp.dev", sentry_url: "https://0195a81da0714f55a93ee4624825f9ec@o540343.ingest.sentry.io/5658526", logfile_name: "warp.log", show_autoupdate_menu_items: true, skip_login: false } and version Some("v0.2024.02.20.08.01.stable_02")
17:09:42 [INFO] Performance metrics collector started
17:09:42 [INFO] Flushed telemetry events.
17:09:42 [INFO] Initializing app services
17:09:42 [WARN] No config found!
17:09:42 [WARN] EGL says it can present to the window but not natively
17:09:42 [INFO] Connecting to SQLite database
17:09:42 [INFO] fetching team tester status
17:09:42 [INFO] Checking for update on channel stable_release. Update id is fq3Luuc
17:09:42 [INFO] Fetching channel versions (without changelogs) from Warp server
17:09:42 [INFO] dispatching global action for root_view:open_from_restored
17:09:42 [INFO] Computing available system fonts
17:09:42 [INFO] Block finished with new state DoneWithExecution
17:09:42 [INFO] Block finished with new state DoneWithExecution
17:09:42 [INFO] Block finished with new state DoneWithExecution
17:09:42 [INFO] Block finished with new state DoneWithExecution
17:09:42 [INFO] Block finished with new state DoneWithExecution
17:09:42 [INFO] Block finished with new state DoneWithExecution
17:09:42 [INFO] Starting shell /usr/bin/bash
17:09:42 [INFO] Successfully spawned tty with pid: 299772
17:09:42 [INFO] Successfully spawned child bash process with pid 299772
17:09:42 [INFO] Fetching channel versions and changelogs from Warp server
17:09:42 [INFO] dispatching global action for workspace:save_app
17:09:42 [INFO] dispatching global action for workspace:save_app
17:09:42 [WARN] Tried to update block filter query without active_filter_editor_block_index set
17:09:42 [INFO] dispatching global action for workspace:save_app
17:09:42 [WARN] Failed to load font Some("/usr/share/fonts/X11/Type1/NimbusMonoPS-Regular.pfb"): InvalidFontFormat("Type 1")
17:09:42 [WARN] Failed to load font Some("/usr/share/fonts/X11/Type1/StandardSymbolsPS.pfb"): InvalidFontFormat("Type 1")
17:09:42 [WARN] No alert dialog was set for the native modal
17:09:42 [WARN] Tried to render share modal without a model
17:09:42 [WARN] Tried to render share modal without a model
17:09:42 [WARN] No alert dialog was set for the native modal
17:09:42 [INFO] Received InitShell hook
17:09:43 [INFO] Guessed window scale factor: 1
17:09:43 [INFO] Loaded 79 font families
17:09:43 [WARN] No config found!
17:09:43 [WARN] EGL says it can present to the window but not natively
17:09:43 [INFO] Enabled wgpu backends: Backends(VULKAN | GL | METAL | DX12 | DX11 | BROWSER_WEBGPU)
17:09:43 [INFO] Available wgpu adapters:
17:09:43 [INFO] DiscreteGpu: NVIDIA GeForce RTX 4090
17:09:43 [INFO]     Driver: NVIDIA (535.154.05)
17:09:43 [INFO] Cpu: llvmpipe (LLVM 15.0.7, 256 bits)
17:09:43 [INFO]     Driver: llvmpipe (Mesa 23.2.1-1ubuntu3.1 (LLVM 15.0.7))
17:09:43 [INFO] Other: NVIDIA GeForce RTX 4090/PCIe/SSE2
17:09:43 [INFO]     Driver: Unknown
17:09:43 [INFO] Using DiscreteGpu (NVIDIA GeForce RTX 4090) for rendering new window.
17:09:43 [INFO] Received channel versions from Warp server: dev: ChannelVersion { version_info: VersionInfo { version: "v0.2024.02.27.08.02.dev_00", update_by: None, soft_cutoff: Some("v0.2023.05.12.08.03.dev_00") }, overrides: [] }; preview: ChannelVersion { version_info: VersionInfo { version: "v0.2024.02.27.08.02.preview_00", update_by: None, soft_cutoff: None }, overrides: [] }; canary: ChannelVersion { version_info: VersionInfo { version: "v0.2022.09.29.08.08.canary_00", update_by: None, soft_cutoff: None }, overrides: [] }; beta: ChannelVersion { version_info: VersionInfo { version: "v0.2024.02.27.08.02.beta_00", update_by: None, soft_cutoff: None }, overrides: [] }; stable: ChannelVersion { version_info: VersionInfo { version: "v0.2024.02.20.08.01.stable_02", update_by: None, soft_cutoff: Some("v0.2024.01.02.08.02.stable_01") }, overrides: [] }
17:09:43 [INFO] Received channel versions from Warp server: dev: ChannelVersion { version_info: VersionInfo { version: "v0.2024.02.27.08.02.dev_00", update_by: None, soft_cutoff: Some("v0.2023.05.12.08.03.dev_00") }, overrides: [] }; preview: ChannelVersion { version_info: VersionInfo { version: "v0.2024.02.27.08.02.preview_00", update_by: None, soft_cutoff: None }, overrides: [] }; canary: ChannelVersion { version_info: VersionInfo { version: "v0.2022.09.29.08.08.canary_00", update_by: None, soft_cutoff: None }, overrides: [] }; beta: ChannelVersion { version_info: VersionInfo { version: "v0.2024.02.27.08.02.beta_00", update_by: None, soft_cutoff: None }, overrides: [] }; stable: ChannelVersion { version_info: VersionInfo { version: "v0.2024.02.20.08.01.stable_02", update_by: None, soft_cutoff: Some("v0.2024.01.02.08.02.stable_01") }, overrides: [] }
17:09:43 [WARN] No alert dialog was set for the native modal
17:09:43 [WARN] Tried to render share modal without a model
17:09:43 [WARN] Failed to load font Some("/usr/share/fonts/X11/Type1/C059-Roman.pfb"): InvalidFontFormat("Type 1")
17:09:43 [WARN] Failed to load font Some("/usr/share/fonts/X11/Type1/StandardSymbolsPS.pfb"): InvalidFontFormat("Type 1")
17:09:43 [WARN] Failed to load font Some("/usr/share/fonts/X11/Type1/C059-Bold.pfb"): InvalidFontFormat("Type 1")
17:09:43 [WARN] Failed to load font Some("/usr/share/fonts/X11/Type1/StandardSymbolsPS.pfb"): InvalidFontFormat("Type 1")
17:09:43 [INFO] Finished loading 79 fonts
17:09:43 [INFO] No update available
17:09:43 [INFO] fetching teams metadata
17:09:43 [INFO] fetching updated cloud objects, including generic string objects
17:09:43 [WARN] redraw_frame was called 19 times before the frame was drawn
17:09:43 [INFO] active window changed: Some(WindowId(0))
17:09:43 [INFO] dispatching global action for root_view:update_quake_mode_state
17:09:43 [INFO] dispatching global action for workspace:save_app
17:09:43 [WARN] redraw_frame was called 2 times before the frame was drawn
17:09:43 [INFO] Received CommandFinished hook
17:09:43 [INFO] Block finished with new state DoneWithNoExecution
17:09:43 [INFO] Incrementing stage from WarpInput to ScriptExecution
17:09:43 [INFO] dispatching global action for workspace:save_app
17:09:43 [INFO] Received Precmd hook
17:09:43 [WARN] redraw_frame was called 3 times before the frame was drawn
17:09:43 [INFO] object does not exist in-memory, ignoring
17:09:43 [INFO] Received Bootstrapped hook
17:09:43 [INFO] Configured typeahead mode as ShellReported
17:09:43 [INFO] Parsed shell version string: Some([Number(5), Number(2), Number(15), Number(1), Text("release")])
17:09:43 [INFO] Shell is bootstrapped with session_id SessionId(17090501827120)
17:09:43 [INFO] Loading history from file /home/pepa/.bash_history for shell bash
17:09:43 [INFO] Received CommandFinished hook
17:09:43 [INFO] Block finished with new state DoneWithNoExecution
17:09:43 [INFO] Incrementing stage from Bootstrapped to PostBootstrapPrecmd
17:09:43 [INFO] dispatching global action for workspace:save_app
17:09:43 [WARN] redraw_frame was called 2 times before the frame was drawn
17:09:43 [INFO] Received Precmd hook
17:09:43 [WARN] redraw_frame was called 3 times before the frame was drawn
17:09:43 [WARN] redraw_frame was called 2 times before the frame was drawn
17:09:43 [INFO] Received InputBuffer hook
17:09:45 [INFO] active window changed: None
17:09:45 [INFO] dispatching global action for root_view:update_quake_mode_state
17:09:45 [INFO] dispatching global action for workspace:save_app

For the WGPU_BACKEND=gl warp-terminal I get the following:

stdout is a tty true, in CI false.  using logfile: false
17:10:47 [INFO] Spawning terminal server process...
17:10:47 [INFO] Running terminal server...
17:10:47 [WARN] Failed to load font Some("/usr/share/fonts/X11/Type1/NimbusMonoPS-Regular.pfb"): InvalidFontFormat("Type 1")
17:10:47 [WARN] Failed to load font Some("/usr/share/fonts/X11/Type1/StandardSymbolsPS.pfb"): InvalidFontFormat("Type 1")
17:10:47 [WARN] Failed to load font: Hack due to error Font family Hack does not contain any valid fonts
17:10:47 [INFO] Crash reporting setting is disabled; not initializing sentry.
17:10:47 [INFO] Starting warp with channel state ChannelState { channel: Stable, app_id: AppId { qualifier: "dev", organization: "warp", application_name: "Warp" }, additional_features: {}, firebase_api_key: "AIzaSyBdy3O3S9hrdayLJxJ7mriBR4qgUaUygAs", server_root_url: "https://app.warp.dev", ws_server_url: "wss://rtc.app.warp.dev/graphql", session_sharing_server_url: Some("wss://session-sharing-server-o3mgmiurkq-uk.a.run.app"), segment_write_key: "sTT9ZajzIaQ0phzLFOnqZ6VOqplJTlaJ", segment_root_url: "https://api.segment.io", releases_base_url: "https://releases.warp.dev", sentry_url: "https://0195a81da0714f55a93ee4624825f9ec@o540343.ingest.sentry.io/5658526", logfile_name: "warp.log", show_autoupdate_menu_items: true, skip_login: false } and version Some("v0.2024.02.20.08.01.stable_02")
17:10:47 [INFO] Flushed telemetry events.
17:10:47 [INFO] Performance metrics collector started
17:10:47 [INFO] Initializing app services
17:10:47 [WARN] No config found!
17:10:47 [WARN] EGL says it can present to the window but not natively
17:10:48 [INFO] Connecting to SQLite database
17:10:48 [INFO] Checking for update on channel stable_release. Update id is 2RrkGDV
17:10:48 [INFO] fetching team tester status
17:10:48 [INFO] Fetching channel versions (without changelogs) from Warp server
17:10:48 [INFO] dispatching global action for root_view:open_from_restored
17:10:48 [INFO] Computing available system fonts
17:10:48 [INFO] Block finished with new state DoneWithExecution
17:10:48 [INFO] Block finished with new state DoneWithExecution
17:10:48 [INFO] Block finished with new state DoneWithExecution
17:10:48 [INFO] Block finished with new state DoneWithExecution
17:10:48 [INFO] Block finished with new state DoneWithExecution
17:10:48 [INFO] Block finished with new state DoneWithExecution
17:10:48 [INFO] Starting shell /usr/bin/bash
17:10:48 [INFO] Successfully spawned tty with pid: 300465
17:10:48 [INFO] Successfully spawned child bash process with pid 300465
17:10:48 [INFO] Fetching channel versions and changelogs from Warp server
17:10:48 [INFO] dispatching global action for workspace:save_app
17:10:48 [INFO] dispatching global action for workspace:save_app
17:10:48 [WARN] Tried to update block filter query without active_filter_editor_block_index set
17:10:48 [INFO] dispatching global action for workspace:save_app
17:10:48 [WARN] No alert dialog was set for the native modal
17:10:48 [WARN] Failed to load font Some("/usr/share/fonts/X11/Type1/NimbusMonoPS-Regular.pfb"): InvalidFontFormat("Type 1")
17:10:48 [WARN] Failed to load font Some("/usr/share/fonts/X11/Type1/StandardSymbolsPS.pfb"): InvalidFontFormat("Type 1")
17:10:48 [WARN] Tried to render share modal without a model
17:10:48 [WARN] Tried to render share modal without a model
17:10:48 [WARN] No alert dialog was set for the native modal
17:10:48 [INFO] Received InitShell hook
17:10:48 [INFO] Loaded 79 font families
17:10:48 [INFO] Guessed window scale factor: 1
17:10:48 [WARN] No config found!
17:10:48 [WARN] EGL says it can present to the window but not natively
17:10:48 [INFO] Enabled wgpu backends: Backends(GL)
17:10:48 [INFO] Available wgpu adapters:
17:10:48 [INFO] Other: NVIDIA GeForce RTX 4090/PCIe/SSE2
17:10:48 [INFO]     Driver: Unknown
17:10:48 [ERROR] Failed to open window: No wgpu adapter was found
17:10:48 [INFO] Tried to exit the alternate screen, but it was already inactive
17:10:48 [INFO] Block finished with new state DoneWithNoExecution
17:10:48 [WARN] Session abandoned before bootstrap for shell Some(Bash) on ssh false
17:10:48 [WARN] Redraw requested for a window for which we have no state
17:10:48 [INFO] application will terminate
17:10:48 [INFO] Shutting down SQLite writer thread
17:10:48 [INFO] Shut down SQLite writer in 266.977µs
17:10:48 [INFO] Not writing queued events to disk because telemetry is disabled.
17:10:48 [INFO] Successfully wrote telemetry events to disk
17:10:48 [INFO] Tearing down app services...
17:10:48 [INFO] Received empty message; assuming the connection has been closed.
thread 'background-executor-31' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.5.0/src/runnable.rs:437:17:
local task dropped by a thread that didn't spawn it
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
17:10:48 [INFO] Received channel versions from Warp server: dev: ChannelVersion { version_info: VersionInfo { version: "v0.2024.02.27.08.02.dev_00", update_by: None, soft_cutoff: Some("v0.2023.05.12.08.03.dev_00") }, overrides: [] }; preview: ChannelVersion { version_info: VersionInfo { version: "v0.2024.02.27.08.02.preview_00", update_by: None, soft_cutoff: None }, overrides: [] }; canary: ChannelVersion { version_info: VersionInfo { version: "v0.2022.09.29.08.08.canary_00", update_by: None, soft_cutoff: None }, overrides: [] }; beta: ChannelVersion { version_info: VersionInfo { version: "v0.2024.02.27.08.02.beta_00", update_by: None, soft_cutoff: None }, overrides: [] }; stable: ChannelVersion { version_info: VersionInfo { version: "v0.2024.02.20.08.01.stable_02", update_by: None, soft_cutoff: Some("v0.2024.01.02.08.02.stable_01") }, overrides: [] }
thread 'background-executor-31' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-task-4.5.0/src/utils.rs:17:5:
aborting the process
stack backtrace:
LFd3v commented 6 months ago

Thank you. It seems that the problem is the NVidia Vulkan driver, but it is also weird that it does not work with the OpenGL driver. Unfortunately, I have no idea of a workaround as of now. Hopefully this issue will be fixed in a newer NVidia driver or Warp release.

dannyneira commented 6 months ago

Hey folks! Thanks for your patience while trying Warp. Could you download the latest version of Warp at https://www.warp.dev/linux-terminal ?

If using Wayland, you can enable Wayland support by setting the WARP_ENABLE_WAYLAND envar (e.gWARP_ENABLE_WAYLAND=1 warp-terminal).

kubijo commented 6 months ago

Hey @dannyneira … I have just downloaded and opened the AppImage you provided, and it does much the same. I am attaching a log with terminal output from the session.

log.log

dannyneira commented 6 months ago

Also, please see the latest release on our site https://app.warp.dev/get_warp, it's got a ton of bug fixes that mau address some issues. https://docs.warp.dev/getting-started/changelog#id-2024.02.29-v0.2024.02.27.08.01.stable_03

kubijo commented 6 months ago

I did an upgrade today and it didn't fix the issue

dannyneira commented 5 months ago

Hi folks, quick PSA that if you're on Nvidia drivers version 535.x, it may help to upgrade those drivers to 545.x or 550.x and above. If that does help with your Warp issues, please let us know.

kubijo commented 5 months ago

Hey @dannyneira … I've just upgraded the nvidia drivers & id did not help

System Information

NVIDIA Driver Version: 550.67
NVML Version: 12,550.67

X Server Information

Server Version Number: 11.0
Server Vendor String: The X.Org Foundation
Server Vendor Version: 1.21.1.7 (12101007)
NV-CONTROL Version: 1.29
dannyneira commented 5 months ago

@kubijo heard, I see a lot of font errors on your previous logs that you posted, try sudo apt install fonts-hack to install the font, restart your computer (since you updated the nvidia drivers), and see if that helps.

kubijo commented 5 months ago

I did, of course, restart after the drivers update and while dubious about its efficacy also installed the font to no avail.

Also, another thing I did not mention last time, but do observe regularly, is that the whole screen starts to flicker annoyingly when there is A LOT of text in the active terminal tab (say some lengthy compilation).

To remedy that, the tab needs to be closed, and a new session created (since there is no reset with warp).

dannyneira commented 5 months ago

understood, I think this flicker may be due to the lack of native Wayland support which we are working on and should launch in the coming weeks. If you run warp-terminal without the WARP_ENABLE_WAYLAND env variable, it should fall back to using x11 (xwayland) which may help with the flicker issue.

kubijo commented 5 months ago

Well, I'm not on Wayland though … since a lot that I care about still doesn't work in that thing.

echo $XDG_SESSION_TYPE
x11
dannyneira commented 5 months ago

Heard, i'll let the team know and see if there is any possible workaround. If you can please run Warp with the following command RUST_LOG=wgpu_core=info,wgpu_hal=info MESA_DEBUG=1 EGL_LOG_LEVEL=debug warp-terminal attach logs and tell us the result of eglinfo.

kubijo commented 3 months ago

Heard, i'll let the team know and see if there is any possible workaround. If you can please run Warp with the following command RUST_LOG=wgpu_core=info,wgpu_hal=info MESA_DEBUG=1 EGL_LOG_LEVEL=debug warp-terminal attach logs and tell us the result of eglinfo.

I've come back to ask if there has been any progress on trying to debug this one and noticed you have actually asked for some more info, so here it is.

I have also upgraded NVIDIA drivers and my system to Ubuntu 24.04. The warp.log has been produced by running warp as suggested and resizing the window few times.

kubijo commented 1 month ago

Just switched to wayland (for other reasons) and this issue is not there ... but it is not somewhat flickery during resize - that said it is a better state for sure.