signalapp / Signal-Desktop

A private messenger for Windows, macOS, and Linux.
https://signal.org/download
GNU Affero General Public License v3.0
14.52k stars 2.63k forks source link

5.27 breaks Wayland support #5719

Closed sandersteenhoudt closed 2 years ago

sandersteenhoudt commented 2 years ago

Bug Description

After upgrading to 5.27.0-1 on Arch Linux, Signal Desktop no longer starts on Wayland (using ozone flags). Reverting back to 5.26.1-1 fixes the issue.

Steps to Reproduce

  1. Run signal-desktop --enable-features=UseOzonePlatform --ozone-platform=wayland

Let me know if you need any additional information!

Actual Result: Signal doesn't start.

signal-desktop --enable-features=UseOzonePlatform --ozone-platform=wayland
Set Windows Application User Model ID (AUMID) { appUserModelId: 'org.whispersystems.signal-desktop' }
NODE_ENV production
NODE_CONFIG_DIR /usr/lib/signal-desktop/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/steen/.config/Signal
config/get: Successfully read user config file
config/get: Successfully read ephemeral config file
making app single instance
[6603:0105/154522.895686:ERROR:gpu_init.cc(457)] Passthrough is not supported, GL is egl, ANGLE is 
[6603:0105/154522.898629:ERROR:sandbox_linux.cc(376)] InitializeSandbox() called with multiple threads in process gpu-process.
{"level":30,"time":"2022-01-05T14:45:22.910Z","pid":6540,"hostname":"thinkpad","msg":"MainSQL: updateSchema:\n  Current user_version: 44;\n  Most recent db schema: 46;\n  SQLite version: 3.36.0;\n  SQLCipher version: 4.5.0 community;\n  (deprecated) schema_version: 210;\n"}
{"level":30,"time":"2022-01-05T14:45:22.912Z","pid":6540,"hostname":"thinkpad","msg":"app ready"}
{"level":30,"time":"2022-01-05T14:45:22.912Z","pid":6540,"hostname":"thinkpad","msg":"starting version 5.27.0"}
{"level":30,"time":"2022-01-05T14:45:22.913Z","pid":6540,"hostname":"thinkpad","msg":"media access status [object Undefined] [object Undefined]"}
{"level":30,"time":"2022-01-05T14:45:22.914Z","pid":6540,"hostname":"thinkpad","msg":"got fast spellcheck setting true"}
{"level":30,"time":"2022-01-05T14:45:22.915Z","pid":6540,"hostname":"thinkpad","msg":"getSystemTraySetting had no flags and did no DB lookups. Returning DoNotUseSystemTray"}
{"level":30,"time":"2022-01-05T14:45:22.915Z","pid":6540,"hostname":"thinkpad","msg":"Initializing BrowserWindow config: {\"show\":false,\"width\":956,\"height\":1145,\"minWidth\":712,\"minHeight\":550,\"autoHideMenuBar\":false,\"titleBarStyle\":\"default\",\"backgroundColor\":\"#3a76f0\",\"webPreferences\":{\"devTools\":false,\"nodeIntegration\":false,\"nodeIntegrationInWorker\":false,\"contextIsolation\":false,\"preload\":\"[REDACTED]/preload.bundle.js\",\"nativeWindowOpen\":true,\"spellcheck\":true,\"backgroundThrottling\":false,\"enablePreferredSizeMode\":true},\"icon\":\"[REDACTED]/images/signal-logo-desktop-linux.png\",\"x\":0,\"y\":0}"}
[6540:0105/154522.915875:ERROR:cursor_loader.cc(114)] Failed to load a platform cursor of type kNull
Segmentation fault (core dumped)

Expected Result: Signal starts on Wayland

Platform Info

Signal Version: 5.27.0

Operating System: Arch Linux

fyoosh commented 1 year ago

Or ... you use flatpak version flatseal propose an environement variable to enable wayland (without touching at the desktop file) if more easy for the person who ask

Just wondering if you've managed to get Signal to use wayland with flatseal?

Would like to do that same but not sure how.

ghost commented 1 year ago

Or ... you use flatpak version flatseal propose an environement variable to enable wayland (without touching at the desktop file) if more easy for the person who ask

Just wondering if you've managed to get Signal to use wayland with flatseal?

Would like to do that same but not sure how.

yes but I loved the windows decoration (you need to change a env var (Wayland)) it's quite bugged and I don't like much the electron behind.

ofcaah commented 1 year ago

--ozone-platform=wayland fixed things on Debian after switching from X11 to Wayland. Note, that signal was pretty much only app having such problems. Everything else "just worked" after switching session from X11.

maymage commented 1 year ago

--ozone-platform=wayland fixed things on Debian after switching from X11 to Wayland. Note, that signal was pretty much only app having such problems. Everything else "just worked" after switching session from X11.

--ozone-platform=auto is probably better, @ofcaah

ofcaah commented 1 year ago

--ozone-platform=auto is probably better, @ofcaah

It sure would be, and I'd imagine it would be the default, however it probably isn't because of:

$ signal-desktop --ozone-platform=auto
[3982989:0812/153847.714925:FATAL:platform_selection.cc(45)] Invalid ozone platform: auto
jplatte commented 1 year ago

Isn't it ozone-platform-hint=auto?

ofcaah commented 1 year ago

Isn't it ozone-platform-hint=auto?

signal starts this way, however it requires clicking the shortcut twice for the window to pop up, and there's no tray icon

sbug0 commented 1 year ago

I can't run Signal in Wayland on my Debian 12 no matter I do :-(

Neither the flatpak version, or the package from the repo loads any window when I use the flag --ozone-platform=wayland

draptik commented 1 year ago

Isn't it ozone-platform-hint=auto?

signal starts this way, however it requires clicking the shortcut twice for the window to pop up, and there's no tray icon

...and using a tiling window manager like sway: One has to start the application twice.

stickyburn commented 1 year ago

For me starting the app twice opens it, but the second I focus my cursor it crashes with segmentation fault :upside_down_face: I think it has to do with no system tray on my twm.

dortonway commented 10 months ago

I have 1440p, Ubuntu 22.04.3, Wayland, and a fractional scaling of 125%.

I tried:

signal-desktop --ozone-platform=wayland
signal-desktop --ozone-platform-hint=auto

Then Signal opens by clicking the icon only. It's not blurry, but it does not have the window header to drag it around and resize (the window is very small). So it's not usable.

This way it has window decorations, it runs not in a native way, but it seems to be usable:

signal-desktop --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform=wayland
kingofdreams777 commented 10 months ago

Bumping this, any update here?

Using Arch Linux and Hyprland (Wayland Window Manager) and Signal Desktop fails with a segfault when running signal-desktop --use-tray-icon --enable-features=UseOzonePlatform --ozone-platform=wayland

Error Code Below:

[1]    5404 segmentation fault (core dumped)  signal-desktop --use-tray-icon --enable-features=UseOzonePlatform
jm355 commented 9 months ago

Setting signal to open in floating mode rather than tiling mode seems to prevent the crash, but any time I try to tile it it crashes. It seems to have a problem with being told what size the window is

kingofdreams777 commented 9 months ago

Interesting. What flag do I need to set to have it open in floating

jm355 commented 9 months ago

that's handled by your window manager. In my sway config I have for_window [app_id="signal"] floating enable

kingofdreams777 commented 9 months ago

Perfect. I'll look into that for Hyprland

kingofdreams777 commented 9 months ago

@jeremiah-miller unfortunately even with a window rule enable for signal with Hyprland the program still SegFaults

jm355 commented 9 months ago

Do you launch it with /usr/bin/signal-desktop --enable-features=WaylandWindowDecorations --ozone-platform-hint=auto --ozone-platform=wayland?

kingofdreams777 commented 9 months ago

@jeremiah-miller Yup still failing with a SegFault with those exact flags. If I don't add a --use-tray-icon then the window does not pop up at all either. (worth noting)

aurelien-brabant commented 9 months ago

I'm encountering the same issue, the following invocation of signal-desktop seems to start the app normally (according to the logs) however no window pops up

/usr/bin/signal-desktop --enable-features=WaylandWindowDecorations --ozone-platform-hint=auto --ozone-platform=wayland

Tested on Gentoo with hyprland as a window manager (works normally through XWayland)

scottnonnenberg-signal commented 9 months ago

What are you seeing on the latest beta? It has an updated version of Electron: https://support.signal.org/hc/articles/360007318471-Signal-Beta

aurelien-brabant commented 9 months ago

What are you seeing on the latest beta? It has an updated version of Electron: https://support.signal.org/hc/articles/360007318471-Signal-Beta

I'm willing to test with that one, however is there a way I can download signal-desktop-beta as a pre-built linux binary since I'm not using a debian based distro?

boredland commented 9 months ago

Same issue with signal-desktop-beta (6.43.0beta.2-1 (+38 0.47)) without flags:

Set Windows Application User Model ID (AUMID) { AUMID: 'org.whispersystems.signal-desktop-beta' }
NODE_ENV production
NODE_CONFIG_DIR /opt/Signal Beta/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/jonass/.config/Signal Beta
config/start: Did not find user config file (or it was empty), cache is now empty object
config/start: Did not find ephemeral config file (or it was empty), cache is now empty object
getLogger: Logger not yet initialized!
crashReporter: enabled
making app single instance
[99621:1219/223941.346726:ERROR:ozone_platform_x11.cc(240)] Missing X server or $DISPLAY
[99621:1219/223941.346776:ERROR:env.cc(255)] The platform failed to initialize.  Exiting.
[1]    99621 segmentation fault (core dumped)  signal-desktop-beta

