Open ChrisJefferson opened 2 months ago
I have just installed Zed as instructed in the downloads page, via the script:
curl https://zed.dev/install.sh | sh
I'm using Ubuntu 24.04 LTS and it's a regular installation, so not running anything via WSL.
I'm probably getting the same error as @ChrisJefferson, but the message says NoSupportedDeviceFound
when I try to open the application. The message is shown in the system notifications tray.
I tried to find zed.log file, but it can't be found anywhere in my computer.
I managed to get zed
running with the following command:
unset WAYLAND_DISPLAY; zed
This forces zed
to not use wayland.
The resulting zed still doesn't work on my machine (the gui doesn't render), but it doesn't crash. This may be helpful for other people, as a test.
More info on hopefully the same issue:
Seeing the same results as people above, except I'm on Ubuntu 22.04.04.
After running unset WAYLAND_DISPLAY; zed
, I got the error:
[2024-07-10T20:52:20-07:00 ERROR blade_graphics::hal::init] Missing Vulkan entry points: LibraryLoadFailure(DlOpen { desc: "libvulkan.so.1: cannot open shared object file: No such file or directory" })
Running sudo apt-get install libvulkan-dev
gets me past the above error. However, zed ends up rendering a frame and working titlebar, but an empty window. (Setting WAYLAND_DISPLAY=wayland-0
sends me back to UnsupportedVersion)
The above image might be helpful. I can hover over the WYSIWYG header button through the zed gui. The mouse pointer changes to a zed provided one when over the titlebar, but changes back to the Windows provided elsewhere.
I will also mention zed did used to work on my machine, I tried it during development.
I just did a git bisect, and the x11 gui broke in commit 47aa761ca9dee79852056897090480ff7f5ba7a9 . That commit did make a lot of changes, and I have no idea how x11 works, so I can't usefully debug beyond that -- just wanted to mention it so this isn't a problem that WSL2 never worked.
I encountered the same issue while using WSL Ubuntu 22.04. The zed is unable to render under X11 and fails to start under Wayland. Although I am not familiar with Rust, changing the following line fixed the Wayland issue but still fails under X11:
crates/gpui/src/platform/linux/wayland/client.rs 143:
wm_base: globals.bind(&qh, 2..=5, ()).unwrap(),
wm_base: globals.bind(&qh, 1..=1, ()).unwrap(),
I've tried to run zed in Arch WSL2.
Turn out I need to rebuild mesa described like here https://github.com/microsoft/wslg/issues/1254
After that I can launch zed using unset WAYLAND_DISPLAY; zed
As we use different distros of WSL2, I suggest to check if your distro can run simple vulkan test program like 'vkcube' first.
I've tried to run zed in Arch WSL2. Turn out I need to rebuild mesa described like here microsoft/wslg#1254 After that I can launch zed using
unset WAYLAND_DISPLAY; zed
As we use different distros of WSL2, I suggest to check if your distro can run simple vulkan test program like 'vkcube' first.
You rebuild mesa from here https://github.com/archlinux/svntogit-packages/tree/packages/mesa ? I'm using ArchWSL too.
@gleysonabreu in short I got it using pkgctl repo clone --protocol=https mesa
In detail:
Vulkan
refer to https://wiki.archlinux.org/title/Vulkan
I use intel iris, so I basically install vulkan-intel
and vulkan-icd-loader
. Also install vulkan-tools
so you can have commands like vulkaninfo
and test program vkcube
.
Get the mesa source
Installed devtools
and run pkgctl repo clone --protocol=https mesa
Compile
I installed devtools
, rustup
, llvm
, llvm-libs
.
Run rustup default stable
to have a proper rust environment
Edit PKGBUILD as mentioned above, here's my edited one https://gist.github.com/jackysee/68968da635cd507f041464d7607c26f5
Build and install
Run makepkg -si
If it complains PGP signature could not be verified, run
gpg --recv-keys --keyserver hkps://keys.openpgp.org [THE_HASH_KEY]
and try build install again
Test
Run vulkaninfo --summary
and vkcube
to see if it can show correct info.
I might have missed something as I'm not documenting when try to get it build.
Maybe helpful to someone: Upgrade Ubuntu to 24.04 makes Zed works on my WSL.
There might be NoCompositor
error unwrap. unset WAYLAND_DISPLAY
will do.
I did an upgrade to Ubuntu 24.04 on my WSL2 install. I initially got the NoCompositor
error, but I wanted to try to get Zed working with the Wayland compositor. I was able to get the error UnsupportedVersion
after running ln -s /mnt/wslg/runtime-dir/wayland-0* /run/user/1000/
. I found that solution at https://github.com/microsoft/wslg/issues/1032#issuecomment-1502152914.
I think this is just a Wayland in WSLg thing. However, if I run weston -B x11
to start a new compositor and run WAYLAND_DISPLAY=wayland-1 zed
, it actually works, although it is embedded in a parent window created by the Weston session.
for anyone wanna run zed on WSL Ubuntu 22.04:
libvulkan-dev
:
sudo apt-get install libvulkan-dev
mesa
to 24.1, I would recommend the kisak-mesa
:
sudo add-apt-repository ppa:kisak/kisak-mesa
sudo apt update
sudo apt upgrade
end then run Zed with
WAYLAND_DISPLAY='' zed --foreground
on wsl2 upgraded to latest fedora remix version:
-bash-5.2$ cat /etc/os-release
NAME="Fedora Remix for WSL"
VERSION="40"
ID=fedoraremixforwsl
ID_LIKE=fedora
VERSION_ID=40
PLATFORM_ID="platform:f40"
PRETTY_NAME="Fedora Remix for WSL"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:fedoraproject:fedora:40"
HOME_URL="https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL"
SUPPORT_URL="https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL"
BUG_REPORT_URL="https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL/issues"
PRIVACY_POLICY_URL="https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL/blob/master/PRIVACY.md"
FEDORA_REMIX_VERSION=40.1.0
upgrade instructions: https://www.whitewaterfoundry.com/blog/2019/11/3/upgrade-fedora-remix-for-wsl-to-31-2a7z8-njsec-fl7bd
using the command supplied previously:
unset WAYLAND_DISPLAY; zed
and screenshot of it working:
for anyone wanna run zed on WSL Ubuntu 22.04:
- install
libvulkan-dev
:sudo apt-get install libvulkan-dev
- update
mesa
to 24.1, I would recommend thekisak-mesa
:sudo add-apt-repository ppa:kisak/kisak-mesa sudo apt update sudo apt upgrade
end then run Zed with
WAYLAND_DISPLAY='' zed --foreground
any idea on this ?
WSL Ubuntu 22.04.4 LTS Gtx 1660 super
for anyone wanna run zed on WSL Ubuntu 22.04:
- install
libvulkan-dev
:sudo apt-get install libvulkan-dev
- update
mesa
to 24.1, I would recommend thekisak-mesa
:sudo add-apt-repository ppa:kisak/kisak-mesa sudo apt update sudo apt upgrade
end then run Zed with
WAYLAND_DISPLAY='' zed --foreground
any idea on this ?
WSL Ubuntu 22.04.4 LTS Gtx 1660 super
Do you have integrated gpu? or only have Nvidia?
Please take a look at this to select the Nvidia as default gpu device.
You can also install the vulkan-tools
to check GPU devices list with vulkaninfo --summary
:
sudo apt install vulkan-tools
vulkaninfo --summary
for anyone wanna run zed on WSL Ubuntu 22.04:
- install
libvulkan-dev
:sudo apt-get install libvulkan-dev
- update
mesa
to 24.1, I would recommend thekisak-mesa
:sudo add-apt-repository ppa:kisak/kisak-mesa sudo apt update sudo apt upgrade
end then run Zed with
WAYLAND_DISPLAY='' zed --foreground
any idea on this ? WSL Ubuntu 22.04.4 LTS Gtx 1660 super
Do you have integrated gpu? or only have Nvidia? Please take a look at this to select the Nvidia as default gpu device. You can also install the
vulkan-tools
to check GPU devices list withvulkaninfo --summary
:sudo apt install vulkan-tools vulkaninfo --summary
i have intel 10400F , so no integrated gpu
GPU0:
apiVersion = 4202774 (1.2.278)
driverVersion = 100667396 (0x6001004)
deviceType = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
deviceName = Microsoft Direct3D12 (NVIDIA GeForce GTX 1660 SUPER)
driverID = UNKNOWN_VkDriverId_value23
driverName = Dozen
driverInfo = Mesa 24.1.4 - kisak-mesa PPA
conformanceVersion = 0.0.0.0
GPU1:
apiVersion = 4206870 (1.3.278)
driverVersion = 1 (0x0001)
deviceType = PHYSICAL_DEVICE_TYPE_CPU
deviceName = llvmpipe (LLVM 15.0.7, 256 bits)
driverID = DRIVER_ID_MESA_LLVMPIPE
driverName = llvmpipe
driverInfo = Mesa 24.1.4 - kisak-mesa PPA (LLVM 15.0.7)
conformanceVersion = 1.3.1.1
nvdia is default selected glxinfo -b
name of display: :0
WARNING: dzn is not a conformant Vulkan implementation, testing use only.
WARNING: Some incorrect rendering might occur because the selected Vulkan device (Microsoft Direct3D12 (NVIDIA GeForce GTX 1660 SUPER)) doesn't support base Zink requirements: feats.features.logicOp have_EXT_custom_border_color have_EXT_line_rasterization
display: :0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Microsoft Corporation (0xffffffff)
Device: D3D12 (NVIDIA GeForce GTX 1660 SUPER) (0xffffffff)
Version: 24.1.4
Accelerated: yes
Video memory: 14119MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 4.6
Max compat profile version: 4.6
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.1
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce GTX 1660 SUPER)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 24.1.4 - kisak-mesa PPA
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
vkcube running fine
Do you have integrated gpu? or only have Nvidia? Please take a look at this to select the Nvidia as default gpu device. You can also install the
vulkan-tools
to check GPU devices list withvulkaninfo --summary
:sudo apt install vulkan-tools vulkaninfo --summary
i have intel 10400F , so no integrated gpu
Devices:
GPU0: apiVersion = 4202774 (1.2.278) driverVersion = 100667396 (0x6001004) deviceType = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU deviceName = Microsoft Direct3D12 (NVIDIA GeForce GTX 1660 SUPER) driverID = UNKNOWN_VkDriverId_value23 driverName = Dozen driverInfo = Mesa 24.1.4 - kisak-mesa PPA conformanceVersion = 0.0.0.0 GPU1: apiVersion = 4206870 (1.3.278) driverVersion = 1 (0x0001) deviceType = PHYSICAL_DEVICE_TYPE_CPU deviceName = llvmpipe (LLVM 15.0.7, 256 bits) driverID = DRIVER_ID_MESA_LLVMPIPE driverName = llvmpipe driverInfo = Mesa 24.1.4 - kisak-mesa PPA (LLVM 15.0.7) conformanceVersion = 1.3.1.1
nvdia is default selected glxinfo -b
name of display: :0 WARNING: dzn is not a conformant Vulkan implementation, testing use only. WARNING: Some incorrect rendering might occur because the selected Vulkan device (Microsoft Direct3D12 (NVIDIA GeForce GTX 1660 SUPER)) doesn't support base Zink requirements: feats.features.logicOp have_EXT_custom_border_color have_EXT_line_rasterization display: :0 screen: 0 direct rendering: Yes Extended renderer info (GLX_MESA_query_renderer): Vendor: Microsoft Corporation (0xffffffff) Device: D3D12 (NVIDIA GeForce GTX 1660 SUPER) (0xffffffff) Version: 24.1.4 Accelerated: yes Video memory: 14119MB Unified memory: no Preferred profile: core (0x1) Max core profile version: 4.6 Max compat profile version: 4.6 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 3.1 OpenGL vendor string: Microsoft Corporation OpenGL renderer string: D3D12 (NVIDIA GeForce GTX 1660 SUPER) OpenGL core profile version string: 4.6 (Core Profile) Mesa 24.1.4 - kisak-mesa PPA OpenGL core profile shading language version string: 4.60 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile
vkcube running fine
maybe you need liquorix kernel
sudo add-apt-repository ppa:damentz/liquorix
sudo apt update
sudo apt upgrade
maybe you need liquorix kernel
sudo add-apt-repository ppa:damentz/liquorix sudo apt update sudo apt upgrade
I've followed all mentioned instructions with no luck:
λ zed --foreground
thread 'main' panicked at crates/gpui/src/platform/linux/wayland/client.rs:144:51:
called `Result::unwrap()` on an `Err` value: UnsupportedVersion
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Devices:
========
GPU0:
apiVersion = 4202774 (1.2.278)
driverVersion = 100667397 (0x6001005)
vendorID = 0x1002
deviceID = 0x1638
deviceType = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
deviceName = Microsoft Direct3D12 (AMD Radeon(TM) Graphics)
driverID = UNKNOWN_VkDriverId_value23
driverName = Dozen
driverInfo = Mesa 24.1.5 - kisak-mesa PPA
conformanceVersion = 0.0.0.0
deviceUUID = 9253ce13-fc2e-4510-e72a-febacbeb308d
driverUUID = 14348097-ced8-d6af-7692-6152004709b3
GPU1:
apiVersion = 4206870 (1.3.278)
driverVersion = 1 (0x0001)
vendorID = 0x10005
deviceID = 0x0000
deviceType = PHYSICAL_DEVICE_TYPE_CPU
deviceName = llvmpipe (LLVM 15.0.7, 256 bits)
driverID = DRIVER_ID_MESA_LLVMPIPE
driverName = llvmpipe
driverInfo = Mesa 24.1.5 - kisak-mesa PPA (LLVM 15.0.7)
conformanceVersion = 1.3.1.1
deviceUUID = 6d657361-3234-2e31-2e35-202d206b6900
driverUUID = 6c6c766d-7069-7065-5555-494400000000
maybe you need liquorix kernel
sudo add-apt-repository ppa:damentz/liquorix sudo apt update sudo apt upgrade
I've followed all mentioned instructions with no luck:
λ zed --foreground thread 'main' panicked at crates/gpui/src/platform/linux/wayland/client.rs:144:51: called `Result::unwrap()` on an `Err` value: UnsupportedVersion note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Devices: ======== GPU0: apiVersion = 4202774 (1.2.278) driverVersion = 100667397 (0x6001005) vendorID = 0x1002 deviceID = 0x1638 deviceType = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU deviceName = Microsoft Direct3D12 (AMD Radeon(TM) Graphics) driverID = UNKNOWN_VkDriverId_value23 driverName = Dozen driverInfo = Mesa 24.1.5 - kisak-mesa PPA conformanceVersion = 0.0.0.0 deviceUUID = 9253ce13-fc2e-4510-e72a-febacbeb308d driverUUID = 14348097-ced8-d6af-7692-6152004709b3 GPU1: apiVersion = 4206870 (1.3.278) driverVersion = 1 (0x0001) vendorID = 0x10005 deviceID = 0x0000 deviceType = PHYSICAL_DEVICE_TYPE_CPU deviceName = llvmpipe (LLVM 15.0.7, 256 bits) driverID = DRIVER_ID_MESA_LLVMPIPE driverName = llvmpipe driverInfo = Mesa 24.1.5 - kisak-mesa PPA (LLVM 15.0.7) conformanceVersion = 1.3.1.1 deviceUUID = 6d657361-3234-2e31-2e35-202d206b6900 driverUUID = 6c6c766d-7069-7065-5555-494400000000
UnsupportedVersion seems that you are still running zed with Wayland (because Zed required Wayland 2 and above but WSL Wayland fork is 1), try to force it run with X11 by:
WAYLAND_DISPLAY='' zed --foreground
I can confirm that @jackysee instructions here works for arch installation; You just have to use mesa-git
from AUR:
git clone https://aur.archlinux.org/mesa-git.git ~/mesa-git \
&& pushd ~/mesa-git
microsoft-dozen-driver
to provides
arraysed -i "/^provides=\((\)/a \ \ 'microsoft-dozen-driver'" 'PKGBUILD'
vulkan-drivers
value in the meson_options
arraysed -i 's/-D vulkan-drivers=amd,intel,intel_hasvk,swrast,virtio,nouveau/-D vulkan-drivers=amd,intel,intel_hasvk,swrast,virtio,nouveau,microsoft-experimental/' 'PKGBUILD'
rmdir
with rm -r
sed -i 's/rmdir/rm -r/' 'PKGBUILD'
makepkg -si
/tmp/.X11-unix
existssudo rm -rf /tmp/.X11-unix
sudo ln -s /mnt/wslg/.X11-unix /tmp/.X11-unix
glxinfo -B
lspci -k | grep -A 2 -E "(VGA|3D)"
vulkaninfo --summary
vkcube
pacman -S zed
)sudo sed -i.bak \
-e 's/^Exec=zeditor *$/Exec=sh -c "unset WAYLAND_DISPLAY; zeditor"/' \
-e 's/^Exec=zeditor --new *$/Exec=sh -c "unset WAYLAND_DISPLAY; zeditor --new"/' \
"/usr/share/applications/dev.zed.Zed.desktop"
alias zeditor='WAYLAND_DISPLAY= zeditor'
alias zed='zeditor'
curl
, use the following to fix the desktop file:find "${HOME}/.local/share/applications" -type f -name '*zed*.desktop' -exec sed -i '/^Exec=/s/^Exec=/Exec=env -u WAYLAND_DISPLAY /; /^TryExec=/s/^TryExec=/TryExec=env -u WAYLAND_DISPLAY /' {} \;
@ChrisJefferson As the original reporter on this issue I wanted to check in and see if you were able to get this sorted with Ubuntu under WSL2. Coincidentally Ubuntu 23.10 was EOL'd one day after you posted this (2024-07-11) and given that Ubuntu 24 appears to work out of the box for most folks -- I'm hoping switching to Ubuntu24 will solve your issues.
Note, that at this time. people have reported that it only works with X11 not Wayland, so you will have to run Zed with WAYLAND_DISPLAY='' zed
or similar. More info here.
I wrote a script to automate build and install on windows. I think this might address immediate needs until Zed team releases official binaries.
Added a section for using zed's remote-developement feature here with wsl2
Got it running on 20.04 now. However, this wasn't sufficient to get it running:
sudo apt-get install libvulkan-dev
sudo add-apt-repository ppa:kisak/kisak-mesa
sudo apt update
sudo apt upgrade
I checked the mesa driver version with apt policy mesa-vulkan-drivers
and saw that I was still on Mesa 21.2.6, but I had the newest version available:
apt policy mesa-vulkan-drivers
mesa-vulkan-drivers:
Installed: 21.2.6-0ubuntu0.1~20.04.2
Candidate: 24.2.1~kisak1~f
Version table:
24.2.1~kisak1~f 500
500 http://ppa.launchpad.net/kisak/kisak-mesa/ubuntu focal/main amd64 Packages
*** 21.2.6-0ubuntu0.1~20.04.2 500
500 http://ca.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
100 /var/lib/dpkg/status
20.0.4-2ubuntu1 500
500 http://ca.archive.ubuntu.com/ubuntu focal/main amd64 Packages
I upgraded the mesa-vulkan-drivers
using sudo apt install --only-upgrade mesa-vulkan-drivers
and I'm able to run zed now
@notpeter I personally gave up, as I don't want to significantly update my WSL or install vulkan drivers, as I'm worried about breaking things and need it to function for work, but it looks like updating to a newer ubuntu release, installing vulkan and disabling Wayland is helping many people
Gave up on this. Followed all the hints above. Shows "empty project" dialog box without anything rendering inside it. WSL2
Gave up on this. Followed all the hints above. Shows "empty project" dialog box without anything rendering inside it. WSL2
Same. I think that still needs more work behind the scenes.
FYI: https://github.com/superboxes/zed-windows (my quick test has shown that it works)
I need it on WSL-2.
On Wed, Sep 18, 2024, 23:54 VS @.***> wrote:
FYI: https://github.com/superboxes/zed-windows (my quick test has shown that it works)
— Reply to this email directly, view it on GitHub https://github.com/zed-industries/zed/issues/14126#issuecomment-2359975428, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABTCTC6XWDCVUAZ3P5YNI3ZXJKITAVCNFSM6AAAAABKV6UGCCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJZHE3TKNBSHA . You are receiving this because you commented.Message ID: @.***>
Check for existing issues
Describe the bug / provide steps to reproduce it
I installed the 'linux' zed release. If I run it, it just appears to hang.
If I run with
--foreground
, I get:Environment
WSL2, running Ubuntu 23.10. I can run other programs, such as 'firefox' and 'xterm', so the problem is not that I just can't run GUI programs inside WSL2
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