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

can't use webgpu frontend with vulkan drivers when hyprland config is set to use explicit_sync #6505

Open
nerdyinu opened this issue Dec 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@nerdyinu
Copy link

nerdyinu commented Dec 22, 2024

What Operating System(s) are you seeing this problem on?

Linux Wayland

Which Wayland compositor or X11 Window manager(s) are you using?

Fedora Asahi Remix / Hyprland

WezTerm version

20241222_002501_eeba7ac2

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

fedora asahi remix supports vulkan backend since September
command wezterm.gui.enumerate_gpus() return this

> wezterm.gui.enumerate_gpus()
[
    {
        "backend": "Vulkan",
        "device": 0,
        "device_type": "IntegratedGpu",
        "driver": "Honeykrisp",
        "driver_info": "Mesa 25.0.0-asahi20241204",
        "name": "Apple M2 Pro (G14S B1)",
        "vendor": 65541,
    },
    {
        "backend": "Vulkan",
        "device": 0,
        "device_type": "Cpu",
        "driver": "llvmpipe",
        "driver_info": "Mesa 25.0.0-asahi20241204 (LLVM 18.1.8)",
        "name": "llvmpipe (LLVM 18.1.8, 128 bits)",
        "vendor": 65541,
    },
    {
        "backend": "Gl",
        "device": 0,
        "device_type": "IntegratedGpu",
        "driver_info": "4.6 (Core Profile) Mesa 25.0.0-asahi20241204",
        "name": "Apple M2 Pro (G14S B1)",
        "vendor": 65541,
    },
]

i tried to use webgpu as frontend as stated in the document like this

for _, gpu in ipairs(wezterm.gui.enumerate_gpus()) do
	if gpu.backend == "Vulkan" and gpu.device_type == "IntegratedGpu" then
		config.webgpu_preferred_adapter = gpu
		config.front_end = "WebGpu"
		break
	end
end

but it crashes with this log

➜  wezterm                                                                                              [11:52:24]
wp_linux_drm_syncobj_timeline_v1#57: error 1: Timeline failed importing
11:52:28.178  ERROR  wgpu_hal::vulkan::adapter > get_physical_device_surface_present_modes: ERROR_SURFACE_LOST_KHR
11:52:28.178  ERROR  wgpu_hal::vulkan::adapter > get_physical_device_surface_formats: ERROR_SURFACE_LOST_KHR
11:52:28.179  ERROR  env_bootstrap             > panic at /builddir/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-22.1.0/src/backend/wgpu_core.rs:786:18 - !?
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: <unknown>
  15: <unknown>
  16: <unknown>
  17: <unknown>
  18: <unknown>
  19: <unknown>
  20: <unknown>
  21: <unknown>
  22: <unknown>
  23: <unknown>
  24: <unknown>
  25: <unknown>
  26: __libc_start_call_main
  27: __libc_start_main@@GLIBC_2.34
  28: <unknown>

thread 'main' panicked at /builddir/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-22.1.0/src/backend/wgpu_core.rs:786:18:
Error in Surface::configure: Validation Error

Caused by:
  Requested format Bgra8UnormSrgb is not in list of supported formats: []

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
panicked at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/thread/local.rs:260:26:

thread panicked while processing panic. aborting.
Error: nu::shell::core_dumped

  × External command core dumped
   ╭─[entry #1:1:1]
 1 │ wezterm
   · ───┬───
   ·    ╰── core dumped with SIGABRT (6)
   ╰────

hyprland is using explicit_sync=2. this hyprland config has also broken other apps that requires gpu acceleration with vulkan. explicit_sync=0 solves this, which doesnt uses explicit sync feature.

To Reproduce

No response

Configuration

> wezterm.gui.enumerate_gpus()
[
    {
        "backend": "Vulkan",
        "device": 0,
        "device_type": "IntegratedGpu",
        "driver": "Honeykrisp",
        "driver_info": "Mesa 25.0.0-asahi20241204",
        "name": "Apple M2 Pro (G14S B1)",
        "vendor": 65541,
    },
    {
        "backend": "Vulkan",
        "device": 0,
        "device_type": "Cpu",
        "driver": "llvmpipe",
        "driver_info": "Mesa 25.0.0-asahi20241204 (LLVM 18.1.8)",
        "name": "llvmpipe (LLVM 18.1.8, 128 bits)",
        "vendor": 65541,
    },
    {
        "backend": "Gl",
        "device": 0,
        "device_type": "IntegratedGpu",
        "driver_info": "4.6 (Core Profile) Mesa 25.0.0-asahi20241204",
        "name": "Apple M2 Pro (G14S B1)",
        "vendor": 65541,
    },
]

i tried to use webgpu as frontend as stated in the document like this

for _, gpu in ipairs(wezterm.gui.enumerate_gpus()) do
	if gpu.backend == "Vulkan" and gpu.device_type == "IntegratedGpu" then
		config.webgpu_preferred_adapter = gpu
		config.front_end = "WebGpu"
		break
	end
end

Expected Behavior

No response

Logs

➜  wezterm                                                                                              [11:52:24]
wp_linux_drm_syncobj_timeline_v1#57: error 1: Timeline failed importing
11:52:28.178  ERROR  wgpu_hal::vulkan::adapter > get_physical_device_surface_present_modes: ERROR_SURFACE_LOST_KHR
11:52:28.178  ERROR  wgpu_hal::vulkan::adapter > get_physical_device_surface_formats: ERROR_SURFACE_LOST_KHR
11:52:28.179  ERROR  env_bootstrap             > panic at /builddir/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-22.1.0/src/backend/wgpu_core.rs:786:18 - !?
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: <unknown>
  15: <unknown>
  16: <unknown>
  17: <unknown>
  18: <unknown>
  19: <unknown>
  20: <unknown>
  21: <unknown>
  22: <unknown>
  23: <unknown>
  24: <unknown>
  25: <unknown>
  26: __libc_start_call_main
  27: __libc_start_main@@GLIBC_2.34
  28: <unknown>

thread 'main' panicked at /builddir/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-22.1.0/src/backend/wgpu_core.rs:786:18:
Error in Surface::configure: Validation Error

Caused by:
  Requested format Bgra8UnormSrgb is not in list of supported formats: []

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
panicked at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/thread/local.rs:260:26:

thread panicked while processing panic. aborting.
Error: nu::shell::core_dumped

  × External command core dumped
   ╭─[entry #1:1:1]
 1 │ wezterm
   · ───┬───
   ·    ╰── core dumped with SIGABRT (6)
   ╰────

Anything else?

No response

@nerdyinu nerdyinu added the bug Something isn't working label Dec 22, 2024
@nerdyinu nerdyinu changed the title can't use webgpu frontend with vulkan drivers asahi linux can't use webgpu frontend with vulkan drivers when hyprland config is set to use explicit_sync Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant