Skip to content

AppImage Wayland support #3110

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

Closed
nicheosala opened this issue Jan 3, 2025 · 15 comments · Fixed by #3117
Closed

AppImage Wayland support #3110

nicheosala opened this issue Jan 3, 2025 · 15 comments · Fixed by #3117
Labels
feature New feature proposal or a request; much more work than "ehancement"

Comments

@nicheosala
Copy link

Please add Wayland support to the AppImage. I use BitBoxApp on Arch Linux and I couldn't find any way to run the application via Wayland. Failed attempt:

  1.  QT_QPA_PLATFORM=wayland ./BitBox-4.46.2-x86_64.AppImage

    Results in:

    qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
    

I should point out that I have already installed qt5-wayland and qt6-wayland.
All other applications installed on my computer work fine with Wayland, except BitBox App.

I am available for any clarification. Thanks for your work.

@benma benma added the feature New feature proposal or a request; much more work than "ehancement" label Jan 3, 2025
@benma
Copy link
Contributor

benma commented Jan 7, 2025

As an experiment, please try to extract the files first:

./BitBox-4.46.2-x86_64.AppImage --appimage-extract

This will extract the app files to ./squashfs-root.

Then download and unzip the following file:
libqwayland-generic.so.gz (you can also get it from an official Qt 6.2.4 installation directory)

And move it to ./squashfs-root/plugins/platforms/libqwayland-generic.so

Then try again

QT_QPA_PLATFORM=wayland ./squashfs-root/BitBox`

Does that work? If so, we can start bundling the wayland platform lib in the future so it will automatically work, also inside the normal AppImage.

@benma
Copy link
Contributor

benma commented Jan 7, 2025

@nicheosala nevermind, the above will not work because some more libs are missing and libraries are not linked properly.

Related: probonopd/linuxdeployqt#189

Does the app run via X11 on your system? If so, what's the downside so that you want to run it via Wayland?

@nicheosala
Copy link
Author

Yes, the app works using X11, however it appears blurred. If you zoom in on this screenshot, I hope you can see the difference in resolution between the top bar and the rest of the screen.

Screenshot_20250107_171247

@benma
Copy link
Contributor

benma commented Jan 7, 2025

Do you know the cause for this? Some googling turned up fractional scaling:

https://www.reddit.com/r/gnome/comments/x1qbd2/has_anyone_solved_blurry_xwayland_apps_with/

Not that I am against wayland support in the app, but maybe you can more quickly solve the problem by tweaking settings etc.

@nicheosala
Copy link
Author

I have tried many of the environment variables listed online (QT_SCALE_FACTOR=1 bitbox, QT_AUTO_SCREEN_SCALE_FACTOR=1 bitbox, PLASMA_USE_QT_SCALING=1 bitbox, QT_ENABLE_HIGHDPI_SCALING=1 bitbox), with no luck: nothing changes.

@thisconnect
Copy link
Collaborator

People using Chromium/Electron have the same issue under Wayland.

Maybe "enabling the experimental fractional scaling feature in Gnome" is worth a shot?

gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']

https://www.reddit.com/r/Fedora/comments/15tu5o3/solution_to_blurry_wayland_applications/

@nicheosala
Copy link
Author

I should specify that I am using Arch Linux with KDE Plasma.

In fact, when I run the above gsettings command, I get the error message:

No such schema “org.gnome.mutter"

@benma
Copy link
Contributor

benma commented Jan 8, 2025

@nicheosala could you try this build?

https://drive.google.com/file/d/1ShEmcIBpPA7UTkNAW-JIPPFBKch7tp4_/view?usp=sharing

It is built from this PR: #3117

@nicheosala
Copy link
Author

That's the result:

➜  Downloads ./BitBoxApp-wayland.AppImage
Loading log config from '~/.config/bitbox/logging.json'.
Logging into '~/.config/bitbox/log.txt' from 'debug'.
qt.qpa.wayland: Failed to load client buffer integration: "wayland-egl"
qt.qpa.wayland: Available client buffer integrations: QList()
Sandboxing disabled by user.
qt.webenginecontext: 

GLImplementation: 
Surface Type: DefaultRenderableType
Surface Profile: NoProfile
Surface Version: 2.0
Using Default SG Backend: no
Using Software Dynamic GL: no
Using Angle: no

Init Parameters:
  *  application-name BitBoxApp 
  *  blink-settings preferredColorScheme=1 
  *  browser-subprocess-path /tmp/.mount_BitBoxKYXS8j/libexec/QtWebEngineProcess 
  *  disable-features DnsOverHttpsUpgrade,ConsolidatedMovementXY,InstalledApp,BackgroundFetch,WebOTP,WebPayments,WebUSB,PictureInPicture 
  *  disable-gpu  
  *  disable-speech-api  
  *  enable-features NetworkServiceInProcess,TracingServiceInProcess 
  *  enable-threaded-compositing  
  *  no-sandbox  

qt.qpa.wayland: No shell integration named "xdg-shell" found
qt.qpa.wayland: No shell integration named "wl-shell" found
qt.qpa.wayland: No shell integration named "ivi-shell" found
qt.qpa.wayland: Loading shell integration failed.
qt.qpa.wayland: Attempted to load the following shells QList("xdg-shell", "wl-shell", "ivi-shell")

The BitBoxApp process is running, but no GUI is opened.

@benma
Copy link
Contributor

benma commented Jan 8, 2025

@nicheosala did you set wayland explictly like QT_QPA_PLATFORM=wayland ./BitBoxApp-wayland.AppImage? If not please try.

Edit: it seems there are more libs missing that need to be bundled. Without support from linuxdeployqt, this is a bit annoying but should be doable.

@benma
Copy link
Contributor

benma commented Jan 8, 2025

@nicheosala
Copy link
Author

Way better. The application starts correctly in a Wayland session:

➜  Downloads QT_QPA_PLATFORM=wayland ./BitBoxApp-wayland-attempt2.AppImage
Loading log config from '~/.config/bitbox/logging.json'.
Logging into '~/.config/bitbox/log.txt' from 'debug'.
qt.qpa.wayland: EGL not available
Sandboxing disabled by user.
qt.webenginecontext: 

GLImplementation: 
Surface Type: DefaultRenderableType
Surface Profile: NoProfile
Surface Version: 2.0
Using Default SG Backend: no
Using Software Dynamic GL: no
Using Angle: no

Init Parameters:
  *  application-name BitBoxApp 
  *  blink-settings preferredColorScheme=1 
  *  browser-subprocess-path /tmp/.mount_BitBoxz28xv5/libexec/QtWebEngineProcess 
  *  disable-features DnsOverHttpsUpgrade,ConsolidatedMovementXY,InstalledApp,BackgroundFetch,WebOTP,WebPayments,WebUSB,PictureInPicture 
  *  disable-gpu  
  *  disable-speech-api  
  *  enable-features NetworkServiceInProcess,TracingServiceInProcess 
  *  enable-threaded-compositing  
  *  no-sandbox

Two - small! - problems I noticed:

  • the message qt.qpa.wayland: EGL not available (whatever that means)
  • the BitBox logo is not shown at the top left:
    Screenshot_20250109_090654

I should mention that everything works also not prepending QT_QPA_PLATFORM=wayland.

@benma
Copy link
Contributor

benma commented Jan 9, 2025

the BitBox logo is not shown at the top left:

That was one of the reasons why the linuxdeployqt maintainer refuses to support wayland 😓

probonopd/linuxdeployqt#189 (comment)

@nicheosala
Copy link
Author

I reopened BitBoxApp to better analyze the new situation. I noticed that the cursor is wrong.

When you position yourself on the top bar, the correct cursor appears; as soon as you move on the BitBoxApp GUI, a different cursor appears. I can't take a screenshot that shows this cursor 😅

@nicheosala
Copy link
Author

I reopened BitBoxApp to better analyze the new situation. I noticed that the cursor is wrong.

When you position yourself on the top bar, the correct cursor appears; as soon as you move on the BitBoxApp GUI, a different cursor appears. I can't take a screenshot that shows this cursor 😅

I managed to solve this explicitly pointing out the theme and the size of the curosr:

XCURSOR_THEME=breeze_cursors XCURSOR_SIZE=24 ./BitBoxApp-wayland-attempt2.AppImage

However, it feels wrong: I never had to do it with other applications...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature proposal or a request; much more work than "ehancement"
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants