Skip to content

Failed to start as fullscreen on wayland #19215

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

Open
dearfl opened this issue May 15, 2025 · 0 comments
Open

Failed to start as fullscreen on wayland #19215

dearfl opened this issue May 15, 2025 · 0 comments
Labels
A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior O-Linux Specific to the Linux desktop operating system

Comments

@dearfl
Copy link

dearfl commented May 15, 2025

Bevy version

0.16.0

[Optional] Relevant system information

NixOS pure wayland setup.

SystemInfo { os: "Linux (NixOS 25.05)", kernel: "6.12.24", cpu: "Intel(R) Core(TM) i7-10710U CPU @ 1.10GHz", core_count: "6", memory: "15.3 GiB" }
AdapterInfo { name: "Intel(R) UHD Graphics (CML GT2)", vendor: 32902, device: 39882, device_type: IntegratedGpu, driver: "Intel open-source Mesa driver", driver_info: "Mesa 25.0.4", backend: Vulkan }

What you did

https://github.com/dearfl/bevy-tests/blob/7dcd8247bef8dd0773f9b57fb42c213d0eb6dc0f/src/bin/fullscreen-test.rs

ran with cargo r -r --bin fullscreen-test

What went wrong

the program panicked with the following output:

2025-05-15T18:05:45.838238Z  INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Linux (NixOS 25.05)", kernel: "6.12.26", cpu: "Intel(R) Core(TM) i7-10710U CPU @ 1.10GHz", core_count: "6", memory: "15.3 GiB" }
2025-05-15T18:05:45.870514Z  INFO bevy_render::renderer: AdapterInfo { name: "Intel(R) UHD Graphics (CML GT2)", vendor: 32902, device: 39882, device_type: IntegratedGpu, driver: "Intel open-source Mesa driver", driver_info: "Mesa 25.0.5", backend: Vulkan }
2025-05-15T18:05:45.946478Z  INFO gilrs_core::platform::platform::gamepad: Gamepad /dev/input/event17 (IFKB IFKB 2.4G REC (STM) System Control) connected.
2025-05-15T18:05:45.959831Z  INFO bevy_render::batching::gpu_preprocessing: GPU preprocessing is fully supported on this device.
2025-05-15T18:05:45.983393Z  INFO bevy_winit::system: Creating new window App (0v1)

thread 'main' panicked at /home/flr/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bevy_winit-0.16.0/src/winit_windows.rs:79:22:
Unable to get monitor.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Additional information

The program is simple empty app as follow:

App::new()
        .add_plugins(DefaultPlugins.set(WindowPlugin {
            primary_window: Some(Window {
                mode: WindowMode::Fullscreen(
                    // this won't work, panics
                    MonitorSelection::Primary,
                    // this won't work either, panics
                    // MonitorSelection::Current,
                    // this works, though fullscreen is ignored on wayland
                    // MonitorSelection::Index(0),

                    VideoModeSelection::Current,
                ),
                ..Default::default()
            }),
            ..Default::default()
        }))
        .run();

checking related code at

let maybe_selected_monitor = &match window.mode {
WindowMode::BorderlessFullscreen(monitor_selection)
| WindowMode::Fullscreen(monitor_selection, _) => select_monitor(
monitors,
event_loop.primary_monitor(),
None,
&monitor_selection,
),
WindowMode::Windowed => None,
};

I understand why MonitorSelection::Current won't work(hardcoded as None), but I don't know why MonitorSelection::Primary won't work either.

@dearfl dearfl added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels May 15, 2025
@janhohenheim janhohenheim added A-Windowing Platform-agnostic interface layer to run your app in O-Linux Specific to the Linux desktop operating system and removed S-Needs-Triage This issue needs to be labelled labels May 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior O-Linux Specific to the Linux desktop operating system
Projects
None yet
Development

No branches or pull requests

2 participants