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

Fails to launch with this configuration on Wayland with an AMD GPU in Plasma6 #20

Closed
Tristor opened this issue Aug 13, 2024 · 7 comments

Comments

@Tristor
Copy link

Tristor commented Aug 13, 2024

Description of Issue

I attempted to use this config with a fresh install of WezTerm on my Framework 13 AMD running Arch + Plasma-Desktop. Plasma6 uses the linux-dmabuf Wayland interface but the AMDVLK driver uses wl_drm in Wayland, which is a legacy interface. This is, I think, the cause of this interaction. I plan to test with a different compositor outside of Plasma6 to see if I can get this working. I found the following, I think related issue, GPUOpen-Drivers/pal#96

Error message logged to terminal:

wl_drm#42: error 0: wl_drm.create_prime_buffer is not implemented
16:08:42.081  ERROR  wezterm_gui > running message loop: Error while flushing display: Broken pipe (os error 32); terminating
warning: queue 0x55c98fac8130 destroyed while proxies still attached:
  wl_callback#45 still attached
  xdg_wm_base#22 still attached
  wl_surface#21 still attached
  wl_data_device#18 still attached
  wl_pointer#16 still attached
  zwp_text_input_v3#15 still attached
  wl_keyboard#14 still attached
  zwp_primary_selection_device_v1#13 still attached
  zwp_primary_selection_device_manager_v1#3 still attached
  wl_data_device#12 still attached
  wl_output#11 still attached
  zwp_text_input_manager_v3#10 still attached
  wl_subcompositor#9 still attached
  wl_data_device_manager#8 still attached
  wl_seat#7 still attached
  wl_shm#6 still attached
  zxdg_decoration_manager_v1#5 still attached
  wl_compositor#4 still attached
  wl_registry#2 still attached
@KevinSilvester
Copy link
Owner

KevinSilvester commented Aug 14, 2024

This is just a guess, I think the issue is in the webgpu_preferred_adapter that was picked in in config/appearance.lua line 11.

webgpu_power_preference = 'HighPerformance',
webgpu_preferred_adapter = gpu_adapters:pick_best(),

Try commenting that line and see if that works.

@KevinSilvester
Copy link
Owner

KevinSilvester commented Aug 16, 2024

I take back what I said.

I'm still not entirely sure what's happening but from what I understand is that it's an issue caused by Wayland and wgpu's Vulkan support on AMD cards not playing nicely with each other.

If that is the case and the issue is simply limited to Vulkan and Wayland, there might be 2 solutions:

  1. Probably the most straight forward solution.
    Change the front_end option from WebGpu to OpenGL or simply remove that option (the default is OpenGL).

    front_end = 'WebGpu',

    This will force WezTerm to render the GUI without relying on the wgpu crate using its built-in OpenGL support.

  2. Keep the front_end option as is and force wgpu to render the GUI using its own OpenGl support.
    To do this, update the webgpu_preferred_adapter option from:
    gpu_adapters:pick_best() -> gpu_adapters:pick_manual('Gl', 'Other')

    webgpu_preferred_adapter = gpu_adapters:pick_best(),

I don't really have the means to test either of the solutions out, but I'm fairly confident solution 1 will be your best bet.
Hope this helps :)

@Tristor
Copy link
Author

Tristor commented Aug 18, 2024

Thanks Kevin, I will give this a shot later this week. Thanks

@KevinSilvester
Copy link
Owner

Hey @Tristor, did you get a chance to try any of the solutions yet?

@PACHAKUTlQ
Copy link

PACHAKUTlQ commented Sep 3, 2024

Hey @Tristor, did you get a chance to try any of the solutions yet?

Same situation. The second solution works for me. Haven't tried the first, but I suppose it would work too. Thx a lot.

@KevinSilvester
Copy link
Owner

no worries 😊

@KevinSilvester
Copy link
Owner

Hey @Tristor, it's been over a month since the issue was opened and I haven't heard a response in a while.
Plus one of the solutions I posted seemed to have worked for @PACHAKUTlQ.
So, with that, I'm going to close this issue.

If neither of the solutions doesn't work, feel free to re-open the issue, but at that stage, I do think this is beyond just a config tweak and more an upstream issue potentially with Wezterm, Wayland or AMDVLK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants