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

Zed's text breaks after entering and exiting sleep / suspend #12827

Closed
1 task done
Person-Who-Exists opened this issue Jun 9, 2024 · 17 comments
Closed
1 task done

Zed's text breaks after entering and exiting sleep / suspend #12827

Person-Who-Exists opened this issue Jun 9, 2024 · 17 comments
Labels
bug [core label] linux open source Open source community projects, contributions, etc

Comments

@Person-Who-Exists
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

After entering and exiting suspend mode with systemctl suspend, the zed ui loses all it's text aside from popups:
Zed ui but without text
The only way I have found to return the text is to restart Zed or scroll which causes an unpleasant flickering:
https://github.com/zed-industries/zed/assets/123006012/abd0213f-86bd-411c-a9d4-f7423413c02e

Environment

landonk@archlinux

OS: Arch Linux x86_64
Host: Predator PH315-54 V1.15
Kernel: 6.9.3-arch1-1
Shell: bash 5.2.26
Resolution: 1920x1080
DE: Plasma 6.0.5
WM: kwin
Terminal: alacritty
CPU: 11th Gen Intel i7-11800H (16) @ 4.600GHz
GPU: Intel TigerLake-H GT1 [UHD Graphics]
GPU: NVIDIA GeForce RTX 3050 Ti Mobile
Memory: 4097MiB / 15770MiB

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

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

2024-06-04T20:48:28-04:00 [ERROR] {
  "thread": "main",
  "payload": "called `Result::unwrap()` on an `Err` value: ERROR_INITIALIZATION_FAILED",
  "location_data": {
    "file": "/home/actions-runner/.cargo/git/checkouts/blade-b2bcd1de1cf7ab6a/9c9cabf/blade-graphics/src/vulkan/init.rs",
    "line": 847
  },
  "backtrace": [
    "__libc_start_main"
  ],
  "app_version": "0.138.4",
  "release_channel": "Zed Preview",
  "os_name": "Linux",
  "os_version": "1.0.0",
  "architecture": "x86_64",
  "panicked_on": 1717548508552,
  "installation_id": "4fad41da-5a89-4558-9f44-da4e9cc8f1f7",
  "session_id": "5cd64a06-a66c-4eb2-ab74-79432e619c25"
}
@Person-Who-Exists Person-Who-Exists added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Jun 9, 2024
@apricotbucket28
Copy link
Contributor

This is really weird, and it looks like a graphical issue (rather than an issue with the text system). Could you run Zed with RUST_LOG=info,blade_graphics=debug and share the output? Also, what does vulkaninfo say?

@Person-Who-Exists
Copy link
Author

Output from running zed with systemctl suspend