those flags work for both the stable and the beta:

signal-desktop --enable-features=UseOzonePlatform --ozone-platform=wayland --disable-gpu
justin13888 commented 8 months ago

Using flatpak Signal (stable) (version 6.43.1 production) on Fedora Workstation (Gnome). Could confirm it also doesn't run (hangs instead of crashing outright).

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

Stdout:

Debug: Will run signal with the following arguments:
Debug: Additionally, user gave: --enable-features=UseOzonePlatform --ozone-platform=wayland
Set Windows Application User Model ID (AUMID) { AUMID: '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/<omitted>/.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
wmfinck commented 8 months ago

I am having the same experience as justin13888 on Fedora 39 and I am also using flatpak Signal (stable) version 6.43.1. I have tried various combinations of the flags below:

flatpak run org.signal.Signal --enable-features=UseOzonePlatform --ozone-platform=wayland --disable-gpu

Debug: Will run signal with the following arguments: Debug: Additionally, user gave: --enable-features=UseOzonePlatform --ozone-platform=wayland --disable-gpu [2 zypak-helper] Wait found events, but sd-event found none Set Windows Application User Model ID (AUMID) { AUMID: '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/wmfinck/.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

vincentkoevoets commented 8 months ago

What are you seeing on the latest beta? It has an updated version of Electron: https://support.signal.org/hc/articles/360007318471-Signal-Beta

I installed the latest beta, and wayland seems to be working again, but still not natively. I have a custom .desktop file, and the exec command is this:

Exec="/opt/Signal Beta/signal-desktop-beta" --no-sandbox --enable-features=UseOzonePlatform,waylandWindowDecorations --ozone-platform=wayland %U

With these options, the screen is clear (no blurryness), but the window controls are on the wrong side (left instead of right) and also seem different from other app window controls, and the icon in the bottom taskbar (so not the notification icon) is a cogwheel instead of the blue Signal icon. But it is usable, which is nice.

stickyburn commented 8 months ago

@vincentkoevoets I have these flags and none of the issues you mentioned:

--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations

Except native wayland ofcourse :upside_down_face:

vincentkoevoets commented 8 months ago

@vincentkoevoets I have these flags and none of the issues you mentioned:

--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations

Except native wayland ofcourse 🙃

Hmm that's strange, something else must be wrong then. I ran this from the command line:

signal-desktop-beta --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations

but got exactly the same symptoms as described in my previous post. Do you use any other options?

stickyburn commented 8 months ago

Nope sorry. Mayybbe try --disable-gpu just to check, but don't think it'll have any affect.

vincentkoevoets commented 8 months ago

Well I did try --disable-gpu, just in case, but still with the same symptoms. I will be diving further into this, maybe it has to do with scaled desktop, of maybe something else is wrong. Will try a clean ubuntu install also, just to see if it makes any difference. Thanks for the help.

justin13888 commented 8 months ago

Using flatpak Signal (stable) (version 6.43.1 production) on Fedora Workstation (Gnome). Could confirm it also doesn't run (hangs instead of crashing outright).

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

Stdout:

Debug: Will run signal with the following arguments:
Debug: Additionally, user gave: --enable-features=UseOzonePlatform --ozone-platform=wayland
Set Windows Application User Model ID (AUMID) { AUMID: '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/<omitted>/.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

Since my last message, I managed to get Signal to run on Wayland by updating my desktop file as follows and making sure signal hasn't been started on another process. It appears that Signal Desktop (6.44.1 production; Flatpak) works (at least on Fedora 39 Workstation) on Wayland.

[Desktop Entry]
Name=Signal
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=signal-desktop --file-forwarding org.signal.Signal @@u %U @@
Terminal=false
Type=Application
Icon=org.signal.Signal
StartupWMClass=Signal
Comment=Private messaging from your desktop
MimeType=x-scheme-handler/sgnl;x-scheme-handler/signalcaptcha;
Categories=Network;InstantMessaging;Chat;
X-Desktop-File-Install-Version=0.27
X-Flatpak-RenamedFrom=signal-desktop.desktop;
X-Flatpak=org.signal.Signal
vincentkoevoets commented 8 months ago

That's one thing I hadn't tried yet. So I removed all repo versions of Signal and installed the Flatpak one. I still have to start with flatpak run org.signal.Signal --enable-features=UseOzonePlatform --ozone-platform=wayland, but everything works fine with those options. So I will be running this one for now.

dinotheextinct commented 7 months ago

Is there any fix for this? cant run signal-desktop flatpak on wayland.

NiciTheNici commented 5 months ago

@dinotheextinct run it using --enable-features=UseOzonePlatform --ozone-platform=wayland