hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
21.64k stars 903 forks source link

Autostarting flatpak firefox sometimes doesn't spawn windows #4896

Closed LelouBil closed 2 months ago

LelouBil commented 8 months ago

Hyprland Version

System/Version info ```sh Hyprland, built from branch HEAD at commit 84ab8d11e8951a6551d1e1bf87796a8589da6d47 (props: bump ver to 0.35.0). Date: Mon Feb 5 01:59:02 2024 Tag: v0.35.0 flags: (if any) System Information: System name: Linux Node name: Lelou-FW Release: 6.7.5-202.fsync.fc39.x86_64 Version: #1 SMP PREEMPT_DYNAMIC Thu Feb 22 16:05:38 UTC 2024 GPU information: c1:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Phoenix1 [1002:15bf] (rev c2) (prog-if 00 [VGA controller]) os-release: NAME="Fedora Linux" VERSION="39.20240224.0 (Kinoite)" ID=fedora VERSION_ID=39 VERSION_CODENAME="" PLATFORM_ID="platform:f39" PRETTY_NAME="Fedora Linux 39.20240224.0 (Bazzite)" ANSI_COLOR="0;38;2;60;110;180" LOGO=fedora-logo-icon CPE_NAME="cpe:/o:fedoraproject:fedora:39" DEFAULT_HOSTNAME="fedora" HOME_URL="https://kinoite.fedoraproject.org" DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora-kinoite/" SUPPORT_URL="https://ask.fedoraproject.org/" BUG_REPORT_URL="https://pagure.io/fedora-kde/SIG/issues" REDHAT_BUGZILLA_PRODUCT="Fedora" REDHAT_BUGZILLA_PRODUCT_VERSION=39 REDHAT_SUPPORT_PRODUCT="Fedora" REDHAT_SUPPORT_PRODUCT_VERSION=39 SUPPORT_END=2024-11-12 VARIANT="Kinoite" VARIANT_ID=kinoite OSTREE_VERSION='39.20240224.0' plugins: ```

Bug or Regression?

Bug

Description

I wanted to autostart firefox when starting Hyprland, so I added this line in my configuration

exec-once=[workspace 1 silent] flatpak run org.mozilla.firefox 2>&1 > /tmp/ff1.log

However sometimes firefox doesn't open on startup, but I can still see it when running flatpak ps or ps

hyprctl clients didn't show any firefox window.

I also tried autostarting another flatpak, Vesktop (dev.vencord.Vesktop) and it starts fine everytime

How to reproduce

Install Firefox as a flatpak, add the exec-once to Hyprland config and log out and log back in a couple of times

Crash reports, logs, images, videos

Firefox logs from a run when there wasn't any windows ``` [GFX1-]: Failed[3] to create EGL library display: FEATURE_FAILURE_NO_DISPLAY [GFX1-]: Failed[3] to create EGL library display: FEATURE_FAILURE_NO_DISPLAY [GFX1-]: Failed GL context creation for hardware WebRender: true [GFX1-]: Failed[3] to create EGL library display: FEATURE_FAILURE_NO_DISPLAY [GFX1-]: Failed[3] to create EGL library display: FEATURE_FAILURE_NO_DISPLAY [GFX1-]: Failed GL context creation for hardware WebRender: true [GFX1-]: Failed[3] to create EGL library display: FEATURE_FAILURE_NO_DISPLAY [GFX1-]: Failed[3] to create EGL library display: FEATURE_FAILURE_NO_DISPLAY [GFX1-]: Failed GL context creation for hardware WebRender: true [GFX1-]: Failed[3] to create EGL library display: FEATURE_FAILURE_NO_DISPLAY [GFX1-]: Failed[3] to create EGL library display: FEATURE_FAILURE_NO_DISPLAY [GFX1-]: Failed GL context creation for hardware WebRender: true [GFX1-]: Failed[3] to create EGL library display: FEATURE_FAILURE_NO_DISPLAY [GFX1-]: Failed[3] to create EGL library display: FEATURE_FAILURE_NO_DISPLAY [GFX1-]: Failed GL context creation for WebRender: 0 [GFX1-]: FEATURE_FAILURE_WEBRENDER_INITIALIZE_UNSPECIFIED(Create) [GFX1-]: Failed to connect WebRenderBridgeChild. isParent=true [GFX1-]: Fallback WR to SW-WR ```
LelouBil commented 8 months ago

I tried adding a bit of delay and It seems to work consistently, so Hyprland isn't ready yet to accept windows when it runs exec-once scripts ?

vaxerski commented 8 months ago

it should be, idk why this happens

guttermonk commented 6 months ago

@LelouBil how do you add a delay?

I'm having the same issue with: exec-once = [workspace 1 silent] flatpak run com.synology.SynologyDrive 2>&1

LelouBil commented 6 months ago

@guttermonk add a sleep exec-once = [workspace 1 silent]sleep 2; flatpak run com.synology.SynologyDrive 2>&1

Also for me it's starting to happen with other flatpaks too

guttermonk commented 6 months ago

I tried adding that to my hyprland.conf file, but it didn't do anything.

Then I tried changing it to: exec-once = [workspace 1 silent]sleep 2; flatpak run com.synology.SynologyDrive 2>&1 > ~/Test.log After a reboot, it did generate a log file but it was empty and the program still didn't load. Any other suggestions?

guttermonk commented 2 months ago

I ended up switching to the Synology Drive in the NUR, so not sure if this is an issue or not.