Tag: X11

  • Fedora 44 and Firefox 154 crashing: “the specified toplevel id is already used”

    It does not happen often but today after rebooting Fedora Kinoite since the previous OS update Firefox crashed and would no longer load. This is a big issue since we all rely on the browser for everything plus the fact that my session includes tons of open windows and tabs which I would rather not lose.

    Luckily I already had a Flatpak version of Firefox installed from previously which I rarely use. It was installed for some codec issues with Ubiquiti Unifi Protect as well as for certain Youtube videos. This version does not contain all my user profile data or session but at least I could start digging around.

    A couple of weeks ago the Firefox Fedora package maintainer enabled KDE’s session restore feature (not the same as Firefox’s own session restore). However this broke the compatibility with Wayland crashing with “the specified toplevel id is already used“. To be fair I am not too much into the inner workings of XDG, so I tried to just get a work-around.

    The obvious one of starting in X11 actually worked. It launched Firefox and even restored my session. But it was utterly laggy compared to the smoothness of Wayland. If you want to try simply run this in the console:

    MOZ_ENABLE_WAYLAND=0 firefox

    Fortunately I am not the only user affected so there were a few bugs about the issue of which #2059617 has become the principal. Comment 10 mentioned the option to disable the Wayland session and it worked flawlessly. Find your Firefox profile in your home directory (e.g. $HOME/.mozilla/firefox/xxxxx.default-release) and add this line to the end of prefs.js:

    user_pref("widget.wayland.session-management.enabled", false);

    Now restart Firefox and all should be back to normal, Wayland working and your browser session restored.

    I left a comment in the same bug in case anyone needs to get up and running quickly. Hopefully a fix will be out soon so people that are not aware of these work-arounds can launch Firefox again.

  • Running Android Studio Flatpak in Wayland

    Wayland has been tested in Android Studio for quite some time. Despite officially not being stable yet it works very well and removed the mouse stuttering or lag I personally was experiencing on XWayland (X11).

    I created an issue and added a PR to the Android Studio Flatpak repository, however I had to close it as Wayland is not considered stable yet.

    Instead I added some instructions to the documentation on how to use Wayland instead of running Android Studio in XWayland (X11).

    By simply enabling the Wayland permission in the Flatpak advanced settings for Android Studio it will work on next launch. The same can also be achieved in the console:

    $ flatpak override --user --socket=wayland com.google.AndroidStudio

    Please note that the AVD Emulator will still continue to run on XWayland (X11) as it does not yet include Wayland Qt libraries so do not remove the default X11 permission just yet.

    Once launched you can go to Help > About and click the blue “Copy and Close” button. When pasted into the text editor you will see near the top either of these two lines:

    Toolkit: sun.awt.wl.WLToolkit (Wayland)

    Toolkit: sun.awt.X11.XToolkit (X11)