[2024-06-09T15:32:19-04:00 INFO  zbus::connection::socket_reader] read_socket; self=SocketReader { socket: Async { source: Source { registration: 12, key: 0, state: Mutex { data: [Direction { tick: 24, ticks: Some((23, 23)), waker: None, wakers: Slab { len: 0, cap: 0 } }, Direction { tick: 0, ticks: None, waker: None, wakers: Slab { len: 0, cap: 0 } }], poisoned: false, .. } }, io: Some(UnixStream { fd: FileDesc(OwnedFd { fd: 12 }), local: (unnamed), peer: "/run/user/1000/bus" (pathname) }) }, senders: Mutex { data: {None: Sender { inner: RwLock { data: Inner { queue: [], capacity: 64, receiver_count: 0, inactive_receiver_count: 1, sender_count: 1, head_pos: 0, overflow: false, await_active: false, is_closed: false, send_ops: Event(<uninitialized>), recv_ops: Event(<uninitialized>) }, poisoned: false, .. } }, Some(OwnedMatchRule(MatchRule { msg_type: Some(Error), sender: None, interface: None, member: None, path_spec: None, destination: None, args: [], arg_paths: [], arg0ns: None })): Sender { inner: RwLock { data: Inner { queue: [], capacity: 8, receiver_count: 0, inactive_receiver_count: 1, sender_count: 2, head_pos: 21, overflow: false, await_active: false, is_closed: false, send_ops: Event(<uninitialized>), recv_ops: Event { listeners_notified: 18446744073709551615, listeners_total: 0 } }, poisoned: false, .. } }, Some(OwnedMatchRule(MatchRule { msg_type: Some(Signal), sender: Some(BusName::Unique("org.freedesktop.DBus")), interface: Some(InterfaceName("org.freedesktop.DBus")), member: Some(MemberName("NameOwnerChanged")), path_spec: Some(Path(ObjectPath("/org/freedesktop/DBus"))), destination: None, args: [(0, "org.freedesktop.portal.Desktop")], arg_paths: [], arg0ns: None })): Sender { inner: RwLock { data: Inner { queue: [], capacity: 8, receiver_count: 2, inactive_receiver_count: 1, sender_count: 1, head_pos: 0, overflow: false, await_active: false, is_closed: false, send_ops: Event(<uninitialized>), recv_ops: Event { listeners_notified: 0, listeners_total: 2 } }, poisoned: false, .. } }, Some(OwnedMatchRule(MatchRule { msg_type: Some(Signal), sender: Some(BusName::WellKnown("org.freedesktop.portal.Desktop")), interface: Some(InterfaceName("org.freedesktop.portal.Settings")), member: Some(MemberName("SettingChanged")), path_spec: Some(Path(ObjectPath("/org/freedesktop/portal/desktop"))), destination: None, args: [(0, "org.freedesktop.appearance"), (1, "color-scheme")], arg_paths: [], arg0ns: None })): Sender { inner: RwLock { data: Inner { queue: [], capacity: 64, receiver_count: 1, inactive_receiver_count: 1, sender_count: 1, head_pos: 0, overflow: false, await_active: false, is_closed: false, send_ops: Event(<uninitialized>), recv_ops: Event { listeners_notified: 0, listeners_total: 1 } }, poisoned: false, .. } }, Some(OwnedMatchRule(MatchRule { msg_type: Some(MethodReturn), sender: None, interface: None, member: None, path_spec: None, destination: None, args: [], arg_paths: [], arg0ns: None })): Sender { inner: RwLock { data: Inner { queue: [], capacity: 8, receiver_count: 0, inactive_receiver_count: 1, sender_count: 2, head_pos: 21, overflow: false, await_active: false, is_closed: false, send_ops: Event(<uninitialized>), recv_ops: Event { listeners_notified: 18446744073709551615, listeners_total: 0 } }, poisoned: false, .. } }, Some(OwnedMatchRule(MatchRule { msg_type: Some(Signal), sender: Some(BusName::WellKnown("org.freedesktop.portal.Desktop")), interface: Some(InterfaceName("org.freedesktop.DBus.Properties")), member: Some(MemberName("PropertiesChanged")), path_spec: Some(Path(ObjectPath("/org/freedesktop/portal/desktop"))), destination: None, args: [], arg_paths: [], arg0ns: None })): Sender { inner: RwLock { data: Inner { queue: [(Ok(Msg { type: Signal, sender: UniqueName(":1.7"), path: ObjectPath("/org/freedesktop/portal/desktop"), iface: InterfaceName("org.freedesktop.DBus.Properties"), member: MemberName("PropertiesChanged"), body: Signature("sa{sv}as"), fds: [] }), 1)], capacity: 64, receiver_count: 1, inactive_receiver_count: 1, sender_count: 1, head_pos: 0, overflow: false, await_active: false, is_closed: false, send_ops: Event(<uninitialized>), recv_ops: Event { listeners_notified: 18446744073709551615, listeners_total: 1 } }, poisoned: false, .. } }} }, already_received_bytes: None, prev_seq: 23, activity_event: Event(<uninitialized>) }
[2024-06-09T15:32:25-04:00 INFO  zbus::connection::socket_reader] read_socket; self=SocketReader { socket: Async { source: Source { registration: 12, key: 0, state: Mutex { data: [Direction { tick: 25, ticks: Some((25, 24)), waker: None, wakers: Slab { len: 0, cap: 0 } }, Direction { tick: 0, ticks: None, waker: None, wakers: Slab { len: 0, cap: 0 } }], poisoned: false, .. } }, io: Some(UnixStream { fd: FileDesc(OwnedFd { fd: 12 }), local: (unnamed), peer: "/run/user/1000/bus" (pathname) }) }, senders: Mutex { data: {None: Sender { inner: RwLock { data: Inner { queue: [], capacity: 64, receiver_count: 0, inactive_receiver_count: 1, sender_count: 1, head_pos: 0, overflow: false, await_active: false, is_closed: false, send_ops: Event(<uninitialized>), recv_ops: Event(<uninitialized>) }, poisoned: false, .. } }, Some(OwnedMatchRule(MatchRule { msg_type: Some(Error), sender: None, interface: None, member: None, path_spec: None, destination: None, args: [], arg_paths: [], arg0ns: None })): Sender { inner: RwLock { data: Inner { queue: [], capacity: 8, receiver_count: 0, inactive_receiver_count: 1, sender_count: 2, head_pos: 21, overflow: false, await_active: false, is_closed: false, send_ops: Event(<uninitialized>), recv_ops: Event { listeners_notified: 18446744073709551615, listeners_total: 0 } }, poisoned: false, .. } }, Some(OwnedMatchRule(MatchRule { msg_type: Some(Signal), sender: Some(BusName::Unique("org.freedesktop.DBus")), interface: Some(InterfaceName("org.freedesktop.DBus")), member: Some(MemberName("NameOwnerChanged")), path_spec: Some(Path(ObjectPath("/org/freedesktop/DBus"))), destination: None, args: [(0, "org.freedesktop.portal.Desktop")], arg_paths: [], arg0ns: None })): Sender { inner: RwLock { data: Inner { queue: [], capacity: 8, receiver_count: 2, inactive_receiver_count: 1, sender_count: 1, head_pos: 0, overflow: false, await_active: false, is_closed: false, send_ops: Event(<uninitialized>), recv_ops: Event { listeners_notified: 0, listeners_total: 2 } }, poisoned: false, .. } }, Some(OwnedMatchRule(MatchRule { msg_type: Some(Signal), sender: Some(BusName::WellKnown("org.freedesktop.portal.Desktop")), interface: Some(InterfaceName("org.freedesktop.portal.Settings")), member: Some(MemberName("SettingChanged")), path_spec: Some(Path(ObjectPath("/org/freedesktop/portal/desktop"))), destination: None, args: [(0, "org.freedesktop.appearance"), (1, "color-scheme")], arg_paths: [], arg0ns: None })): Sender { inner: RwLock { data: Inner { queue: [], capacity: 64, receiver_count: 1, inactive_receiver_count: 1, sender_count: 1, head_pos: 0, overflow: false, await_active: false, is_closed: false, send_ops: Event(<uninitialized>), recv_ops: Event { listeners_notified: 0, listeners_total: 1 } }, poisoned: false, .. } }, Some(OwnedMatchRule(MatchRule { msg_type: Some(MethodReturn), sender: None, interface: None, member: None, path_spec: None, destination: None, args: [], arg_paths: [], arg0ns: None })): Sender { inner: RwLock { data: Inner { queue: [], capacity: 8, receiver_count: 0, inactive_receiver_count: 1, sender_count: 2, head_pos: 21, overflow: false, await_active: false, is_closed: false, send_ops: Event(<uninitialized>), recv_ops: Event { listeners_notified: 18446744073709551615, listeners_total: 0 } }, poisoned: false, .. } }, Some(OwnedMatchRule(MatchRule { msg_type: Some(Signal), sender: Some(BusName::WellKnown("org.freedesktop.portal.Desktop")), interface: Some(InterfaceName("org.freedesktop.DBus.Properties")), member: Some(MemberName("PropertiesChanged")), path_spec: Some(Path(ObjectPath("/org/freedesktop/portal/desktop"))), destination: None, args: [], arg_paths: [], arg0ns: None })): Sender { inner: RwLock { data: Inner { queue: [(Ok(Msg { type: Signal, sender: UniqueName(":1.7"), path: ObjectPath("/org/freedesktop/portal/desktop"), iface: InterfaceName("org.freedesktop.DBus.Properties"), member: MemberName("PropertiesChanged"), body: Signature("sa{sv}as"), fds: [] }), 1)], capacity: 64, receiver_count: 1, inactive_receiver_count: 1, sender_count: 1, head_pos: 1, overflow: false, await_active: false, is_closed: false, send_ops: Event(<uninitialized>), recv_ops: Event { listeners_notified: 18446744073709551615, listeners_total: 1 } }, poisoned: false, .. } }} }, already_received_bytes: None, prev_seq: 24, activity_event: Event(<uninitialized>) }

Also, is there a specific section of vulkan info you need? I don't think I can fit the full info into a single github comment.

@apricotbucket28
Copy link
Contributor

Output from running zed with systemctl suspend

That doesn't say anything useful in this case. Could you share the whole log from running with those settings I mentioned?

Also, is there a specific section of vulkan info you need? I don't think I can fit the full info into a single github comment.

You can attach the output file or upload it to https://pastebin.com/.

@Person-Who-Exists
Copy link
Author

Zed error + vulkaninfo

@Moshyfawn
Copy link
Member

This looks like the same Vulkan error as in #8168 🤔

@Moshyfawn Moshyfawn added needs info / awaiting response Issue that needs more information from the user linux open source Open source community projects, contributions, etc and removed triage Maintainer needs to classify the issue labels Jun 9, 2024
@Person-Who-Exists
Copy link
Author

I had that error too at first and I couldn't even start Zed, but after properly setting up Nvidia drivers (Adding early loading etc.) (Archinstall doesn't do all the steps) I can get it to start without errors in terminal. This weird text rendering issue only happens after a suspension.

@mikayla-maki
Copy link
Contributor

We couldn't reproduce these on our machines. Let us know if it's still happening :)

@Person-Who-Exists
Copy link
Author

This is still an issue, here is a full video showing it.

