zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
46.59k stars 2.64k forks source link

run zed error on Ubuntu 24.04 : blade_graphics::hal::init] Surface formats are incompatible #11716

Open xinye0123 opened 3 months ago

xinye0123 commented 3 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

ERROR blade_graphics::hal::init] Surface formats are incompatible: [SurfaceFormatKHR { format: B8G8R8A8_UNORM, color_space: SRGB_NONLINEAR }] [destroyed object]: error 7: failed to import supplied dmabufs: Unsupported buffer format 875713345 Protocol error 7 on object @0: Protocol error 7 on object @0: Protocol error 7 on object @0: Protocol error 7 on object @0: Protocol error 7 on object @0:

Environment

OS: Ubuntu 24.04 LTS x86_64 .ossssssssssssssssssdMMMNysssso. Kernel: 6.8.0-31-generic /ssssssssssshdmmNNmmyNMMMMhssssss/ Uptime: 16 mins +ssssssssshmydMMMMMMMNddddyssssssss+ Packages: 2300 (dpkg), 18 (snap) /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/ Shell: bash 5.2.21 .ssssssssdMMMNhsssssssssshNMMMdssssssss. Resolution: 800x600 +sssshhhyNMMNyssssssssssssyNMMMysssssss+ DE: GNOME 46.0 ossyNMMMNyMMhsssssssssssssshmmmhssssssso WM: Mutter ossyNMMMNyMMhsssssssssssssshmmmhssssssso WM Theme: Orchis-Light-Compact +sssshhhyNMMNyssssssssssssyNMMMysssssss+ Theme: Orchis-Light-Compact [GTK2/3] .ssssssssdMMMNhsssssssssshNMMMdssssssss. Icons: Yaru [GTK2/3] /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/ Terminal: gnome-terminal +sssssssssdmydMMMMMMMMddddyssssssss+ CPU: Genuine Intel (16) @ 2.500GHz /ssssssssssshdmNNNNmyNMMMMhssssss/ GPU: NVIDIA GeForce GTX 1060 3GB .ossssssssssssssssssdMMMNysssso. Memory: 2303MiB / 32067MiB

| NVIDIA-SMI 535.171.04 Driver Version: 535.171.04 CUDA Version: 12.2 | |-----------------------------------------+----------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+======================+======================| | 0 NVIDIA GeForce GTX 1060 3GB Off | 00000000:01:00.0 On | N/A | | 33% 36C P8 7W / 130W | 224MiB / 3072MiB | 1% Default | | | | N/A | +-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=======================================================================================| | 0 N/A N/A 3598 G /usr/bin/gnome-shell 145MiB | | 0 N/A N/A 3798 G /usr/bin/Xwayland 9MiB | | 0 N/A N/A 6565 G ...gnu/webkit2gtk-4.0/WebKitWebProcess 28MiB | | 0 N/A N/A 7040 G /usr/bin/nautilus 23MiB | +---------------------------------------------------------------------------------------+

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.

No response

xinye0123 commented 3 months ago

Update: this error is on WayLand Mode, switch to X11 , zed works!

biplab37 commented 2 months ago

Is there a way to make it work in wayland mode?

biplab37 commented 1 month ago

I can run zed in x11 mode in wayland using WAYLAND_DISPLAY='' zed but would love to hear about the progress to fix this issue.

freefcw commented 1 month ago

I can run zed in x11 mode in wayland using WAYLAND_DISPLAY='' zed but would love to hear about the progress to fix this issue.

good solution, I can run it now

serene-fermi commented 2 weeks ago

I have the same problem:

