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

On Wayland Decoration is missing #5869

Closed
2 tasks done
BirdInFire opened this issue Apr 8, 2022 · 30 comments
Closed
2 tasks done

On Wayland Decoration is missing #5869

BirdInFire opened this issue Apr 8, 2022 · 30 comments

Comments

@BirdInFire
Copy link

Bug Description

when i open with wayland it seem to have the decoration missing (nvidia and intel)

Steps to Reproduce

  1. open terminal
  2. open it with these --enable-features=UseOzonePlatform --ozone-platform=wayland --use-gl=desktop
  3. or these --enable-features=UseOzonePlatform --ozone-platform=wayland

Actual Result:

The app open but no top bar to drag and drop it

Expected Result:

have a way to drag it

Platform Info

Signal Version: 5.38.0

Operating System: Linux

Link to Debug Log

[2:0408/163419.093013:ERROR:cursor_loader.cc(116)] Failed to load a platform cursor of type kNull
(node:92) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use exe --trace-deprecation ... to show where the warning was created)

Additional content

Seem a bug from electron but maintaining this open can help to track a known bug.

@pm4rcin
Copy link

pm4rcin commented Apr 8, 2022

Try instructions from here. Also you don't have to pass --enable-features=UseOzonePlatform since it's default.

@BirdInFire
Copy link
Author

Try instructions from here. Also you don't have to pass --enable-features=UseOzonePlatform since it's default.

thanks, but for some reason the interface crash (closed) when try to resize it (better than nothing thanks). will check into the thread to see if an issue is already open for these GUI "crash".

@satmandu
Copy link

satmandu commented Jul 8, 2022

I'm still seeing this issue of missing Wayland Decorations with Gnome and 5.49.0.

--enable-features=UseOzonePlatform,WaylandWindowDecorations
--ozone-platform=wayland

Does not fix the issue, and putting that inside ~/.config/electron-flags.conf doesn't get it picked up either automatically.

@BirdInFire BirdInFire reopened this Jul 8, 2022
@scottnonnenberg-signal
Copy link
Contributor

@satmandu
Copy link

satmandu commented Aug 11, 2022

Looks like these flags are needed for window decorations to work on Wayland on Gnome:

--no-sandbox --enable-crashpad --ozone-platform-hint --ozone-platform=wayland  --enable-features=WaylandWindowDecorations

However that is broken currently (in both the stable and beta Signl builds) due to this electron bug: electron/electron#34820

That is fixed in electron/electron#34955 and backported to the electron:19.x.y branch in electron/electron#35207

Any chance of getting a Signal build based on the electron:19.x.y branch? Electron 19.0.12 looks like it should have that fix.

Otherwise Signal on Wayland is currently blurry:

Screenshot from 2022-08-11 15-10-28

It is crisp (and with a working titlebar I can use to drag the window around) though broken (the menus don't work) with the aforementined command line flags:

image

@satmandu
Copy link

@scottnonnenberg-signal Should I open a new issue for requesting a build based upon electron > 19.0.11?

@BirdInFire
Copy link
Author

Looks like these flags are needed for window decorations to work on Wayland on Gnome:

--no-sandbox --enable-crashpad --ozone-platform-hint --ozone-platform=wayland  --enable-features=WaylandWindowDecorations

However that is broken currently (in both the stable and beta Signl builds) due to this electron bug: electron/electron#34820

That is fixed in electron/electron#34955 and backported to the electron:19.x.y branch in electron/electron#35207

Any chance of getting a Signal build based on the electron:19.x.y branch? Electron 19.0.12 looks like it should have that fix.

Otherwise Signal on Wayland is currently blurry:

Screenshot from 2022-08-11 15-10-28

It is crisp (and with a working titlebar I can use to drag the window around) though broken (the menus don't work) with the aforementined command line flags:

image

i actually don't recommand at all the --no-sandbox, since one purpose of flatpak is ... the sandbox.

@satmandu
Copy link

i actually don't recommand at all the --no-sandbox, since one purpose of flatpak is ... the sandbox.

Noted. I was just modifying the command line from that used from using signal via the debian package.

I'll change the recommended command line accordingly.

@scottnonnenberg-signal
Copy link
Contributor

Don't remove --no-sandbox - that's not an argument to Flatpak, it's an argument to our Electron components, because without it, some linux systems fail to start up.

@maymage
Copy link

maymage commented Sep 8, 2022

The command

flatpak run org.signal.Signal --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform=wayland

seems to work correctly.


Here a screen shot of the resulting window

grafik


Here the command line

output
flatpak run org.signal.Signal --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform=wayland
Debug: Will run signal with the following arguments: 
Debug: Additionally, user gave: --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform=wayland
Set Windows Application User Model ID (AUMID) { appUserModelId: 'org.whispersystems.signal-desktop' }
NODE_ENV production
NODE_CONFIG_DIR /app/Signal/resources/app.asar/config
NODE_CONFIG {}
ALLOW_CONFIG_MUTATIONS undefined
HOSTNAME undefined
NODE_APP_INSTANCE undefined
SUPPRESS_NO_CONFIG_WARNING undefined
SIGNAL_ENABLE_HTTP undefined
userData: /home/martin/.var/app/org.signal.Signal/config/Signal
config/get: Successfully read user config file
config/get: Successfully read ephemeral config file
LaunchProcess: failed to execvp:
xdg-settings
LaunchProcess: failed to execvp:
xdg-settings
[2:0908/133707.138019:ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: Datei oder Verzeichnis nicht gefunden
[2:0908/133707.148658:ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: Datei oder Verzeichnis nicht gefunden
[2:0908/133707.730658:ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: Datei oder Verzeichnis nicht gefunden
[2:0908/133707.730747:ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: Datei oder Verzeichnis nicht gefunden
[2:0908/133707.730814:ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: Datei oder Verzeichnis nicht gefunden
[54:0908/133707.932783:ERROR:gpu_init.cc(486)] Passthrough is not supported, GL is egl, ANGLE is 
(node:88) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

This is with

flatpak info org.signal.Signal 

Signal Desktop - Private messenger

         Kennung: org.signal.Signal
             Ref: app/org.signal.Signal/x86_64/stable
     Architektur: x86_64
           Zweig: stable
         Version: 5.58.0
          Lizenz: GPL-3.0
        Ursprung: flathub
        Sammlung: org.flathub.Stable
    Installation: system
     Installiert: 415,6 MB
Laufzeitumgebung: org.freedesktop.Platform/x86_64/21.08
             Sdk: org.freedesktop.Sdk/x86_64/21.08

          Commit: 5a6aa24b087ec939e4372d330718a9032d0643165954dce0f3b2a937fd87b670
          Parent: e437f42a2a101ec73218d82fba6109d3f93e8ca1502988255c578daafa8e7366
         Betreff: Update signal-desktop.deb to 5.58.0 (#347) (470590e0)

@scottnonnenberg-signal
Copy link
Contributor

Is this perhaps fixed with 5.58, which updates to Electron 20.1.0?

@satmandu
Copy link

satmandu commented Sep 8, 2022

Beautiful! It looks like it works now.

Can we make this the default from the .desktop file?

@scottnonnenberg-signal
Copy link
Contributor

It seems presumptuous to me to assume that all of our users want 'platform=wayland' in the default .desktop file. We probably won't do that. I'm going to close this.

@maymage
Copy link

maymage commented Sep 9, 2022

@scottnonnenberg-signal

Of course

It seems presumptuous to me to assume that all of our users want 'platform=wayland' in the default .desktop file.

But you can use

flatpak run org.signal.Signal --enable-features=WaylandWindowDecorations --ozone-platform-hint=auto

in this case.. I just tested this on x11 and wayland sessions, it works alike on my Debian Sid + GNOME system.


Re. the ozone-platform-hint=auto flag, let me cite from the documentation

It is also possible to choose an Ozone backend via the chrome://flags/#ozone-platform-hint. The following options are available - Default, X11, Wayland, and Auto. The default one is “X11”. “Auto” selects Wayland if possible, X11 otherwise.


So you might perhaps reopen this issue. An additional bonus running Signal on wayland is that the nasty focus stealing issue is gone..


update: works without --enable-features=UseOzonePlatform, thanks @pm4rcin . I've adjusted the commands.

@pm4rcin
Copy link

pm4rcin commented Sep 9, 2022

You don't have to use --enable-features=UseOzonePlatform because Ozone platform is default since a few versions of electron. But I agree about the rest. I have also tested signal on Wayland and XWayland and it works so it would be great to add those things.

@satmandu
Copy link

satmandu commented Sep 9, 2022

It doesn't look like signal opens in Wayland unless I use the --ozone-platform=wayland flag. Also, when I do use that flag, the taskbar icon in Ubuntu doesn't show up properly. The window decorations are definitely working though. Should I open a separate issue for those?

@satmandu
Copy link

satmandu commented Sep 9, 2022

Also, it looks like for wayland usage, these flags are mandatory: --enable-features=WaylandWindowDecorations --ozone-platform=wayland

@maymage
Copy link

maymage commented Sep 9, 2022

@satmandu

I can only talk for my flatpak case. So

  • Granting socket=session-bus to Signal in Flatseal and running
  • flatpak run org.signal.Signal --enable-features=WaylandWindowDecorations --ozone-platform-hint=auto --use-tray-icon
  • then the tray icon correctly appears under some tray icon extension

@satmandu
Copy link

satmandu commented Sep 9, 2022

Thanks all. I copied /usr/share/applications/signal-desktop.desktop to ~/.local/share/applications
And then modified the file thus:

Exec=/opt/Signal/signal-desktop --no-sandbox --enable-features=WaylandWindowDecorations --ozone-platform-hint=auto %U`

(I tried adding --use-tray-icon but that doesn't enable the tray icon for me.)

@satmandu
Copy link

FYI I had to make one more change in the .desktop file to get the tray icon working correctly too in Wayland, as mentioned here: #6122

@Andrea900
Copy link

@satmandu do you know an option to move the window titlebar buttons from left to right?

@satmandu
Copy link

@Andrea900 No. The titlebar buttons are on the right for me with current versions of the signal binaries.

@David-Else
Copy link

David-Else commented Nov 23, 2022

Also, it looks like for wayland usage, these flags are mandatory: --enable-features=WaylandWindowDecorations --ozone-platform=wayland

@satmandu I seem to be able to run native wayland with flatpak run org.signal.Signal --ozone-platform-hint=auto on 5.63.1 when in a wayland session. I don't want any window decorations wasting screen space. How can I actually tell if an app is running in native wayland vs xwayland? I only know it is native at the moment as there is no screen decorations. Cheers :)

@pm4rcin
Copy link

pm4rcin commented Nov 23, 2022

@David-Else xlsclients is your friend.

@maymage
Copy link

maymage commented Sep 10, 2023

WaylandWindowDecorations is now enabled by default on Electron 26+

electron/electron#39582


@scottnonnenberg-signal In view of the many recent and still ongoing fixes for pipewire, portals and wayland for Electron you may wish to re-evaluate setting --ozone-platform-hint=auto from time to time. After all running Signal via xwayland is not ideal either.

@pm4rcin
Copy link

pm4rcin commented Sep 15, 2023

I fully agree with @maymage. Since Window Decorations are enabled by default there's no need for that env variable any more. But first Signal devs need to bump electron version especially since 26 fixes problem with constant crashing when starting on wayland.

@scottnonnenberg-signal
Copy link
Contributor

Unfortunately we can't upgrade to Electron 26 yet because of other crashes! electron/electron#39775

@maymage
Copy link

maymage commented Sep 25, 2023

Also related

@tlvince
Copy link

tlvince commented Dec 4, 2023

Unfortunately we can't upgrade to Electron 26 yet because of other crashes! electron/electron#39775

electron/electron#39775 (comment) suggests this is now fixed in electron >= 26.4.3.

@pm4rcin
Copy link

pm4rcin commented Dec 23, 2023

@scottnonnenberg-signal would you take another look at this proposition? #5869 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

8 participants