Signal-Desktop icon indicating copy to clipboard operation
Signal-Desktop copied to clipboard

Main window does only conditionally open up when using wayland (signal-desktop 6.43.1)

Open fkranhold opened this issue 1 year ago • 12 comments

Using a supported version?

  • [X] I have searched searched open and closed issues for duplicates.
  • [X] I am using Signal-Desktop as provided by the Signal team, not a 3rd-party package.

Overall summary

I am running signal-desktop 6.43.1 on Arch with sway. The command signal-desktop, which apparently relies on xwayland, works as expected, but signal-desktop --enable-features=UseOzonePlatform --ozone-platform=wayland only works when the application has previously been opened without these parameters. Hence, opening Signal with wayland support, closing it, and re-opening it does not work.

When running these commands in a shell, no errors are shown; the two outputs look very similiar. The only difference I noticed is that in the unsuccessful case, the following two lines are missing:

{"level":30,"time":"2024-01-05T13:13:19.660Z","msg":"main window is ready-to-show"}
{"level":30,"time":"2024-01-05T13:13:19.660Z","msg":"showing main window"}

Steps to reproduce

  1. Run signal-desktop --enable-features=UseOzonePlatform --ozone-platform=wayland.
  2. Close Signal.
  3. Repeat Step 1.

Expected result

Step 3 should open a window.

Actual result

Step 3 does not open a window.

Screenshots

No response

Signal version

6.43.1

Operating system

Arch Linux

Version of Signal on your phone

No response

Link to debug log

No response

fkranhold avatar Jan 05 '24 13:01 fkranhold

Thanks for the bug report - the need for startups in both configurations is certainly unexpected.

This is likely an Electron issue - for the best chance of getting this fixed, you can help by filing a bug on their project with an Electron Fiddle showing a minimum repro.

scottnonnenberg-signal avatar Jan 05 '24 17:01 scottnonnenberg-signal

I have similar issue. Although for me I have to run signal-desktop --enable-features=UseOzonePlatform --ozone-platform=wayland in one terminal tab and then again the same in other to make signal show up. No other electron apps have those issues for me (caprine as eg.). I'm on arch KDE plasma.

fatino avatar Feb 07 '24 21:02 fatino

I can confirm this as well (on signal 7.2.0 on Arch Linux with sway). I need to start signal twice for the window to open up on wayland.

The same also happens when using signal-desktop --ozone-platform-hint=auto instead of the above flags.

I debugged this using WAYLAND_DEBUG=1:

When only starting signal-desktop once:

  • Signal actually creates a Wayland surface ([email protected]_surface(new id wl_surface@36))
  • It also creates a fractional scale manager and viewport
  • but it doesn't actually attach any buffers to the surface, doesn't commit it, and doesn't create an XDG toplevel surface (an actual window)

When starting it a second time:

  • Signal commits the surface
  • it also creates an XDG toplevel surface
  • the window appears and basically everything works

Ferdi265 avatar Mar 18 '24 21:03 Ferdi265

seems related to #6368

Ferdi265 avatar Mar 18 '24 21:03 Ferdi265

If you start signal with signal-desktop --use-tray-icon --enable-features=UseOzonePlatform --ozone-platform=wayland or signal-desktop --use-tray-icon --ozone-platform-hint=auto

Then you can use the tray icon to open the main window. But without the --use-tray-icon option, you can't see the main window.

grazzolini avatar Jul 31 '24 15:07 grazzolini

If you start signal with signal-desktop --use-tray-icon --enable-features=UseOzonePlatform --ozone-platform=wayland or signal-desktop --use-tray-icon --ozone-platform-hint=auto

Then you can use the tray icon to open the main window. But without the --use-tray-icon option, you can't see the main window.

I confirm, this works. However, it would be nice to have it working properly (as before). Especially when the 'tray icon' feature is disabled in the app settings.

GaetanLepage avatar Aug 03 '24 11:08 GaetanLepage

Just to note, using these flags does appear to break things on other linux distros in our testing. We can't simply turn these flags on for everyone as a temporary solution until electron fixes the issue.

It looks like this issue and #6368 are primarily issues with Arch Linux. If people are experiencing it on something other than Arch please let us know so we can get a better picture

jamiebuilds-signal avatar Aug 07 '24 18:08 jamiebuilds-signal

I've got the same issue on Ubuntu sway remix

saz avatar Aug 07 '24 18:08 saz

Just to note, using these flags does appear to break things on other linux distros in our testing. We can't simply turn these flags on for everyone as a temporary solution until electron fixes the issue.

It looks like this issue and #6368 are primarily issues with Arch Linux. If people are experiencing it on something other than Arch please let us know so we can get a better picture

Using --enable-features=UseOzonePlatform --ozone-platform=wayland would force electron to work only on wayland, therefore breaking signal on X. However, using --ozone-platform-hint=auto should be enough for making it work on wayland, while also making it work on X. It would be helpful too if signal respected electron-flags.conf or had its own flags file.

grazzolini avatar Aug 07 '24 18:08 grazzolini

Just to note, using these flags does appear to break things on other linux distros in our testing. We can't simply turn these flags on for everyone as a temporary solution until electron fixes the issue. It looks like this issue and #6368 are primarily issues with Arch Linux. If people are experiencing it on something other than Arch please let us know so we can get a better picture

Using --enable-features=UseOzonePlatform --ozone-platform=wayland would force electron to work only on wayland, therefore breaking signal on X. However, using --ozone-platform-hint=auto should be enough for making it work on wayland, while also making it work on X. It would be helpful too if signal respected electron-flags.conf or had its own flags file.

It should be added that Signal works completely fine when started up using X11 or Xwayland (without --ozone-platform or --ozone-platform-hint), but when manually started as a native Wayland client (using these flags) it doesn't open unless started twice.

Since the issue seems to be related to running on newer electron versions as well, it makes sense that this issue mostly happens on distros like Arch, since those distros usually have newer versions and are more likely to have tinkering users that like to set manual options to make apps use Wayland natively.

Ferdi265 avatar Aug 07 '24 18:08 Ferdi265

It should be added that Signal works completely fine when started up using X11 or Xwayland (without --ozone-platform or --ozone-platform-hint), but when manually started as a native Wayland client (using these flags) it doesn't open unless started twice.

If you use --use-tray-icon and --ozone-platform-hint=auto you can run signal just once, and then click on the tray icon to show the main window. But yes, without using --use-tray-icon you need to run signal twice.

Since the issue seems to be related to running on newer electron versions as well, it makes sense that this issue mostly happens on distros like Arch, since those distros usually have newer versions and are more likely to have tinkering users that like to set manual options to make apps use Wayland natively.

I would suspect most users don't even notice signal is using XWayland instead of native wayland. I'm not entirely sure this has to do with Arch using newer versions, because Arch has several electron versions packaged.

grazzolini avatar Aug 07 '24 19:08 grazzolini

Just to note, using these flags does appear to break things on other linux distros in our testing. We can't simply turn these flags on for everyone as a temporary solution until electron fixes the issue.

It looks like this issue and #6368 are primarily issues with Arch Linux. If people are experiencing it on something other than Arch please let us know so we can get a better picture

I can reproduce the issue with the flatpak version as well.

Ferdi265 avatar Aug 07 '24 19:08 Ferdi265