You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/development/linux.md
-66Lines changed: 0 additions & 66 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -154,69 +154,3 @@ When this zed instance is exited, terminal output will include a command to run
154
154
### Cargo errors claiming that a dependency is using unstable features
155
155
156
156
Try `cargo clean` and `cargo build`.
157
-
158
-
### Vulkan/GPU issues
159
-
160
-
If Zed crashes at runtime due to GPU or vulkan issues, you can try running [vkcube](https://github.com/krh/vkcube) (usually available as part of the `vulkaninfo` package on various distributions) to try to troubleshoot where the issue is coming from. Try running in both X11 and wayland modes by running `vkcube -m [x11|wayland]`. Some versions of `vkcube` use `vkcube` to run in X11 and `vkcube-wayland` to run in wayland.
161
-
162
-
If you have multiple GPUs, you can also try running Zed on a different one to figure out where the issue comes from. You can do so a couple different ways:
163
-
Option A: with [vkdevicechooser](https://github.com/jiriks74/vkdevicechooser))
164
-
Or Option B: By using the `ZED_DEVICE_ID={device_id}` environment variable to specify the device ID.
165
-
166
-
You can obtain the device ID of your GPU by running `lspci -nn | grep VGA` which will output each GPU on one line like:
where the device ID here is `2484`. This value is in hexadecimal, so to force Zed to use this specific GPU you would set the environment variable like so:
173
-
174
-
```
175
-
ZED_DEVICE_ID=0x2484
176
-
```
177
-
178
-
Make sure to export the variable if you choose to define it globally in a `.bashrc` or similar
179
-
180
-
#### Reporting Vulkan/GPU issues
181
-
182
-
When reporting issues where Zed fails to start due to graphics initialization errors on GitHub, it can be impossible to run the `zed: copy system specs into clipboard` command like we instruct you to in our issue template. We provide an alternative way to collect the system specs specifically for this situation.
183
-
184
-
Passing the `--system-specs` flag to Zed like
185
-
186
-
```sh
187
-
zed --system-specs
188
-
```
189
-
190
-
will print the system specs to the terminal like so. It is strongly recommended to copy the output verbatim into the issue on GitHub, as it uses markdown formatting to ensure the output is readable.
191
-
192
-
Additionally, it is extremely beneficial to provide the contents of your Zed log when reporting such issues. The log is usually stored at `~/.local/share/zed/logs/Zed.log`. The recommended process for producing a helpful log file is as follows:
193
-
194
-
```sh
195
-
truncate -s 0 ~/.local/share/zed/logs/Zed.log # Clear the log file
Copy file name to clipboardExpand all lines: docs/src/linux.md
+80-5Lines changed: 80 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -126,16 +126,18 @@ If you see an error like "/lib64/libc.so.6: version 'GLIBC_2.29' not found" it m
126
126
127
127
### Graphics issues
128
128
129
-
### Zed fails to open windows
129
+
####Zed fails to open windows
130
130
131
131
Zed requires a GPU to run effectively. Under the hood, we use [Vulkan](https://www.vulkan.org/) to communicate with your GPU. If you are seeing problems with performance, or Zed fails to load, it is possible that Vulkan is the culprit.
132
132
133
-
If you see a notification saying `Zed failed to open a window: NoSupportedDeviceFound` this means that Vulkan cannot find a compatible GPU. You can begin troubleshooting Vulkan by installing the `vulkan-tools` package and running:
133
+
If you see a notification saying `Zed failed to open a window: NoSupportedDeviceFound` this means that Vulkan cannot find a compatible GPU. you can try running [vkcube](https://github.com/krh/vkcube) (usually available as part of the `vulkaninfo` or `vulkan-tools` package on various distributions) to try to troubleshoot where the issue is coming from like so:
134
134
135
-
```sh
135
+
```
136
136
vkcube
137
137
```
138
138
139
+
> **_Note_**: Try running in both X11 and wayland modes by running `vkcube -m [x11|wayland]`. Some versions of `vkcube` use `vkcube` to run in X11 and `vkcube-wayland` to run in wayland.
140
+
139
141
This should output a line describing your current graphics setup and show a rotating cube. If this does not work, you should be able to fix it by installing Vulkan compatible GPU drivers, however in some cases (for example running Linux on an Arm-based MacBook) there is no Vulkan support yet.
140
142
141
143
You can find out which graphics card Zed is using by looking in the Zed log (`~/.local/share/zed/logs/Zed.log`) for `Using GPU: ...`.
@@ -147,16 +149,89 @@ On some systems the file `/etc/prime-discrete` can be used to enforce the use of
147
149
On others, you may be able to the environment variable `DRI_PRIME=1` when running Zed to force the use of the discrete GPU.
148
150
149
151
If you're using an AMD GPU and Zed crashes when selecting long lines, try setting the `ZED_PATH_SAMPLE_COUNT=0` environment variable. (See [#26143](https://github.com/zed-industries/zed/issues/26143))
150
-
If you're using an AMD GPU, you might get a 'Broken Pipe' error. Try using the RADV or Mesa drivers. (See [#13880](https://github.com/zed-industries/zed/issues/13880))
151
152
152
-
If you are using Mesa, and want more control over which GPU is selected you can run `MESA_VK_DEVICE_SELECT=list zed --foreground` to get a list of available GPUs and then export `MESA_VK_DEVICE_SELECT=xxxx:yyyy` to choose a specific device.
153
+
If you're using an AMD GPU, you might get a 'Broken Pipe' error. Try using the RADV or Mesa drivers. (See [#13880](https://github.com/zed-industries/zed/issues/13880))
153
154
154
155
If you are using `amdvlk` you may find that zed only opens when run with `sudo $(which zed)`. To fix this, remove the `amdvlk` and `lib32-amdvlk` packages and install mesa/vulkan instead. ([#14141](https://github.com/zed-industries/zed/issues/14141)).
155
156
156
157
For more information, the [Arch guide to Vulkan](https://wiki.archlinux.org/title/Vulkan) has some good steps that translate well to most distributions.
157
158
159
+
#### Forcing Zed to use a specific GPU
160
+
161
+
There are a few different ways to force Zed to use a specific GPU:
162
+
163
+
##### Option A
164
+
165
+
You can use the `ZED_DEVICE_ID={device_id}` environment variable to specify the device ID of the GPU you wish to have Zed use.
166
+
167
+
You can obtain the device ID of your GPU by running `lspci -nn | grep VGA` which will output each GPU on one line like:
where the device ID here is `2484`. This value is in hexadecimal, so to force Zed to use this specific GPU you would set the environment variable like so:
174
+
175
+
```
176
+
ZED_DEVICE_ID=0x2484 zed
177
+
```
178
+
179
+
Make sure to export the variable if you choose to define it globally in a `.bashrc` or similar.
180
+
181
+
##### Option B
182
+
183
+
If you are using Mesa, you can run `MESA_VK_DEVICE_SELECT=list zed --foreground` to get a list of available GPUs and then export `MESA_VK_DEVICE_SELECT=xxxx:yyyy` to choose a specific device.
184
+
185
+
##### Option C
186
+
187
+
Using [vkdevicechooser](https://github.com/jiriks74/vkdevicechooser).
188
+
189
+
#### Reporting graphics issues
190
+
158
191
If Vulkan is configured correctly, and Zed is still not working for you, please [file an issue](https://github.com/zed-industries/zed) with as much information as possible.
159
192
193
+
When reporting issues where Zed fails to start due to graphics initialization errors on GitHub, it can be impossible to run the `zed: copy system specs into clipboard` command like we instruct you to in our issue template. We provide an alternative way to collect the system specs specifically for this situation.
194
+
195
+
Passing the `--system-specs` flag to Zed like
196
+
197
+
```sh
198
+
zed --system-specs
199
+
```
200
+
201
+
will print the system specs to the terminal like so. It is strongly recommended to copy the output verbatim into the issue on GitHub, as it uses markdown formatting to ensure the output is readable.
202
+
203
+
Additionally, it is extremely beneficial to provide the contents of your Zed log when reporting such issues. The log is usually located at `~/.local/share/zed/logs/Zed.log`. The recommended process for producing a helpful log file is as follows:
204
+
205
+
```sh
206
+
truncate -s 0 ~/.local/share/zed/logs/Zed.log # Clear the log file
0 commit comments