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 Alacritty/Wezterm when using only sway+portal from this overlay #416

Open
colemickens opened this issue Aug 21, 2023 · 6 comments

Comments

@colemickens
Copy link
Member

Note, foot and rio seem to work (though rio's font rendering ain't cutting it)/

This is what I have in my gui-sway.nix file for configuring sway right now:

config = {
   # ... 
    nixpkgs.overlays = [
      (final: prev:
        let nwPkgs = inputs.nixpkgs-wayland.packages.${pkgs.stdenv.hostPlatform.system}; in
        {
          inherit (nwPkgs)
            sway-unwrapped
            xdg-desktop-portal-wlr
            sirula;
        })
    ];
   # ...
};

However, when I do this (and have WLR_RENDERER=vulkan, not sure if related), then I am unable to use Alacritty and Wezterm:

╭ zeph  ~/code/nixcfg 0sec                                                                                                                                                                                         
╰─▶ wezterm start                                                                                                                                                                                                  
interface 'wl_surface' has no event 2                                                                                                                                                                              
21:00:55.229  ERROR  wezterm_gui > running message loop: error during event_q.dispatch protocol_error=None: Resource temporarily unavailable (os error 11); terminating                                            
warning: queue 0x56053cb553c0 destroyed while proxies still attached:                                                                                                                                              
  wl_callback@70 still attached                                                                                                                                                                                    
  wl_buffer@55 still attached                                                                                                                                                                                      
  wl_buffer@54 still attached                                                                                                                                                                                      
  wl_buffer@53 still attached                                                                                                                                                                                      
  wl_buffer@52 still attached                                                                                                                                                                                      
  wl_subsurface@51 still attached                                                                                                                                                                                  
  wl_surface@50 still attached                                                                                                                                                                                     
  wl_subsurface@49 still attached                                                                                                                                                                                  
  wl_surface@48 still attached                                                                                                                                                                                     
  wl_subsurface@47 still attached                                                                                                                                                                                  
  wl_surface@46 still attached                                                                                                                                                                                     
  wl_subsurface@45 still attached                                                                                                                                                                                  
  wl_surface@44 still attached                                                                                                                                                                                     
  wl_subsurface@43 still attached                                                                                                                                                                                  
  wl_surface@42 still attached                                                                                                                                                                                     
  xdg_wm_base@24 still attached                                                                                                                                                                                    
  wl_surface@23 still attached                                                                                                                                                                                     
  wl_data_device@20 still attached                                                                                                                                                                                 
  wl_pointer@18 still attached                                                                                                                                                                                     
  zwp_text_input_v3@17 still attached                                                                                                                                                                              
  wl_keyboard@16 still attached                                                                                                                                                                                    
  zwp_primary_selection_device_v1@15 still attached                                                                                                                                                                
  zwp_primary_selection_device_manager_v1@3 still attached                                                                                                                                                         
  wl_data_device@14 still attached                                                                                                                                                                                 
  wl_output@13 still attached                                                                                                                                                                                      
  wl_output@12 still attached                                                                                                                                                                                      
  wl_output@11 still attached                                                                                                                                                                                      
  wl_seat@10 still attached                                                                                                                                                                                        
  zwp_text_input_manager_v3@9 still attached                                                                                                                                                                       
  zxdg_decoration_manager_v1@8 still attached                                                                                                                                                                      
  wl_data_device_manager@7 still attached                                                                                                                                                                          
  wl_subcompositor@6 still attached                                                                                                                                                                                
  wl_compositor@5 still attached                                                                                                                                                                                   
  wl_shm@4 still attached                                                                                                                                                                                          
  wl_registry@2 still attached                                                                                                                                                                                     

and:

╭ zeph  ~/code/nixcfg 194ms ✘1                                                                                                              
╰─▶ alacritty                                                                                                                               
interface 'wl_surface' has no event 2

and then it just opens a black window with no prompt rendered, seemingly quite broken.

Eating an entire core non-stop, as well.

I don't really understand why/how this would be the case. Unless there just happen to be bugs in those terminal emulators that a newer version of Sway exposes.

However, switching to "stable" sway has resulted in numerous crashes already.

I'm about ready to spend the time packaging Cosmic and getting rid of Sway once and for all, but it'd be nice to understand what's going on here.

@colemickens
Copy link
Member Author

cc: @Artturin any thoughts?

@colemickens
Copy link
Member Author

Oculante does a similar thing as alacritty. I'm guessing they use the same underlying Rust code (Winit or whatever).

@colemickens
Copy link
Member Author

see: wez/wezterm#3996

and: djpohly/dwl#467 (comment)

I suspect this has to bubble up and affects a number of things.

@DirectXMan12
Copy link

fwiw, afaict this has been fixed at some point on alacritty main, it just hasn't made it into a release. Alacritty changed its build process a bit since the last release, so building from HEAD is not as simple as a src override, but it should work.

@colemickens
Copy link
Member Author

The Smithay devs have published a 0.16.1 bugfix release, which somehow resolves this issue. This allows "top-level" app devs to update to this bugfix, without needing to wait for the big new winit release.

I've pinged wezterm, oculante, and rog-control-center about this after testing that it resolves the issues I have been seeing.

@ymatsiuk
Copy link
Contributor

Thanks for your effort 👍 🙏

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