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 arch linux, with a fresh install. #72

Open
neevparikh opened this issue Dec 22, 2023 · 5 comments
Open

Can't start onagre on arch linux, with a fresh install. #72

neevparikh opened this issue Dec 22, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@neevparikh
Copy link

Describe the bug
A clear and concise description of what the bug is.

Just running onagre won't do anything. It shows a blank window with no options and won't accept text or respond to keyboard signals.
image

Running it with either the vulkan or gl backend, it briefly allows for some text and then hangs up again. Both backends do the same thing.

image

Running it with backtrace does nothing. Running with debug doesn't seem to reveal anything important. but I've included them here for posteritiy.

image

onagre_debug.log

Config
If relevant, provide a copy of your onagre config/theme.

Just using default nord theme. same thing happens with no theme.

To Reproduce
Steps to reproduce the behavior:

Run onagre.

Expected behavior
A clear and concise description of what you expected to happen.

Accepts input

Screenshots
If applicable, add screenshots to help explain your problem.
see above

Window manager (please complete the following information):

  • Window manager: swaywm

Additional context
Add any other context about the problem here.

@neevparikh neevparikh added the bug Something isn't working label Dec 22, 2023
@Jaakkonen
Copy link

Also happens on my machine. Did a fresh debug build from latest git and ran with rust-gdb. The issue didn't manifestate when using Intel GPU but reliably happened on Nvidia GPU.

>> WORKS
$ VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/intel_icd.x86_64.json \
  target/debug/onagre
>> Fails, see stacktrace below
$ WGPU_BACKEND=vulkan \
  VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json \
  rust-gdb target/debug/onagre
Nvidia Stacktrace on hang
#0  0x00007ffff7c0cf6f in __GI___poll (fds=0x55555bb9ae20, nfds=1, timeout=10) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fff85336d83 in ?? () from /usr/lib/libnvidia-glcore.so.545.29.06
#2  0x00007fff857194c9 in ?? () from /usr/lib/libnvidia-glcore.so.545.29.06
#3  0x00007fff85732cc0 in ?? () from /usr/lib/libnvidia-glcore.so.545.29.06
#4  0x00007fff8564b96e in ?? () from /usr/lib/libnvidia-glcore.so.545.29.06
#5  0x00007fff7c5c8694 in DispatchWaitForFences (device=0x55555b3656f0, fenceCount=1, pFences=0x7ffffffecc20, waitAll=1, timeout=18446744073709551615)
    at /usr/src/debug/vulkan-validation-layers/Vulkan-ValidationLayers-vulkan-sdk-1.3.268.0/layers/vulkan/generated/layer_chassis_dispatch.cpp:809
#6  0x00007fff7c4ab9c3 in vulkan_layer_chassis::WaitForFences (device=0x55555b3656f0, fenceCount=1, pFences=0x7ffffffecc20, waitAll=1, timeout=18446744073709551615)
    at /usr/src/debug/vulkan-validation-layers/Vulkan-ValidationLayers-vulkan-sdk-1.3.268.0/layers/vulkan/generated/chassis.cpp:1728
#7  0x00005555564eefa4 in ash::device::Device::wait_for_fences (self=0x55555b345540, fences=&[ash::vk::definitions::Fence](size=1) = {...}, wait_all=true, timeout=18446744073709551615)
    at /home/jaakko/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/ash-0.37.3+1.3.251/src/device.rs:2399
#8  0x000055555656d06d in wgpu_hal::vulkan::instance::{impl#5}::acquire_texture (self=0x55555b31bad8, timeout=...) at src/vulkan/instance.rs:783
#9  0x00005555562d4d23 in wgpu_core::hub::Global<wgpu_core::hub::IdentityManagerFactory>::surface_get_current_texture<wgpu_core::hub::IdentityManagerFactory, wgpu_hal::vulkan::Api> (
    self=0x55555b319ea0, surface_id=..., texture_id_in=()) at /home/jaakko/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-core-0.15.1/src/present.rs:141
