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

Wayland support? #56

Open
jr1991-g opened this issue Feb 15, 2024 · 3 comments
Open

Wayland support? #56

jr1991-g opened this issue Feb 15, 2024 · 3 comments

Comments

@jr1991-g
Copy link

Hey. Been using this since it was released. Enabling Wayland socket on Flatseal and running the application with flatpak run io.github.mimbrero.WhatsAppDesktop --enable-features=UseOzonePlatform --ozone-platform=wayland makes it run on Wayland fine, except for these two noticeable bugs.

  1. No window decoration (might be gnome known CSD policy, don't if KDE handles this better) and naturally no resizing.
  2. Minimizing and restoring from tray completely crash the application. This is what the console says.
flatpak run io.github.mimbrero.WhatsAppDesktop --enable-features=UseOzonePlatform --ozone-platform=wayland
[3:0215/155108.936036:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No existe el fichero o el directorio
[3:0215/155108.936222:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No existe el fichero o el directorio
[50:0215/155109.057605:ERROR:gpu_init.cc(521)] Passthrough is not supported, GL is egl, ANGLE is 
[3:0215/155340.010884:ERROR:wayland_event_watcher.cc(36)] libwayland: wl_surface@32: error 0: gtk_shell::get_gtk_surface already requested
/app/bin/whatsapp-desktop-linux: línea 3:     3 `trap' para punto de parada/seguimiento (`core' generado) zypak-wrapper.sh /app/whatsapp-desktop-linux/whatsapp-desktop-linux "$@"

Now that Wayland is getting to be the default session in prominent distros and DE, it could be a good idea to patch this application to fully support Wayland. Is it possible to do this? Would it require a new electron version? I apologize if I sound unpolite or demanding, my english is a bit rough.

Thanks

@mirenradia
Copy link

FWIW, I don't have either bug on KDE Plasma 5.27.10 when running under Wayland (using the same flags and enabling the Wayland socket using Flatseal).

@azvyae
Copy link

azvyae commented Apr 6, 2024

Running on wayland works, but it crashes after i hid the app then tried to show the app through the appindicator.

Edit: After some troubleshootings, I found out that the crash happened because of duplicate request? Of the GTK window, i'm not really sure:

/usr/bin/flatpak run --branch=stable --socket=wayland --arch=x86_64 --command=whatsapp-desktop-linux io.github.mimbrero.WhatsAppDesktop --enable-features=UseOzonePlatform,WaylandWindowDecorations,WebRTCPipeWireCapturer --ozone-platform-hint=auto --use-tray-icon
[3:0406/234201.343462:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: Tidak ada berkas atau direktori seperti itu
[3:0406/234201.343499:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: Tidak ada berkas atau direktori seperti itu
[45:0406/234201.370523:ERROR:gpu_init.cc(521)] Passthrough is not supported, GL is egl, ANGLE is 
[3:0406/234211.760259:ERROR:wayland_event_watcher.cc(36)] libwayland: wl_surface@35: error 0: gtk_shell::get_gtk_surface already requested

/app/bin/whatsapp-desktop-linux: baris 3:     3 Jejak/titik-putus jebakan (core didump) zypak-wrapper.sh /app/whatsapp-desktop-linux/whatsapp-desktop-linux "$@

The core problem exist because of get_gtk_surface function.

Solution:

Nevermind, i just updated the electron version to the minimum version of 23, and the problem is vanished, and also fully supported for wayland (in terms of using proper window decoration)

@nickk19
Copy link

nickk19 commented Sep 3, 2024

Same issue with Fedora 40:

flatpak run --socket=wayland io.github.mimbrero.WhatsAppDesktop --enable-features=UseOzonePlatform,WaylandWindowDecorations
[3:0903/180417.215934:ERROR:ozone_platform_x11.cc(240)] Missing X server or $DISPLAY
[3:0903/180417.215993:ERROR:env.cc(255)] The platform failed to initialize.  Exiting.
/app/bin/whatsapp-desktop-linux: line 3:     3 Segmentation fault      (core dumped) zypak-wrapper.sh /app/whatsapp-desktop-linux/whatsapp-desktop-linux "$@"

I had to specifically allow Wayland on Flatseal, otherwise it'd still run on XWayland, as xlsclients reports:

xlsclients 
orion  gsd-xsettings
orion  ibus-x11
orion  whatsapp-desktop-linux
orion  mutter-x11-frames

Fedora doesn't have Electron on the repositories, so I think it just uses the version bundled with the app itself.

EDIT: Improved code block formatting.

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

No branches or pull requests

4 participants