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

Initialization failed due to unrecognized device #4390

Open
smonolo opened this issue Feb 28, 2024 · 11 comments
Open

Initialization failed due to unrecognized device #4390

smonolo opened this issue Feb 28, 2024 · 11 comments

Comments

@smonolo
Copy link

smonolo commented Feb 28, 2024

Discord username (optional)

stefano

Describe the bug

Sometimes, apparently after closing down the app once, Warp won't fully initialize and close down right after opening it. I checked the logs and it looks like it fails to recognize the device.

To reproduce

  1. Open the app
  2. Close it down (I experienced it by using exit)
  3. Try to open it again

Expected behavior

Warp should open up and run correctly

Screenshots

Screencast.from.2024-02-28.10-02-36.webm

Operating system

Linux

Operating system and version

Ubuntu 23.10

Shell Version

bash 5.2.15

Current Warp version

No response

Regression

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

Recent working Warp date

2028-02-28 09:30

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

@LFd3v
Copy link

LFd3v commented Feb 28, 2024

Hi, there. Could you please provide more info to troubleshoot the issue?

  1. Output of the command glxinfo | grep -i opengl added inside a code block
  2. The output of trying to start warp-terminal from another terminal when the problem happens, also inside a code block.

Thank you.

@smonolo
Copy link
Author

smonolo commented Feb 29, 2024

Hi @LFd3v. Here's the output of the two commands.

glxinfo | grep -i opengl

OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) Xe Graphics (TGL GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 23.2.1-1ubuntu3.1
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 23.2.1-1ubuntu3.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

warp-terminal

It looks like that I can't always reproduce the issue following the steps provided, but here's the error logs from yesterday when Warp crashed:

2024-02-27T10:30:00Z [WARN] Disabling presentation on 'Intel(R) Xe Graphics (TGL GT2)' (id 0x55bcbda1a6f0) due to NV Optimus and Intel Mesa < v21.2
2024-02-27T10:30:01Z [INFO] Using DiscreteGpu (NVIDIA T500) for rendering new window.
2024-02-27T10:30:01Z [WARN] Unrecognized device error ERROR_INITIALIZATION_FAILED                                                                                                 
2024-02-27T10:30:01Z [ERROR] Failed to open window: Connection to device was lost during initialization
2024-02-27T10:30:01Z [INFO] Tried to exit the alternate screen, but it was already inactive
2024-02-27T10:30:01Z [INFO] Block finished with new state DoneWithNoExecution
2024-02-27T10:30:01Z [WARN] Session abandoned before bootstrap for shell Some(Bash) on ssh false
2024-02-27T10:30:01Z [INFO] fetching teams metadata
2024-02-27T10:30:01Z [INFO] No update available
2024-02-27T10:30:01Z [WARN] Redraw requested for a window for which we have no state
2024-02-27T10:30:01Z [INFO] fetching updated cloud objects, including generic string objects
2024-02-27T10:30:01Z [WARN] Redraw requested for a window for which we have no state
2024-02-27T10:30:01Z [INFO] application will terminate 
2024-02-27T10:30:01Z [INFO] Shutting down SQLite writer thread

Hope it's helpful enough.

@smonolo
Copy link
Author

smonolo commented Feb 29, 2024

@LFd3v actually, I was able to reproduce the issue just now. Here's the very latest logs from warp-terminal command:

stdout is a tty true, in CI false.  using logfile: false
10:04:24 [INFO] Spawning terminal server process...
10:04:24 [INFO] Running terminal server...
10:04:24 [WARN] Failed to load font Some("/usr/share/fonts/X11/Type1/NimbusMonoPS-Regular.pfb"): InvalidFontFormat("Type 1")
10:04:24 [WARN] Failed to load font Some("/usr/share/fonts/X11/Type1/StandardSymbolsPS.pfb"): InvalidFontFormat("Type 1")
10:04:24 [WARN] Failed to load font: Hack due to error Font family Hack does not contain any valid fonts
10:04:24 [INFO] Initializing crash reporting Some("stable_release") with tag "v0.2024.02.20.08.01.stable_02"...
10:04:24 [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")
10:04:24 [INFO] Performance metrics collector started
10:04:24 [INFO] Start to flush telemetry events to Segment
10:04:24 [INFO] Dropping empty telemetry batch
10:04:24 [INFO] Initializing app services
10:04:24 [INFO] Flushed telemetry events.
10:04:24 [INFO] Start to flush telemetry events to Segment
10:04:24 [WARN] No config found!
10:04:24 [WARN] No config found!
10:04:24 [WARN] Disabling presentation on 'Intel(R) Xe Graphics (TGL GT2)' (id 0x556f23bf8500) due to NV Optimus and Intel Mesa < v21.2
10:04:24 [INFO] Connecting to SQLite database
10:04:24 [INFO] Attempting to start websocket connection in CloudObjects::Listener
10:04:24 [INFO] fetching team tester status
10:04:24 [INFO] Checking for update on channel stable_release. Update id is gXYKlZw
10:04:24 [INFO] Fetching channel versions (without changelogs) from Warp server
10:04:24 [INFO] dispatching global action for root_view:open_from_restored
10:04:24 [INFO] Computing available system fonts
10:04:24 [INFO] Block finished with new state DoneWithExecution
10:04:24 [INFO] Starting shell /bin/bash
10:04:24 [INFO] Successfully spawned tty with pid: 11379
10:04:24 [INFO] Successfully spawned child bash process with pid 11379
10:04:24 [INFO] Fetching channel versions and changelogs from Warp server
10:04:24 [INFO] dispatching global action for workspace:save_app
10:04:24 [INFO] dispatching global action for workspace:save_app
10:04:24 [WARN] Tried to update block filter query without active_filter_editor_block_index set
10:04:24 [INFO] dispatching global action for workspace:save_app
10:04:24 [WARN] Failed to load font Some("/usr/share/fonts/X11/Type1/NimbusMonoPS-Regular.pfb"): InvalidFontFormat("Type 1")
10:04:24 [WARN] Failed to load font Some("/usr/share/fonts/X11/Type1/StandardSymbolsPS.pfb"): InvalidFontFormat("Type 1")
10:04:24 [WARN] No alert dialog was set for the native modal
10:04:24 [WARN] Tried to render share modal without a model
10:04:24 [INFO] Received InitShell hook
10:04:24 [WARN] No alert dialog was set for the native modal
10:04:24 [WARN] Tried to render share modal without a model
10:04:24 [INFO] Loaded 63 font families
10:04:24 [INFO] Guessed window scale factor: 1
10:04:24 [INFO] Received CommandFinished hook
10:04:24 [INFO] Block finished with new state DoneWithNoExecution
10:04:24 [INFO] Incrementing stage from WarpInput to ScriptExecution
10:04:24 [INFO] Received Precmd hook
10:04:24 [WARN] No config found!
10:04:24 [WARN] No config found!
10:04:24 [INFO] Enabled wgpu backends: Backends(VULKAN | GL | METAL | DX12 | DX11 | BROWSER_WEBGPU)
10:04:24 [INFO] Available wgpu adapters:
10:04:24 [WARN] Disabling presentation on 'Intel(R) Xe Graphics (TGL GT2)' (id 0x556f2403f7b0) due to NV Optimus and Intel Mesa < v21.2
10:04:24 [INFO] IntegratedGpu: Intel(R) Xe Graphics (TGL GT2)
10:04:24 [INFO] 	Driver: Intel open-source Mesa driver (Mesa 23.2.1-1ubuntu3.1)
10:04:24 [INFO] DiscreteGpu: NVIDIA T500
10:04:24 [INFO] 	Driver: NVIDIA (525.147.05)
10:04:24 [INFO] Cpu: llvmpipe (LLVM 15.0.7, 256 bits)
10:04:24 [INFO] 	Driver: llvmpipe (Mesa 23.2.1-1ubuntu3.1 (LLVM 15.0.7))
10:04:24 [INFO] Other: NVIDIA T500/PCIe/SSE2
10:04:24 [INFO] 	Driver: Unknown
10:04:24 [WARN] Disabling presentation on 'Intel(R) Xe Graphics (TGL GT2)' (id 0x556f2403f7b0) due to NV Optimus and Intel Mesa < v21.2
10:04:24 [INFO] Using DiscreteGpu (NVIDIA T500) for rendering new window.
10:04:24 [WARN] Unrecognized device error ERROR_INITIALIZATION_FAILED
10:04:24 [ERROR] Failed to open window: Connection to device was lost during initialization
10:04:24 [WARN] Session abandoned before bootstrap for shell Some(Bash) on ssh false
10:04:24 [INFO] Tried to exit the alternate screen, but it was already inactive
10:04:24 [INFO] Block finished with new state DoneWithNoExecution
10:04:24 [WARN] Redraw requested for a window for which we have no state
10:04:24 [WARN] Redraw requested for a window for which we have no state
10:04:24 [INFO] application will terminate
10:04:24 [INFO] Shutting down SQLite writer thread
10:04:24 [INFO] Shut down SQLite writer in 239.281µs
10:04:24 [INFO] Writing queued events to disk because telemetry is enabled.
10:04:24 [INFO] Successfully wrote telemetry events to disk
10:04:24 [INFO] Tearing down app services...
10:04:24 [INFO] Received empty message; assuming the connection has been closed.
10:04:24 [INFO] Received channel versions from Warp server: dev: ChannelVersion { version_info: VersionInfo { version: "v0.2024.02.29.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.29.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: [] }

@LFd3v
Copy link

LFd3v commented Feb 29, 2024

Hi, there. Thank you for your feedback. Could you please test one of the preview versions here to check if it fixes the problem?

Also, it seems that Warp is trying to use NVidia GPU for rendering, you can also try to force it use the iGPU in Settings > Features > bottom most option and see if it helps.

@smonolo
Copy link
Author

smonolo commented Mar 1, 2024

Hi @LFd3v. I tried installing and using a preview version but it looks like the issue is still occurring. Here are the latest logs.

stdout is a tty true, in CI false.  using logfile: false
10:30:36 [INFO] Spawning terminal server process...
10:30:36 [WARN] Failed to load font Some("/usr/share/fonts/X11/Type1/NimbusMonoPS-Regular.pfb"): InvalidFontFormat("Type 1")
10:30:36 [WARN] Failed to load font Some("/usr/share/fonts/X11/Type1/StandardSymbolsPS.pfb"): InvalidFontFormat("Type 1")
10:30:36 [INFO] Running terminal server...
10:30:36 [WARN] Failed to load font: Hack due to error Font family Hack does not contain any valid fonts
10:30:36 [INFO] Initializing crash reporting Some("stable_release") with tag "v0.2024.02.27.08.01.stable_00"...
10:30:36 [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.27.08.01.stable_00")
10:30:36 [INFO] Performance metrics collector started
10:30:36 [INFO] Start to flush telemetry events to Segment
10:30:36 [INFO] Initializing app services
10:30:36 [INFO] Dropping empty telemetry batch
10:30:36 [INFO] Flushed telemetry events.
10:30:36 [INFO] Start to flush telemetry events to Segment
10:30:37 [WARN] Disabling presentation on 'Intel(R) Xe Graphics (TGL GT2)' (id 0x55f70c860ae0) due to NV Optimus and Intel Mesa < v21.2
10:30:37 [WARN] Detected skylake derivative running on mesa i915. Clears to srgb textures will use manual shader clears.
10:30:37 [INFO] Connecting to SQLite database
10:30:37 [INFO] fetching team tester status
10:30:37 [INFO] Checking for update on channel stable_release. Update id is Bc8U1ex
10:30:37 [INFO] Attempting to start websocket connection in CloudObjects::Listener
10:30:37 [INFO] Fetching channel versions (without changelogs) from Warp server
10:30:37 [INFO] dispatching global action for root_view:open_from_restored
10:30:37 [INFO] dispatching global action for root_view:open_new
10:30:37 [INFO] Computing available system fonts
10:30:37 [INFO] Starting shell /bin/bash
10:30:37 [INFO] Successfully spawned tty with pid: 18240
10:30:37 [INFO] Successfully spawned child bash process with pid 18240
10:30:37 [INFO] Fetching channel versions and changelogs from Warp server
10:30:37 [INFO] dispatching global action for workspace:save_app
10:30:37 [WARN] Tried to update block filter query without active_filter_editor_block_index set
10:30:37 [INFO] dispatching global action for workspace:save_app
10:30:37 [WARN] Failed to load font Some("/usr/share/fonts/X11/Type1/NimbusMonoPS-Regular.pfb"): InvalidFontFormat("Type 1")
10:30:37 [WARN] Failed to load font Some("/usr/share/fonts/X11/Type1/StandardSymbolsPS.pfb"): InvalidFontFormat("Type 1")
10:30:37 [WARN] Tried to render share modal without a model
10:30:37 [WARN] No alert dialog was set for the native modal
10:30:37 [INFO] Received InitShell hook
10:30:37 [WARN] Tried to render share modal without a model
10:30:37 [WARN] No alert dialog was set for the native modal
10:30:37 [INFO] Guessed window scale factor: 1
10:30:37 [INFO] Loaded 63 font families
10:30:37 [INFO] Received CommandFinished hook
10:30:37 [INFO] Block finished with new state DoneWithNoExecution
10:30:37 [INFO] Incrementing stage from WarpInput to ScriptExecution
10:30:37 [INFO] Enabled wgpu backends: Backends(VULKAN | GL | METAL | DX12 | DX11 | BROWSER_WEBGPU)
10:30:37 [INFO] Available wgpu adapters:
10:30:37 [INFO] Received Precmd hook
10:30:37 [INFO] Successfully flushed events to segment from disk
10:30:37 [WARN] Disabling presentation on 'Intel(R) Xe Graphics (TGL GT2)' (id 0x55f70cdfb670) due to NV Optimus and Intel Mesa < v21.2
10:30:37 [WARN] Detected skylake derivative running on mesa i915. Clears to srgb textures will use manual shader clears.
10:30:37 [INFO] IntegratedGpu: Intel(R) Xe Graphics (TGL GT2)
10:30:37 [INFO] 	Driver: Intel open-source Mesa driver (Mesa 23.2.1-1ubuntu3.1)
10:30:37 [INFO] DiscreteGpu: NVIDIA T500
10:30:37 [INFO] 	Driver: NVIDIA (525.147.05)
10:30:37 [INFO] Cpu: llvmpipe (LLVM 15.0.7, 256 bits)
10:30:37 [INFO] 	Driver: llvmpipe (Mesa 23.2.1-1ubuntu3.1 (LLVM 15.0.7))
10:30:37 [INFO] IntegratedGpu: Mesa Intel(R) Xe Graphics (TGL GT2)
10:30:37 [INFO] 	Driver: Unknown
10:30:37 [WARN] Disabling presentation on 'Intel(R) Xe Graphics (TGL GT2)' (id 0x55f70cdfb670) due to NV Optimus and Intel Mesa < v21.2
10:30:37 [INFO] Received channel versions from Warp server: dev: ChannelVersion { version_info: VersionInfo { version: "v0.2024.03.01.08.01.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.03.01.08.01.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.27.08.01.stable_03", update_by: None, soft_cutoff: Some("v0.2024.01.09.08.02.stable_01") }, overrides: [] }
10:30:37 [WARN] Detected skylake derivative running on mesa i915. Clears to srgb textures will use manual shader clears.
10:30:37 [INFO] Using DiscreteGpu (NVIDIA T500) for rendering new window.
10:30:37 [WARN] Unrecognized device error ERROR_INITIALIZATION_FAILED
10:30:37 [ERROR] Failed to open window: Connection to device was lost during initialization
10:30:37 [WARN] Session abandoned before bootstrap for shell Some(Bash) on ssh false
10:30:37 [INFO] Tried to exit the alternate screen, but it was already inactive
10:30:37 [INFO] Block finished with new state DoneWithNoExecution
10:30:37 [WARN] Redraw requested for a window for which we have no state
10:30:37 [INFO] fetching teams metadata
10:30:37 [INFO] fetching updated cloud objects, including generic string objects
10:30:37 [WARN] Redraw requested for a window for which we have no state
10:30:37 [INFO] application will terminate
10:30:37 [INFO] Shutting down SQLite writer thread
10:30:37 [INFO] Shut down SQLite writer in 1.010859ms
10:30:37 [INFO] Writing queued events to disk because telemetry is enabled.
10:30:37 [INFO] Successfully wrote telemetry events to disk
10:30:37 [INFO] Tearing down app services...
10:30:37 [INFO] Received empty message; assuming the connection has been closed.
10:30:37 [INFO] Detected that Warp was installed using Apt

One detail that might actually be helpful is that it only happened when I closed and try to reopen it after running a few commands. When I tried to reproduce the issue without using the terminal too much but just closing and reopening, it didn't happen.

Thanks.

@smonolo
Copy link
Author

smonolo commented Mar 1, 2024

@LFd3v I also tried reinstalling Warp completely (without rebooting the device) and it looks like the issue keeps happening. Only a shutdown fixes the problem.

@LFd3v
Copy link

LFd3v commented Mar 1, 2024

Also, it seems that Warp is trying to use NVidia GPU for rendering, you can also try to force it use the iGPU in Settings > Features > bottom most option and see if it helps.

@smonolo Have you tried the suggestion above as well? You can also try to boot the system using only the integrated GPU, since it seems that you have a hybrid graphics system.

@smonolo
Copy link
Author

smonolo commented Mar 1, 2024

@LFd3v I just tried that and it looks like Warp is always opening correctly. If it happens again using this configuration, I'll let you know. Anyways I believe it's still an issue that could be looked into as it's quite blocking for a user that does not know about the fix.

What do you think?

@LFd3v
Copy link

LFd3v commented Mar 1, 2024

@smonolo Sure, it indeed looks like a problem with NVidia drivers. I am glad it is working fine with this workaround. Cheers.

@vorporeal
Copy link

I believe the error is due to this (still open) nVidia driver bug: NVIDIA/egl-wayland#94

I'm following up there to see if there's any good way for us to work around this at the application level.

@smonolo
Copy link
Author

smonolo commented Mar 17, 2024

@vorporeal I see, thanks for the update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants