# gpui/blade: Allow forcing use of a specific GPU with \`ZED_DEVICE_ID\` env var \(\#27531\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/1463b4d201dc5d2a71e557cb24b97c82e73b2eed)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 1463b4d201dc5d2a71e557cb24b97c82e73b2eed

Requested commit: 1463b4d201dc5d2a71e557cb24b97c82e73b2eed

Commit: 1463b4d201dc5d2a71e557cb24b97c82e73b2eed

Tree: 00096bf01dd79473dfaf76bf26d8141e99c23341

Author: Ben Kunkle

Committer: GitHub

## Message

`````
gpui/blade: Allow forcing use of a specific GPU with `ZED_DEVICE_ID` env var (#27531)

Workaround for users affected by #25899

Thanks to the work done by @kvark in
https://github.com/kvark/blade/pull/210, we have the ability to tell
Vulkan (through blade) a specific GPU to use.

This will hopefully allow some of the users affected by #25899 to use
Zed by allowing them to use a specific GPU, if the primary/default GPU
will not work

Release Notes:

- Added the ability to specify which GPU Zed uses on Linux by setting
the `ZED_DEVICE_ID` environment variable. You can obtain the device ID
of your GPU by running `lspci -nn | grep VGA` which will output each GPU
on one line like:
  ```
08:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA104
[GeForce RTX 3070] [10de:2484] (rev a1)
  ````
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:
  ```
  ZED_DEVICE_ID=0x2484
  ```
Make sure to export the variable if you choose to define it globally in
a `.bashrc` or similar
`````

## Parents

- [77856bf01758a0e51a52f65690f87f78b2ead290](https://git.cafe/gitcafe/zed/commit/77856bf01758a0e51a52f65690f87f78b2ead290?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/1463b4d201dc5d2a71e557cb24b97c82e73b2eed?format=markdown)
