Skip to content

Comments

Linux: Add native Wayland support to AppImage#13781

Merged
RomanPudashkin merged 1 commit intomusescore:masterfrom
shoogle:appimage-wayland
May 10, 2023
Merged

Linux: Add native Wayland support to AppImage#13781
RomanPudashkin merged 1 commit intomusescore:masterfrom
shoogle:appimage-wayland

Conversation

@shoogle
Copy link
Contributor

@shoogle shoogle commented Oct 15, 2022

Fix #11244

To use the Wayland display protocol rather than X11, firstly you must be running Wayland as your display server. Many Linux distributions allow you to choose between Wayland and X.org/X11 at the login screen. Use this command to find out which server you are currently using:

echo $XDG_SESSION_TYPE

Secondly, when you run MuseScore, you must opt-in to Wayland support, either via an environment variable:

QT_QPA_PLATFORM=wayland ./MuseScore*.AppImage

Or via a command line option:

./MuseScore*.AppImage -platform wayland

Otherwise Qt will default to running in X11 mode via the Xwayland compatibility layer, which is more reliable than native Wayland support in some cases (particularly on older distributions).

@shoogle shoogle force-pushed the appimage-wayland branch 2 times, most recently from 86dce60 to b8dc3cd Compare October 16, 2022 12:14
@shoogle shoogle changed the title Linux: Add Wayland support to AppImage Linux: Add native Wayland support to AppImage Oct 16, 2022
@shoogle shoogle requested a review from igorkorsukov October 16, 2022 12:20
@shoogle shoogle marked this pull request as ready for review October 17, 2022 10:20
theofficialgman added a commit to theofficialgman/MuseScore that referenced this pull request Jan 18, 2023
will be included automatically in the appimage when musescore#13781 is merged
theofficialgman added a commit to theofficialgman/MuseScore that referenced this pull request Jan 19, 2023
will be included automatically in the appimage when musescore#13781 is merged
theofficialgman added a commit to theofficialgman/MuseScore that referenced this pull request Jan 19, 2023
will be included automatically in the appimage when musescore#13781 is merged
@AntonioBL
Copy link
Contributor

AntonioBL commented Jan 19, 2023

Ciao,
I tested a personal build of this PR over yesterday's master in a virtual machine with Fedora 37 (default wayland), after exporting QT_QPA_PLATFORM=wayland
Everything seems to work, but I found that it crashes after opening the Open file dialog and clicking "cancel".
The crash happens here:

if (m_stack[i].window->isWidgetType()) {

Should we check that m_stack[i].window is not 0 before accessing it?
(so basically perform this check: if (m_stack[i].window && m_stack[i].window->isWidgetType()) { )
I tested this and it avoids the crash, but I don't know if the problem should or could be tackled before reaching this point.

theofficialgman added a commit to theofficialgman/MuseScore that referenced this pull request Jan 21, 2023
will be included automatically in the appimage when musescore#13781 is merged
igorkorsukov pushed a commit that referenced this pull request Jan 23, 2023
will be included automatically in the appimage when #13781 is merged
theofficialgman added a commit to theofficialgman/MuseScore that referenced this pull request Jan 26, 2023
will be included automatically in the appimage when musescore#13781 is merged
theofficialgman added a commit to theofficialgman/MuseScore that referenced this pull request Jan 26, 2023
will be included automatically in the appimage when musescore#13781 is merged
octopols pushed a commit to octopols/MuseScore that referenced this pull request Jan 31, 2023
will be included automatically in the appimage when musescore#13781 is merged
theofficialgman added a commit to theofficialgman/MuseScore that referenced this pull request Mar 14, 2023
will be included automatically in the appimage when musescore#13781 is merged
Fix musescore#11244

To use the Wayland display protocol rather than X11, firstly you must
be running Wayland as your display server. Many Linux distributions
allow you to choose between Wayland and X.org/X11 at the login screen.
Use this command to find out which server you are currently using:

    echo $XDG_SESSION_TYPE

Secondly, when you run MuseScore, you must opt-in to Wayland support,
either via an environment variable:

    QT_QPA_PLATFORM=wayland ./MuseScore*.AppImage

Or via a command line option:

    ./MuseScore*.AppImage -platform wayland

Otherwise Qt will default to running in X11 mode via the Xwayland
compatibility layer, which is more reliable than native Wayland
support in some cases (particularly on older distributions).
@shoogle shoogle force-pushed the appimage-wayland branch from b8dc3cd to 777fe74 Compare May 10, 2023 12:28
@RomanPudashkin RomanPudashkin merged commit 4eeed9c into musescore:master May 10, 2023

# Semicolon-separated list of needed .so files in Qt's platform/plugins
# directory for linuxdeploy-plugin-qt to scan and deploy.
export EXTRA_PLATFORM_PLUGINS="libqwayland-egl.so;libqwayland-generic.so"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change conflicts with a recent change a few lines above this: see line 107

export EXTRA_PLATFORM_PLUGINS=libqoffscreen.so

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, sorry! I didn't notice. I'll fix that now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in #17526

@shoogle shoogle deleted the appimage-wayland branch May 10, 2023 17:11
theofficialgman added a commit to theofficialgman/MuseScore that referenced this pull request 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 pull request 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 pull request 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
Jojo-Schmitz pushed a commit to Jojo-Schmitz/MuseScore that referenced this pull request 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fails to open when running native wayland

5 participants