element-desktop: Element doesn't work well with native Wayland

Changelog: https://www.electronjs.org/docs/breaking-changes#planned-breaking-api-changes-140

I’ve just tried running Element in native Wayland mode (--enable-features=UseOzonePlatform --ozone-platform=wayland) and it seems that currently breaks Element entirely in smoe circumstances (had the window be fully transparent at startup once, and in general it goes all white when trying to join a Jitsi conference). All my apps using Electron 14 as well as Chromium seem to run fine with these flags so I hope once Element upgrades it will work too 😃

Being able to run Element natively under Wayland would have many advantages, most notably proper HiDPI support in wayland-based desktop environments.

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 11
  • Comments: 31 (9 by maintainers)

Most upvoted comments

Thread 1 "electron" received signal SIGSEGV, Segmentation fault.
0x0000555557f75c1e in ?? ()
(gdb) bt
#0  0x0000555557f75c1e in  ()
vector-im/element-web#1  0x0000266e00d7c970 in  ()
vector-im/element-web#2  0xaf62bd6d4ee57b00 in  ()
vector-im/element-web#3  0x00007fffffffc840 in  ()
vector-im/element-web#4  0x00005555577cd42b in  ()
vector-im/element-web#5  0x0000266e00da6cc0 in  ()
vector-im/element-web#6  0x0000000000000018 in  ()
vector-im/element-web#7  0x0000000000000018 in  ()
vector-im/element-web#8  0x0000004554415453 in  ()
vector-im/element-web#9  0xaf62bd6d4ee57b00 in  ()
vector-im/element-web#10 0x0000266e00d7c970 in  ()
vector-im/element-web#11 0x00007fffffffc910 in  ()
vector-im/element-web#12 0x00007fffffffcbe0 in  ()
vector-im/element-web#13 0x00007fffffffcc60 in  ()
vector-im/element-web#14 0x00005555577bc7d8 in  ()
vector-im/element-web#15 0x000010c5080a0b4d in  ()
vector-im/element-web#16 0x000000000000026c in  ()
vector-im/element-web#17 0x00000000000003c0 in  ()
vector-im/element-web#18 0x0000266e00116488 in  ()
vector-im/element-web#19 0x0000026c000003c0 in  ()
vector-im/element-web#20 0x000003c00000026c in  ()
vector-im/element-web#21 0x0000266e00116240 in  ()
vector-im/element-web#22 0x0000000000000001 in  ()
vector-im/element-web#23 0x00007fffffffce30 in  ()
vector-im/element-web#24 0x0000000000000000 in  ()

I tried with a dev build of element-desktop + element-web 1.9.8. It worked with my locally-installed electron from the arch linux repository while segfaulting with node_modules/.bin/electron. Both report version 16.0.6… Anyways I guess this means I can properly enjoy element desktop as a native desktop app once the next release is done and the element-desktop arch package updated 😊

That wasn’t intentional. What I wanted to actually comment is that all my Electron apps except VSCode (for some reason) have regressed on this, and are now segfaulting at start (albeit only if --ozone-platform=wayland is explicitly set). “Bare” Chromium, like VSCode, works. I guess I should try building vector-im/element-desktop#299 and see whether that works.

Relevant upstream bug might be https://github.com/electron/electron/issues/31885.

fedora 35 has a repo for element which unfortunately does not work (anymore) because element needs a newer version of electron. workaround (at the moment) is to pass --disable-seccomp-filter-sandbox as start parameter, see vector-im/element-web#19329

I tested it on my machine and it seems like element-desktop crashes with

fish: Job 1, 'electron /usr/lib/element/app.a…' terminated by signal SIGSEGV (Address boundary error)

only when trying to run it with latest electron22 on Arch Linux. I installed electron{17, 19, 20, 21} and running Element manually with electron<VERSION> /usr/lib/element/app.asar --disable-dev-mode --enable-features=UseOzonePlatform --ozone-platform=wayland works.

https://github.com/vector-im/element-desktop/pull/299 upgrades to Electron 16 which will hopefully close this issue out.

not sure what happened but the latest version from taw (fedora repository for element) does not require --disable-seccomp anymore, so i guess that has been updated and my problem is solved

Okay - vector-im/element-web#19743 (comment) suggests that @jakobkmar at least can run Element under XOrg on Fedora 35, unless I have misunderstood something (quite possible).

You understood it correctly, for me it is only a Wayland issue, not a Fedora issue.

Are you just basing that off other Electron 14 apps seeming okay?

Yes

I couldn’t quickly find anything specific about Electron 14 that suggests its Wayland support is improved

Have you checked the corresponding Chromium changelogs?

If you’re game for testing it on your system, you could try flipping this line to 14 locally and taking the build for a spin…

Sure, will try tomorrow.

Where can I read more about these issues with Jitsi? Could an upgrade to Electron v15 be done directly? (that’s based on Chromium 94)