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

MuseScore 4.1.0 / 4.4.0 AppImage does not launch on Debian/bookworm under Wayland #18598

Closed
jlaine opened this issue Jul 14, 2023 · 11 comments · Fixed by #22756
Closed

MuseScore 4.1.0 / 4.4.0 AppImage does not launch on Debian/bookworm under Wayland #18598

jlaine opened this issue Jul 14, 2023 · 11 comments · Fixed by #22756
Assignees
Labels
crash Issues involving a crash of MuseScore os: linux Potentially specific to Linux-based operating systems P1 Priority: High regression MS4 Regression on a prior release Wayland Issues about using MuseScore Studio with the Wayland protocol on Linux

Comments

@jlaine
Copy link

jlaine commented Jul 14, 2023

Issue type

Crash or freeze

Bug description

Running the MuseScore-4.1.0.231921359-x86_64.AppImage binary on Debian bookworm under wayland crashes immediately. The MuseScore-4.0.2.230651545-x86_64.AppImage binary worked fine.

Steps to reproduce

Download the official AppImage and try to run it.

Screenshots/Screen recordings

No response

MuseScore Version

4.1.0

Regression

Yes, this used to work in a previous version of MuseScore 4.x

Operating system

Debian bookworm

Additional context

15:25:47.957 | INFO | main_thread | GlobalModule | onPreInit: log path: /home/XXX/.local/share/MuseScore/MuseScore4/logs/MuseScore_230714_152547.log
15:25:47.957 | INFO | main_thread | GlobalModule | onPreInit: === Started MuseScore 4.1.0, build number 231921359 ===
15:25:47.970 | WARN | main_thread | IpcSocket | connect: failed connect to server
15:25:47.970 | WARN | main_thread | IpcSocket | connect: failed connect to server
15:25:47.970 | INFO | main_thread | IpcSocket | connect: success connected to ipc server
15:25:47.970 | INFO | 139927813613248 | IpcServer | listen: id: "8e2dc1e2f2a7458598fbc6a95fce9f10"
/tmp/.mount_MuseScRs0jDw/bin/mscore4portable: symbol lookup error: /lib/x86_64-linux-gnu/libEGL_mesa.so.0: undefined symbol: wl_proxy_marshal_flags

@muse-bot muse-bot added crash Issues involving a crash of MuseScore regression MS4 Regression on a prior release labels Jul 14, 2023
@jlaine
Copy link
Author

jlaine commented Jul 14, 2023

This looks similar to https://bugreports.qt.io/browse/QTBUG-114635