Open (copied from a issue I've closed now)

### Check for existing issues

- [X] Completed

### Describe the bug / provide steps to reproduce it

## Problem description

When I start Zed (from CLI or click on the icon) no GUI opens, but I can see that a process is running :

```
~ ps aux | grep zed
marc       23163 92.2  1.3 38197212 429344 ?     Rl   15:04   0:01 /home/marc/.local/zed.app/libexec/zed-editor
marc       23320 18.7  0.3 1200552 105000 ?      Sl   15:04   0:00 /home/marc/.local/share/zed/node/node-v22.5.1-linux-x64/bin/node /home/marc/.local/share/zed/copilot/copilot-v0.5.0/dist/agent.js --stdio
```

## Steps to reproduce

1. Click on Zed icon
2. No GUI opens

## Additional info

- I installed Zed with `curl -f https://zed.dev/install.sh | sh`
- I can run things like `zed --help` in the terminal and that works (I see an output)
- Output `zed --foreground:`
  ```                                                                                                                                          
  [2024-08-24T15:18:54+02:00 ERROR fs] No such file or directory (os error 2) about ["/home/marc/.config/github-copilot"]                                                    
  [2024-08-24T15:18:54+02:00 ERROR blade_graphics::hal::init] No composite alpha flag for transparency: OPAQUE | INHERIT                                                     
  [2024-08-24T15:18:54+02:00 ERROR blade_graphics::hal::init] Surface formats are incompatible: [SurfaceFormatKHR { format: B8G8R8A8_UNORM, color_space: SRGB_NONLINEAR }]   
  [destroyed object]: error 7: failed to import supplied dmabufs: Unsupported buffer format 875713345                                                                        
  Protocol error 7 on object @0:                                                                                                                                             
  Protocol error 7 on object @0:                                                                                                                                             
  Protocol error 7 on object @0:                                                                                                                                             
  Protocol error 7 on object @0:                                                                                                                                             
  Protocol error 7 on object @0:                                                                                                                                             
  Protocol error 7 on object @0:                                                                                                                                             
  Protocol error 7 on object @0:                                                                                                                                             
  Protocol error 7 on object @0:                                                                                                                                             
  Protocol error 7 on object @0:                                                                                                                                             
  [2024-08-24T15:18:54+02:00 ERROR assistant] no worktrees when constructing ProjectLspAdapterDelegate                                                                       
  Protocol error 7 on object @0:                                                                                                                                             
  Protocol error 7 on object @0:                                                                                                                                             
  Protocol error 7 on object @0:                                                                                                                                                     
  ```

### Environment

- OS: Ubuntu 24.04
- GPU: Nvidia RTX 4080
- CPU: Intel i5-13600KF
- Windowing system: Wayland

### 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-08-24T14:59:18.300658839+02:00 [INFO] ========== starting zed ==========
2024-08-24T14:59:18.329987518+02:00 [INFO] perform;
2024-08-24T14:59:18.330021648+02:00 [INFO] authenticate;
2024-08-24T14:59:18.330035563+02:00 [INFO] Opening main db
2024-08-24T14:59:18.330066696+02:00 [INFO] read_command;
2024-08-24T14:59:18.330488212+02:00 [INFO] new;
2024-08-24T14:59:18.330516243+02:00 [INFO] socket reader;
2024-08-24T14:59:18.330934255+02:00 [INFO] keep_updated;
2024-08-24T14:59:18.331105207+02:00 [INFO] Using git binary path: None
2024-08-24T14:59:18.34921475+02:00 [ERROR] No such file or directory (os error 2) about ["/home/marc/.config/github-copilot"]
2024-08-24T14:59:18.349356586+02:00 [INFO] initializing context server client
2024-08-24T14:59:18.349399328+02:00 [INFO] Registering built-in prompt template: content_prompt
2024-08-24T14:59:18.349541352+02:00 [INFO] Registering built-in prompt template: edit_workflow
2024-08-24T14:59:18.349696688+02:00 [INFO] Registering built-in prompt template: step_resolution
2024-08-24T14:59:18.349939094+02:00 [INFO] Registering built-in prompt template: terminal_assistant_prompt
2024-08-24T14:59:18.350135669+02:00 [INFO] No prompt template overrides directory found at /home/marc/.local/share/zed/prompt_overrides. Using built-in prompts.
2024-08-24T14:59:18.350345539+02:00 [INFO] extensions updated. loading 1, reloading 0, unloading 0
2024-08-24T14:59:18.351394012+02:00 [INFO] performance metrics display disabled
2024-08-24T14:59:18.351418404+02:00 [INFO] activate is not implemented on Linux, ignoring the call
2024-08-24T14:59:18.352109101+02:00 [INFO] Opening main db
2024-08-24T14:59:18.352355863+02:00 [INFO] perform;
2024-08-24T14:59:18.352373402+02:00 [INFO] authenticate;
2024-08-24T14:59:18.352397024+02:00 [INFO] read_command;
2024-08-24T14:59:18.352529118+02:00 [WARN] request completed with error: failed to connect to the server
2024-08-24T14:59:18.352553152+02:00 [WARN] request completed with error: failed to connect to the server
2024-08-24T14:59:18.352568429+02:00 [WARN] request completed with error: failed to connect to the server
2024-08-24T14:59:18.352594893+02:00 [WARN] request completed with error: failed to connect to the server
2024-08-24T14:59:18.352647228+02:00 [WARN] request completed with error: failed to connect to the server
2024-08-24T14:59:18.352663232+02:00 [WARN] request completed with error: failed to connect to the server
2024-08-24T14:59:18.352677652+02:00 [WARN] request completed with error: failed to connect to the server
2024-08-24T14:59:18.35269382+02:00 [WARN] request completed with error: failed to connect to the server
2024-08-24T14:59:18.352709278+02:00 [WARN] request completed with error: failed to connect to the server
2024-08-24T14:59:18.352868757+02:00 [INFO] socket reader;
2024-08-24T14:59:18.35310688+02:00 [WARN] request completed with error: failed to connect to the server
2024-08-24T14:59:18.374205794+02:00 [INFO] Enabling Vulkan Portability
2024-08-24T14:59:18.374230573+02:00 [INFO] Enabling color space support
2024-08-24T14:59:18.387281694+02:00 [INFO] Adapter "NVIDIA GeForce RTX 4080"
2024-08-24T14:59:18.387301672+02:00 [INFO] Ray tracing is supported
2024-08-24T14:59:18.397560831+02:00 [INFO] set environment variables from shell:/bin/zsh, path:/home/marc/.local/bin:/home/marc/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/marc/.local/share/JetBrains/Toolbox/scripts:/home/marc/.local/share/JetBrains/Toolbox/scripts
2024-08-24T14:59:18.511075982+02:00 [ERROR] No composite alpha flag for transparency: OPAQUE | INHERIT
2024-08-24T14:59:18.511098371+02:00 [INFO] Using surface present mode MAILBOX
2024-08-24T14:59:18.511105327+02:00 [ERROR] Surface formats are incompatible: [SurfaceFormatKHR { format: B8G8R8A8_UNORM, color_space: SRGB_NONLINEAR }]
2024-08-24T14:59:18.511116004+02:00 [WARN] Unable to forbid exclusive full screen
2024-08-24T14:59:18.515621498+02:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-08-24T14:59:18.515641067+02:00 [INFO] Creating a descriptor pool for at most 16 sets
2024-08-24T14:59:18.515657903+02:00 [INFO] Initializing Blade pipelines for surface SurfaceInfo { format: Bgra8UnormSrgb, alpha: Ignored }
2024-08-24T14:59:18.520872419+02:00 [INFO] Using GPU: GPUSpecs { is_software_emulated: false, device_name: "NVIDIA GeForce RTX 4080", driver_name: "NVIDIA", driver_info: "535.183.01" }
2024-08-24T14:59:18.525762451+02:00 [WARN] request completed with error: failed to connect to the server
2024-08-24T14:59:18.525783337+02:00 [WARN] request completed with error: failed to connect to the server
2024-08-24T14:59:18.525791652+02:00 [WARN] request completed with error: failed to connect to the server
2024-08-24T14:59:18.525799696+02:00 [WARN] request completed with error: failed to connect to the server
2024-08-24T14:59:18.526204272+02:00 [ERROR] no worktrees when constructing ProjectLspAdapterDelegate
2024-08-24T14:59:18.526219345+02:00 [INFO] Opening main db
2024-08-24T14:59:18.526904496+02:00 [INFO] Opening main db
2024-08-24T14:59:18.528086259+02:00 [INFO] Initializing default prettier with plugins {}
2024-08-24T14:59:18.54510505+02:00 [WARN] request completed with error: failed to connect to the server
2024-08-24T14:59:18.546116749+02:00 [INFO] Initializing default prettier with plugins {}
2024-08-24T14:59:18.548440095+02:00 [INFO] time to first window draw: 247.905382ms
2024-08-24T14:59:18.548550239+02:00 [WARN] request completed with error: failed to connect to the server
2024-08-24T14:59:18.6272806+02:00 [INFO] Initializing default prettier with plugins {}
2024-08-24T14:59:18.627706735+02:00 [WARN] request completed with error: failed to connect to the server
2024-08-24T14:59:18.630977503+02:00 [INFO] Node runtime install_if_needed
2024-08-24T14:59:18.681619359+02:00 [INFO] starting language server. binary path: "/home/marc/.local/share/zed/node/node-v22.5.1-linux-x64/bin/node", working directory: "/", args: ["/home/marc/.local/share/zed/copilot/copilot-v0.5.0/dist/agent.js", "--stdio"]
2024-08-24T14:59:18.869834584+02:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 0,
  "message": "[DEBUG] [agent] [2024-08-24T12:59:18.867Z] Agent service starting",
  "metadataStr": "[DEBUG] [agent] [2024-08-24T12:59:18.867Z]",
  "extra": [
    "Agent service starting"
  ]
}
2024-08-24T14:59:18.870872548+02:00 [INFO] Language server with id 0 sent unhandled notification client/registerCapability:
{
  "registrations": [
    {
      "id": "ed3ba5e9-4dba-4567-91cd-4a3f8300e63d",
      "method": "workspace/didChangeWorkspaceFolders",
      "registerOptions": {}
    }
  ]
}
2024-08-24T14:59:18.89107725+02:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 0,
  "message": "[DEBUG] [agent] [2024-08-24T12:59:18.874Z] Telemetry initialized",
  "metadataStr": "[DEBUG] [agent] [2024-08-24T12:59:18.874Z]",
  "extra": [
    "Telemetry initialized"
  ]
}