#10 0x0000555556388f36 in wgpu::backend::direct::{impl#7}::surface_get_current_texture (self=0x55555b319ea0, surface=0x7ffffffee5f8, surface_data=0x55555b935e20) at src/backend/direct.rs:763
#11 0x00005555563a2168 in wgpu::context::{impl#5}::surface_get_current_texture<wgpu::backend::direct::Context> (self=0x55555b319ea0, surface=0x55555b99a9f0, surface_data=...)
    at src/context.rs:2069
#12 0x00005555560e958d in wgpu::Surface::get_current_texture (self=0x55555b99a9d0) at src/lib.rs:4136
#13 0x0000555555a2c48b in iced_wgpu::window::compositor::{impl#1}::present<iced_style::theme::Theme, alloc::string::String> (self=0x55555b999450, renderer=0x55555b999578, surface=0x55555b99a9d0, 
    viewport=0x55555b997d80, background_color=<error reading variable: Cannot access memory at address 0x0>, overlay=&[alloc::string::String](size=0))
    at /home/jaakko/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/iced_wgpu-0.10.0/src/window/compositor.rs:205
#14 0x000055555586e77f in iced_winit::application::run_instance::{async_fn#0}<iced::application::Instance<onagre::app::Onagre>, tokio::runtime::runtime::Runtime, iced_wgpu::window::compositor::Compositor<iced_style::theme::Theme>> () at /home/jaakko/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/iced_winit-0.9.1/src/application.rs:525
#15 0x0000555555870977 in iced_winit::application::run::{closure#1}<iced::application::Instance<onagre::app::Onagre>, tokio::runtime::runtime::Runtime, iced_wgpu::window::compositor::Compositor<iced_style::theme::Theme>> (event=..., control_flow=0x7fffffff07e8) at /home/jaakko/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/iced_winit-0.9.1/src/application.rs:251
#16 0x000055555584d1f7 in winit::platform_impl::platform::sticky_exit_callback<onagre::app::Message, iced_winit::application::run::{closure_env#1}<iced::application::Instance<onagre::app::Onagre>, tokio::runtime::runtime::Runtime, iced_wgpu::window::compositor::Compositor<iced_style::theme::Theme>>> (evt=..., target=0x555557f93bd8, control_flow=0x7fffffff07e8, callback=0x7fffffffd080)
    at /home/jaakko/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.27.5/src/platform_impl/linux/mod.rs:849
#17 0x00005555557e97c7 in winit::platform_impl::platform::wayland::event_loop::EventLoop<onagre::app::Message>::run_return<onagre::app::Message, iced_winit::application::run::{closure_env#1}<iced::application::Instance<onagre::app::Onagre>, tokio::runtime::runtime::Runtime, iced_wgpu::window::compositor::Compositor<iced_style::theme::Theme>>> (self=0x555557f93bc0, callback=...)
    at /home/jaakko/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.27.5/src/platform_impl/linux/wayland/event_loop/mod.rs:529
#18 0x000055555584c637 in winit::platform_impl::platform::EventLoop<onagre::app::Message>::run_return<onagre::app::Message, iced_winit::application::run::{closure_env#1}<iced::application::Instance<onagre::app::Onagre>, tokio::runtime::runtime::Runtime, iced_wgpu::window::compositor::Compositor<iced_style::theme::Theme>>> (self=0x7fffffffcdf8, callback=...)
    at /home/jaakko/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.27.5/src/platform_impl/linux/mod.rs:748
#19 0x00005555557d3cca in winit::platform::run_return::{impl#0}::run_return<onagre::app::Message, iced_winit::application::run::{closure_env#1}<iced::application::Instance<onagre::app::Onagre>, tokio::runtime::runtime::Runtime, iced_wgpu::window::compositor::Compositor<iced_style::theme::Theme>>> (self=0x7fffffffcdf8, 
    event_handler=<error reading variable: Cannot access memory at address 0x11>)
    at /home/jaakko/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.27.5/src/platform/run_return.rs:62
#20 0x00005555559e2c6d in iced_winit::application::platform::run<onagre::app::Message, iced_winit::application::run::{closure_env#1}<iced::application::Instance<onagre::app::Onagre>, tokio::runtime::runtime::Runtime, iced_wgpu::window::compositor::Compositor<iced_style::theme::Theme>>> (event_loop=..., event_handler=...)
    at /home/jaakko/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/iced_winit-0.9.1/src/application.rs:870
#21 0x0000555555870225 in iced_winit::application::run<iced::application::Instance<onagre::app::Onagre>, tokio::runtime::runtime::Runtime, iced_wgpu::window::compositor::Compositor<iced_style::theme::Theme>> (settings=..., compositor_settings=...) at /home/jaakko/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/iced_winit-0.9.1/src/application.rs:226
#22 0x00005555559d87c8 in iced::application::Application::run<onagre::app::Onagre> (settings=...)
    at /home/jaakko/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/iced-0.9.0/src/application.rs:209
#23 0x0000555555860f7d in onagre::app::run () at src/app/mod.rs:48
#24 0x00005555557fa8af in onagre::main () at src/main.rs:54

And with a release build
VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json rust-gdb target/release/onagre

#0  0x00007ffff7c69f6f in __GI___poll (fds=0x555558551430, 
    nfds=1, timeout=10) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fff853ffd83 in ?? ()
   from /usr/lib/libnvidia-glcore.so.545.29.06
#2  0x00007fff857e24c9 in ?? ()
   from /usr/lib/libnvidia-glcore.so.545.29.06
#3  0x00007fff857fbcc0 in ?? ()
   from /usr/lib/libnvidia-glcore.so.545.29.06
#4  0x00007fff8571496e in ?? ()
   from /usr/lib/libnvidia-glcore.so.545.29.06
#5  0x0000555555e07824 in <T as wgpu::context::DynContext>::surface_get_current_texture::hb96e01549eaaa379 ()
#6  0x000055555565cdcb in iced_winit::application::run_instance::{{closure}}::h2002aab6e0aa094a ()
#7  0x00005555556751ce in iced_winit::application::run::{{closure}}::h78b5fcea3b07a440 ()
#8  0x000055555566f19c in iced_winit::application::run::h84847475da4a65c1 ()
#9  0x000055555576c0c8 in onagre::main::h4639f644572ad6de ()
#10 0x00005555556a7613 in std::sys_common::backtrace::__rust_begin_short_backtrace::h45f78273e70934af ()
#11 0x00005555556a80ea in std::rt::lang_start::h7b2de4ecb1532c87
    ()
#12 0x00007ffff7b8ecd0 in __libc_start_call_main (
    main=main@entry=0x555555771ba0 <main>, argc=argc@entry=1, 
    argv=argv@entry=0x7fffffffdb88)
    at ../sysdeps/nptl/libc_start_call_main.h:58
#13 0x00007ffff7b8ed8a in __libc_start_main_impl (
    main=0x555555771ba0 <main>, argc=1, argv=0x7fffffffdb88, 
    init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7fffffffdb78)
    at ../csu/libc-start.c:360
#14 0x00005555556524c5 in _start ()

A similar hang in DispatchWaitForFences on Nvidia GPUs in other code is mentioned on an Ogre3d forum thread to which a buffer clear fix is suggested. Presumably the fix needs to be done in WGPU or Iced afaik.

@Jaakkonen
Copy link

In my case WGPU defaults to using Nvidia and Vulkan by default. Have you tried running it with WGPU_BACKEND=gl onagre? Or if you have an integrated graphics chip forcing Vulkan to use it instead of Nvidia graphics card?

@neevparikh
Copy link
Author

neevparikh commented Dec 24, 2023 via email

@oknozor
Copy link
Collaborator

oknozor commented Jan 27, 2024

Hey can you try with the latest version (cargo install --git https://github.com/onagre-launcher/onagre).
I think we are close to a stable release and I'd like to confirm this is fixed.

@markstos
Copy link

I just tried launching it with Arch Linux and Sway and it opened.

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

4 participants