AFAICT the AppImage uses a mix of vendored libraries and libraries from the host system, with a version mismatch between libraries. I am still chasing down the exact chain, but I can get MuseScore to run if I do one of the following:

  • move plugins/platforms/libqwayland-generic.so out of the way (it's probably falling back to X11 emulation)
  • use LD_PRELOAD=/lib/x86_64-linux-gnu/libwayland-client.so.0

The reason the previous release "worked" seems to be that it did not ship with the wayland platform plugin, so it immediately fell back to X11 - not ideal.

@jlaine
Copy link
Author

jlaine commented Jul 14, 2023

@shoogle looks like this is the PR that changed the behaviour: #13781

Also relevant, linuxdeployqt seems to consider wayland "not supported": probonopd/linuxdeployqt#564

@shoogle
Copy link
Contributor

shoogle commented Jul 16, 2023

The reason the previous release "worked" seems to be that it did not ship with the wayland platform plugin, so it immediately fell back to X11 - not ideal.

Correct. As I said in PR #13781, X11 is more reliable than Wayland so Qt will use X11 by default unless you opt-in by setting QT_QPA_PLATFORM=wayland.

If your distribution sets QT_QPA_PLATFORM=wayland by default then you might want to try running unset QT_QPA_PLATFORM before you run MuseScore.

Let us know if that solves it for you and then we can decide whether to always use X11 until Wayland support has improved.

@jlaine
Copy link
Author

jlaine commented Jul 21, 2023

If your distribution sets QT_QPA_PLATFORM=wayland by default then you might want to try running unset QT_QPA_PLATFORM before you run MuseScore.

Neither my distribution nor my desktop environment (KDE) set the QT_QPA_PLATFORM environment variable.

AFAICT Qt detects it is running under wayland due to the XDG_SESSION_TYPE variable being (correctly) set to wayland.

So, to fall back to X11 I now need to either clear XDG_SESSION_TYPE or explicitly set QT_QPA_PLATFORM=xcb.

Let us know if that solves it for you and then we can decide whether to always use X11 until Wayland support has improved.

Just to be clear, this is not a question of reliability or "support improving", this is a packaging error: the combination of libraries shipped with the binary is bound to fail, because you end up using an incompatible mix of system and vendored libraries!

@MJC-code
Copy link

I can confirm this bug also occurs under Debian Unstable, running the KDE desktop with Wayland. The QT_QPA_PLATFORM environment variable is not set.

It does look as if the linuxdeployqt maintainer has no desire to support Wayland, which is a shame for KDE users, since Wayland looks to be the focus of most of the ongoing developer effort in KDE.

@theofficialgman
Copy link
Contributor

This looks similar to https://bugreports.qt.io/browse/QTBUG-114635

I went through those comments and indeed this issue is likely caused by a change wayland side in 1.20+. SDL2 worked around this it seems by adding the symbols to their own binary: libsdl-org/SDL#5092
Ubuntu focal (which is what the appimage is built on) has wayland 1.18 . Not sure if that would fix the runtime error we are seeing or only their build time error.

@theofficialgman
Copy link
Contributor

theofficialgman commented Dec 8, 2023

As expected, modifying the CI to use jammy (22.04) to build the appimage on (wayland 1.20) does produce a functional native wayland build compatible with my system (ubuntu mantic 23.10 on KDE plasma wayland)

https://github.com/theofficialgman/MuseScore/actions/runs/7136789032
theofficialgman@fd9585c

I don't think that is a very suitable solution for MuseScore though as that would make the build incompatible with many older distros (ubuntu focal, debian bullseye, etc)

@bkunda bkunda removed this from MuseScore 4.2 Dec 8, 2023
@github-project-automation github-project-automation bot moved this to Issues to fix in MuseScore Studio 4.3 Dec 8, 2023
theofficialgman added a commit to theofficialgman/MuseScore that referenced this issue Dec 10, 2023
wayland platform plugins currently deployed in the CI are built on ubuntu focal and only compatible with wayland prior to 1.20. Attempting to run the appimage on modern wayland DEs results in a symbol lookup error musescore#18598 so disable for now until a workaround is implemented in a future release
@cbjeukendrup
Copy link
Contributor

@shoogle See #20391, which basically reverts #13781 for 4.2 because apparently it causes too significant other problems.

@github-project-automation github-project-automation bot moved this to To triage in MuseScore 4.2 Dec 10, 2023
@cbjeukendrup cbjeukendrup moved this from To triage to In Progress in MuseScore 4.2 Dec 10, 2023
theofficialgman added a commit to theofficialgman/MuseScore that referenced this issue Dec 11, 2023
wayland platform plugins currently deployed in the CI are built on ubuntu focal and only compatible with wayland prior to 1.20. Attempting to run the appimage on modern wayland DEs results in a symbol lookup error musescore#18598 so disable for now until a workaround is implemented in a future release

effectively a revert of musescore#13781
theofficialgman added a commit to theofficialgman/MuseScore that referenced this issue Dec 11, 2023
wayland platform plugins currently deployed in the CI are built on ubuntu focal and only compatible with wayland prior to 1.20. Attempting to run the appimage on modern wayland DEs results in a symbol lookup error and failure to run musescore#18598 so disable for now until a workaround is implemented in a future release

effectively a revert of musescore#13781
shoogle pushed a commit that referenced this issue Dec 11, 2023
wayland platform plugins currently deployed in the CI are built on ubuntu focal and only compatible with wayland prior to 1.20. Attempting to run the appimage on modern wayland DEs results in a symbol lookup error and failure to run #18598 so disable for now until a workaround is implemented in a future release

effectively a revert of #13781
@shoogle
Copy link
Contributor

shoogle commented Dec 11, 2023

modifying the CI to use jammy (22.04) [...] does produce a functional native wayland build

We can consider doing that around July 2024, after Ubuntu 24.04 LTS has been released and had a few months to stabilize. It's possible that GitHub will begin deprecating the 20.04 image around that time anyway, like they did for 18.04 (although hopefully with more warning and fewer brownouts this time).

Note that we would build against 22.04 not 24.04, but it's worth waiting for the next LTS anyway so that 20.04 users have the option to skip 22.04 and go straight to 24.04.

@cbjeukendrup cbjeukendrup moved this from In Progress to Done in MuseScore 4.2 Dec 14, 2023
@cbjeukendrup cbjeukendrup moved this from Done to In Progress in MuseScore 4.2 Dec 14, 2023
@RomanPudashkin
Copy link
Contributor

Closing, should be fixed by #20391 (in 4.2.0). Please reopen if you can still reproduce it

@github-project-automation github-project-automation bot moved this from Issues to fix to Done in MuseScore Studio 4.3 Dec 15, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in MuseScore 4.2 Dec 15, 2023
@cbjeukendrup
Copy link
Contributor

@RomanPudashkin The fix for this issue was not included in master (4.3), because we want to look for a better fix. The 4.2 fix namely reverts #13781, so brings back the problem that was fixed by that PR. For 4.3, hopefully a way can be found to fix all problems.
So therefore I will reopen this.

@cbjeukendrup cbjeukendrup reopened this Dec 15, 2023
@github-project-automation github-project-automation bot moved this from Done to To triage in MuseScore 4.2 Dec 15, 2023
@github-project-automation github-project-automation bot moved this to Issues to fix in MuseScore Studio 4.3 Dec 15, 2023
@cbjeukendrup cbjeukendrup moved this from To triage to Done in MuseScore 4.2 Dec 15, 2023
@cbjeukendrup cbjeukendrup changed the title MuseScore 4.1.0 AppImage does not launch on Debian/bookworm (under wayland) MuseScore 4.1.0 / 4.3.0 AppImage does not launch on Debian/bookworm under Wayland Dec 17, 2023
@cbjeukendrup cbjeukendrup added the os: linux Potentially specific to Linux-based operating systems label Dec 17, 2023
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this issue Dec 25, 2023
wayland platform plugins currently deployed in the CI are built on ubuntu focal and only compatible with wayland prior to 1.20. Attempting to run the appimage on modern wayland DEs results in a symbol lookup error and failure to run musescore#18598 so disable for now until a workaround is implemented in a future release

effectively a revert of musescore#13781
@cbjeukendrup cbjeukendrup changed the title MuseScore 4.1.0 / 4.3.0 AppImage does not launch on Debian/bookworm under Wayland MuseScore 4.1.0 / 4.4.0 AppImage does not launch on Debian/bookworm under Wayland Mar 14, 2024
@cbjeukendrup cbjeukendrup added the Wayland Issues about using MuseScore Studio with the Wayland protocol on Linux label Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash Issues involving a crash of MuseScore os: linux Potentially specific to Linux-based operating systems P1 Priority: High regression MS4 Regression on a prior release Wayland Issues about using MuseScore Studio with the Wayland protocol on Linux
Projects
Development

Successfully merging a pull request may close this issue.

8 participants