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 start onagre on sway/wayland #67

Open
usagi-flow opened this issue Oct 28, 2023 · 12 comments
Open

Can't start onagre on sway/wayland #67

usagi-flow opened this issue Oct 28, 2023 · 12 comments
Labels
bug Something isn't working

Comments

@usagi-flow
Copy link

Describe the bug
The application doesn't start:

$ RUST_BACKTRACE=1 onagre
Failed to parse theme:
Failed to open config file
Failing back to default theme
thread 'main' panicked at 'Failed to initialize any backend! Wayland status: NoWaylandLib X11 status: LibraryOpenError(OpenError { kind:
 Library, detail: "opening library failed (libX11.so.6: cannot open shared object file: No such file or directory); opening library fail
ed (libX11.so: cannot open shared object file: No such file or directory)" })', /build/cargo-vendor-dir/winit-0.26.1/src/platform_impl/l
inux/mod.rs:619:9
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: onagre::app::run
   3: onagre::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Config
n.a.

To Reproduce

  • I use void linux, elogind and SwayFX on a mid 2014 macbook pro (intel integrated graphics).
  • Install onagre from nixpkgs (I use the 23.05 stable channel, and I use nix because my distribution, void linux, doesn't provide onagre yet).
  • Run onagre.

Expected behavior
Onagre starts.

Window manager (please complete the following information):

  • Window manager: swayfx v0.3.2
@usagi-flow usagi-flow added the bug Something isn't working label Oct 28, 2023
@oknozor
Copy link
Collaborator

oknozor commented Oct 28, 2023

I have no idea why your DE is trying to launch onagre with X11 backend.
There are a few things you could do to solve this.

  1. Try to force vulkan backend (assuming you have vulkan installed on your system): WGPU_BACKEND=vulkan onagre, I am not sure but that might be related
  2. Try with the latest onagre version (cargo install --git https://github.com/oknozor/onagre, you would need rust installed to do that.
  3. Since your DE is trying to use X11 backend install xorg-xwayland

Let me know if any of the above works for you.

I am waiting for pop-os maintainers to publish a library so I can finally make a stable release of onagre, when that's done there will hopefully be some official package for common linux distros.

@usagi-flow
Copy link
Author

Thank you for the suggestions @oknozor . No success so far, unfortunately:

  • WGPU_BACKEND=vulkan onagre didn't work, it gives the same result.
  • I tried to build from source but failed; pkg-config complained that it couldn't find fontconfig, even though fontconfig is installed. Weird...
  • I actually do have xwayland and occasionally start electron apps with it, although I try to avoid it.

@oknozor
Copy link
Collaborator

oknozor commented Jan 27, 2024

Hey @usagi-flow I recently made some updates and I'd like to confirm this is fixed before releasing v1. Would you mind trying to reinstall (cargo install --git https://github.com/onagre-launcher/onagre) and make a report here ?

@jens-hj
Copy link

jens-hj commented Feb 1, 2024

Hi, I am currently having this issue with onagre on Hyprland, here is my trace. I use NixOS, and can reproduce this both by installing from nixpkgs and with cargo install --git https://github.com/onagre-launcher/onagre.

$ RUST_BACKTRACE=1 onagre
2024-02-01T22:31:22.743488Z  INFO onagre: Starting onagre
thread 'main' panicked at /home/jens/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/platform_impl/linux/mod.rs:757:9:
Failed to initialize any backend! Wayland status: NoWaylandLib X11 status: LibraryOpenError(OpenError { kind: Library, detail: "opening library failed (libX11.so.6: cannot open shared object file: No such file or directory); opening library failed (libX11.so: cannot open shared object file: No such file or directory)" })
stack backtrace:
   0: rust_begin_unwind
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:72:14
   2: iced_winit::application::run
   3: onagre::app::run
   4: onagre::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

I also don't understand why it is unable to use Wayland

@oknozor
Copy link
Collaborator

oknozor commented Feb 2, 2024

Can you paste the output of RUST_BACKTRACE=1 WINIT_UNIX_BACKEND=wayland WGPU_BACKEND=vulkan onagre here ?

@jens-hj
Copy link

jens-hj commented Feb 5, 2024

Here it is:

2024-02-05T18:28:23.066379Z  INFO onagre: Starting onagre
thread 'main' panicked at /home/jens/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/platform_impl/linux/mod.rs:730:26:
Failed to initialize Wayland backend: NoWaylandLib
stack backtrace:
   0: rust_begin_unwind
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:72:14
   2: core::result::unwrap_failed
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/result.rs:1653:5
   3: iced_winit::application::run
   4: onagre::app::run
   5: onagre::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace

@oknozor
Copy link
Collaborator

oknozor commented Feb 14, 2024

@JnsJensen are you sure vulkan is correctly installed on your system ? I don't know the specifics for NixOS.

@jens-hj
Copy link

jens-hj commented Feb 14, 2024

I am quite certain, however, I am also new to Nix. I have the following in my configuration.nix, vulkan-tools, should be the package I would need. However, I get the same error with and without that package.

environment.systemPackages = with pkgs; [
    vulkan-tools
	...
    libqalculate
    hyprpaper
    hyprland
  ];

Is there a way for me to 'check' that it is correctly installed? I don't have any other issues or programs exited with anything similar.

@oknozor
Copy link
Collaborator

oknozor commented Feb 14, 2024

Seems related to rust-windowing/winit#3244.

@jens-hj
Copy link

jens-hj commented Feb 14, 2024

Okay so, I had incorrectly assumed that nixos-rebuild switch would rebuild with the newest versions of the packages, but I understand now that I have to nix-channel --upgrade first to follow the newest updated channel. So after I did that onagre runs fine when started from the command line.

Now I am however, unable to start it with my keybinding from Hyprland, which I have set in hyprland.conf

$mainMod = SUPER
$menu = /home/<user>/.cargo/bin/onagre
bind = $mainMod, R, exec, $menu

@jens-hj
Copy link

jens-hj commented Feb 14, 2024

This led me to attempt installing onagre through nixpkgs, which with RUST_BACKTRACE=1 WINIT_UNIX_BACKEND=wayland WGPU_BACKEND=vulkan onagre results in

Fontconfig warning: line 5: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/10-hinting-slight.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/10-sub-pixel-none.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/10-yes-antialias.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/11-lcdfilter-default.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/20-unhint-small-vera.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/30-metric-aliases.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/40-nonlatin.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/45-generic.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/45-latin.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/48-spacing.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/49-sansserif.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/51-local.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/60-generic.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/60-latin.conf", line 4: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/65-nonlatin.conf", line 4: unknown element "description"
thread 'main' panicked at /build/cargo-vendor-dir/winit-0.26.1/src/platform_impl/linux/mod.rs:591:26:
Failed to initialize Wayland backend: NoWaylandLib
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: onagre::app::run
   4: onagre::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

And after removing the package again, the cargo installation goes back to same not-working state as before. I am probably doing something wrong with nix, but I am perplexed

@oknozor
Copy link
Collaborator

oknozor commented Feb 14, 2024

You should not try to install Onagre from official repositories, it's not released yet and the current upstream is way ahead of the packaged version.
That said it's pretty clear that you are missing some wayland dependencies. This is a bit weird since you are running on Hyprland, which would not work without wayland.
You probably want to ask for help on the iced discord server.

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

3 participants