Screencast_20240626_145138.mp4

@mikayla-maki mikayla-maki reopened this Jun 26, 2024
@apricotbucket28
Copy link
Contributor

This is still an issue, here is a full video showing it.
Screencast_20240626_145138.mp4

Hmm... notice how it's not only the text but also icons (only quads seem to be rendered after resume)

Could you try running with the OpenGL ES backend? you'll need to recompile with RUSTFLAGS="--cfg gles" cargo run --release

@Person-Who-Exists
Copy link
Author

Running with those flags appear to stop the breakage of zed.

@notpeter notpeter changed the title Zed's text breaks after entering and exiting suspend mode Zed's text breaks after entering and exiting sleep / suspend Jul 30, 2024
@EDLLT
Copy link

EDLLT commented Sep 18, 2024

image
I am also facing the same issue but in my case, Zed stops responding completely and sometimes it just crashes as soon as I open my pc

Ubuntu 24.04
Nvidia Version: 550
Graphics Driver: Nvidia 3060 Ti
Zed 0.152.4

@aureliobarbosa
Copy link

aureliobarbosa commented Oct 10, 2024

Same problem here:

Ubuntu 24.04.1, via X11.
Nvidia Version: 555
Graphics Driver: Nvidia RTX 2060 Super
Zed 0.155.2

I was trying zed but this is a blocker for my workflow. As soon as it is fixed I will try it again.

@github-actions github-actions bot added admin read Pending admin review triage Maintainer needs to classify the issue labels Nov 5, 2024
@notpeter notpeter removed triage Maintainer needs to classify the issue admin read Pending admin review labels Nov 5, 2024
@bernardolansing
Copy link

For me it breaks completely, causing Zed to quit. I've managed to get the error message by running Zed with zed --foreground:

Details

[2024-11-19T19:01:12-03:00 ERROR zed::reliability] {
  "thread": "main",
  "payload": "GPU has crashed, and no debug information is available.",
  "location_data": {
    "file": "/home/ubuntu/.cargo/git/checkouts/blade-b2bcd1de1cf7ab6a/e142a3a/blade-graphics/src/vulkan/command.rs",
    "line": 439
  },
  "backtrace": [
    "core::panicking::panic_fmt",
    "<blade_graphics::hal::Context as blade_graphics::traits::CommandDevice>::submit",
    "gpui::platform::blade::blade_renderer::BladeRenderer::draw",
    "<gpui::platform::linux::wayland::window::WaylandWindow as gpui::platform::PlatformWindow>::draw",
    "gpui::window::Window::new::{{closure}}::{{closure}}",
    "gpui::window::Window::new::{{closure}}",
    "gpui::platform::linux::wayland::window::WaylandWindowStatePtr::frame",
    "<gpui::platform::linux::wayland::client::WaylandClientStatePtr as wayland_client::event_queue::Dispatch<wayland_client::protocol::wl_callback::WlCallback,wayland_backend::sys::client::ObjectId>>::event",
    "wayland_client::event_queue::queue_callback",
    "<core::cell::RefCell<calloop::sources::DispatcherInner<S,F>> as calloop::sources::EventDispatcher<Data>>::process_events",
    "<gpui::platform::linux::wayland::client::WaylandClient as gpui::platform::linux::platform::LinuxClient>::run",
    "gpui::platform::linux::platform::<impl gpui::platform::Platform for P>::run",
    "gpui::app::App::run",
    "zed::main",
    "std::sys::backtrace::__rust_begin_short_backtrace",
    "std::rt::lang_start::{{closure}}",
    "std::rt::lang_start_internal",
    "main",
    "__libc_start_call_main",
    "__libc_start_main_impl",
    "_start"
  ],
  "app_version": "0.161.2",
  "release_channel": "Zed",
  "os_name": "Linux Wayland",
  "os_version": "ubuntu 24.10",
  "architecture": "x86_64",
  "panicked_on": 1732053672664,
  "system_id": "b6f50655-c9ec-4bc1-a726-331f83ee6205",
  "installation_id": "34da3835-484d-4d6e-9b13-bef3106a5c0a",
  "session_id": "eef2b92a-0789-4324-a300-a2a2d7598de1"
}

@jansol
Copy link
Contributor

jansol commented Nov 26, 2024

Can affected people post what sleep modes their systems support (and what they actually use)? The reproducibility problem may be related to different sleep modes being used.

You can find out like this:

$ cat /sys/power/mem_sleep
s2idle [deep]

This one is my desktop, which supports suspend-to-idle (s2idle) and suspend-to-ram (deep), and the latter is what it actually chooses to do at the moment. I have heard a lot of stories about problems with resuming from suspend, but haven't encountered them myself (I haven't really used suspend on the desktop). FWIW on my laptop Zed is fine after suspending by closing the lid (only s2idle supported, AMD integrated GPU with RADV driver + NVIDIA with proprietary driver)

@mikayla-maki I'd double-check what your test machines say about that as well.

@aureliobarbosa
Copy link

aureliobarbosa commented Nov 26, 2024

❯ cat /sys/power/mem_sleep 
s2idle [deep]

Just installed the last version and the problem persists (with the same configuration as indicated above).

@moderation
Copy link

OpenSUSE Tumbleweed and building from source on main

cat /sys/power/mem_sleep
[s2idle] deep

image
image

@notpeter
Copy link
Member

notpeter commented Dec 13, 2024

There's a few duplicated issues on this topic, so I'm going to close this in favor of:

Please 👍 and subscribe to that issue to be notified of progress/discussion.
Thanks for reporting

@JosephTLyons JosephTLyons removed the needs info / awaiting response Issue that needs more information from the user label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] linux open source Open source community projects, contributions, etc
Projects
None yet
Development

No branches or pull requests