Electron: 考虑为 Wayland 提供构建

创建于 2017-10-25  ·  139评论  ·  资料来源: electron/electron

  • 电子版:任意
  • 操作系统:Linux

预期行为

最新的 Ubuntu 带有 Wayland 默认显示服务器。
在嵌入式设备上,wayland 通常提供最好的渲染性能,至少与性能通常很差的 X11 相比。

实际行为

当前的 linux / arm / arm64 二进制版本很棒,但根据我在嵌入式设备上的经验,运行起来很糟糕。 它们都链接到 libx11/gtk,这使得它们无法用于 Wayland。

libGtk 可以使用 --wayland-backend 构建,然后可以针对它构建电子

我真的很希望电子团队考虑提供可用于 Wayland 的预构建二进制文件,这将开辟一系列新的可能性,尤其是在嵌入式设备上。

blockeupstream ❌ enhancement platforlinux

最有用的评论

更新:我们(Igalia)目前正致力于将旧版 Chromium/Linux(又名:Aura/X11)迁移到 Ozone( crbug.com/789065 ),以便在运行时可以相应地选择 X11 或 Wayland Ozone 后端。 此外,还需要能够在运行时在 Ozone 和 legacy 之间切换,作为后备机制,以防在此过渡期间出现问题。 一旦完成,并且 Wayland 后端经过适当的完善和测试,它有望进入 Chromium/Linux 官方版本。

很高兴听到 vscode/electron 已经能够在铬臭氧/wayland 之上运行(我需要找一些时间自己尝试一下:))。 感谢您的工作和分享。

如需进一步跟进,请通过 {nickdiego,msisov}@igalia.com 与我们联系

所有139条评论

稍微阅读后,看起来实现这一目标的最佳方法是在铬构建中启用臭氧。 所以我想知道是否有人这样做过,或者我是否可以得到一些建议来尝试一下?
电子的任何其他部分是否也有很强的 X11 依赖性? GTK3 不应该在这一点上,但想知道像 Brightray 这样的东西是否有?

进一步查看构建表明电子依赖于铬 libgtkui。
铬中的 libgtkui 对 X11 有很强的依赖性,此时不会构建在 X11/OSX/Win 之外的任何东西上。

我不确定 Chromium 中的libgtkui用于什么(不在 libgtk3 中)。
它看起来像是用于创建状态图标和应用程序指示器。
我想知道是否可以将其设为可选...

我已经设法修补 libchromiumcontent 以使其在没有 X11 的情况下构建。
这需要相当多的补丁,并不是很合适。

在这种情况下,可以使用use_aura=true use_ozone=true和更多参数构建 libchromiumcontent。 有关更多详细信息,请参阅我的补丁https://github.com/LongChair/libchromiumcontent/commits/upgrade-to-chromium-61

然后我开始了电子构建,情况类似。 尽管大部分代码都有一些#if defined(USE_AURA)部分,但此时显然无法为带有臭氧的光环构建,即使 libgtk3ui 不依赖它。

Brightray GYP 文件中也有一些位使其依赖于 X11,Wayland 版本需要在那里与正确的显示管理器库 ( wayland-client, ... ) 链接。

我相信让它在 linux 上没有太多麻烦并且没有 X11 支持的情况下可以构建的最好方法是让 libgtk3ui 组件在构建中使用 optionnal。 但是我对电子的了解还不够多,无法知道这会破坏/使什么不可用。 似乎它主要是任务栏图标,这无关紧要,因为无论如何韦斯顿没有任务栏:)

我想我会在这里停止我的尝试,因为这会产生太多补丁,并且目前电子团队对此没有兴趣/反馈:)

这也将允许在 ChromeOS 上通过 hack 运行。

这也将允许在 ChromeOS 上通过 hack 运行。

这有点激起了我的兴趣,你能解释一下它是如何工作的吗?

最新的 chromeos 设备,那些捆绑了 android 运行时的设备使用 wayland 来显示非 Chrome 应用程序。

我已经成功编译并运行了 hello wayland 演示。

ChromeOS 使用 Aura & Ozone,与 Wayland 或 GBM/KMS。
上面提到的问题仍然是相同的。 libgtkui 仍然是在铬和电子中进行构建的主要问题。

@LongChair进步
我也在研究这个,但更喜欢先为 Wayland 测试 Chrome (Chromium)。 我猜想 V8 引擎是迁移的最大部分,无论是在 Chrome 还是 Electron 中。
Igalia 有一个靠近上游的铬叉: https :
也许我们可以将 Igalia 补丁集成到您的 Electron 构建中?
好吧,我还没有能够在 Wayland 上运行 Chromium ......

我能够编译和运行带有 Wayland 补丁的 Chromium! 在此处查看构建脚本: https :

@onny :正如我之前的意思,似乎很多 X11 依赖项仍然在电子本身中,因为如果在 libcc 构建中使用 libgtkui。

据我所知,电子也将 AURA 作为构建参数处理,但假设使用了 aura/x11。 所以目前没有办法让它在没有 X11 的情况下构建。

它将在 Xwayland / Wayland 上运行,但这远没有带来 Wayland 的性能,尤其是在嵌入式上。

哦,这很有趣:

Electron 现在在 master 分支中使用 GTK3,将在下一个次要/主要版本中发布。
https://github.com/electron/electron/issues/2927#issuecomment -347092515

👍

@onny :是的,这就是铬 61 带来的。 这是进步。

我正在寻找的是电子的完整原生 Wayland 版本,因为 X11 (Xwayland) 往往会使整体性能下降很多。
为此有两个问题,即使 Chromium 在本地 Wayland 上构建和运行,也没有 libgtkui afaik。 在这一点上,libcc 添加到铬构建本身的依赖似乎严重依赖于 X11。
然后除了铬之外,电子代码本身既依赖于libcc:gtkui ,也依赖于原生 wayland 上不可用的一堆 X11 函数。

我不确定如何克服 X11 依赖性。 需要以下内容:

  • 在电子中摆脱 licbc gtkui 需要。 ? 如果不可能,则使用铬使其与 X11/Wayland 兼容
  • 摆脱 X11 的强制依赖。 电子代码似乎使用 AURA,但假设它是 AURA X11,它可能是 AURA / Wayland。 我不确定使用的 X11 函数是否有任何等效项。

如果一些电子开发人员可以对此进行评估或带来一些反馈/技术考虑,那就太好了:)

有这方面的消息吗?

你好! 我只是想分享一下,我们(来自 Igalia)在https://github.com/Igalia/chromium/ 中的Chromium(浏览器)和 Content(嵌入层)级别都支持 Wayland

因此,根据今天人们如何在常规铬/x11 构建之上配置电子,在铬/韦兰之上尝试它可能真的很简单。

最大的区别在于:

  • 铬/韦兰构建启用了“臭氧”。
  • 在chromium-land中,chromium/wayland运行在正在开发的“UI服务”之上。

如果有人想跟进此事,请通过 \tonikitoo at igalia dot com\ 与我联系。

有没有人找到不用 X11 运行 Electron 的解决方案?

@tonikitoo您是否有任何迹象表明您在 Wayland 上的工作何时会被整合回上游?

@luispabon这项工作正在积极地上游。 我们估计大约 85% 已经在铬的主线上。

/cc @msisov

@tonikitoo优秀👍

@tonikitoo ,关于电子与xwayland、wayland 或

我们不是在开发电子,而是在 Chromium 中添加对 Wayland 的支持:)

crbug.com/578890

有关于 Wayland 支持的消息吗? 我很想看到 VSCode 在 Wayland 而不是 Xwayland 上本地运行。

@GitHubRepositoryX在您之前的评论中关注 crbug 问题的进展,它仍在积极更新。

我注意到最近修补了铬以支持臭氧上的 libgtkui(X11 和 Wayland): https ://chromium-review.googlesource.com/c/chromium/src/+/1744372

所以这可能会解决@LongChair提到的问题,因为 libgtkui 仍然可以在臭氧路上使用。

我尝试打开臭氧/wayland 构建标志并解决了一些问题,我设法让它达到了可以工作的程度! 在我进行 PR 之前,代码仍然需要清理、测试并分成更小的更改,但这里是分支: https :

DPI 更改意识 (https://github.com/electron/electron/issues/11050) 与在臭氧/wayland 铬构建中一样完美地工作,并且其中缺失的部分同样被破坏,例如还没有打开文件对话框(尽管我认为他们现在正在研究中)。

在大多数情况下,更改只是将USE_X11定义(以前将 linux 和 X11 混为一谈)与OS_LINUXUSE_X11USE_OZONE组合的使用分开.

USE_X11 将很快从 Chromium 代码库中删除,因为我们越来越接近拥有没有普通 X11 的 Ozone/X11 和 Ozone/Wayland。

此外,为了能够使用文件对话框和 gtk,您必须在启用 use_glib=true 的情况下编译臭氧。 IIRC,use_gtk 默认设置为 true。

那么用if !use_ozone and os_linux替换if use_x11是否更好? 或者是其他东西?

我将尝试使用 use_glib 标志。 我认为文件对话框正在工作吗?

是的,没错。 尽管如此,这种模式还没有奏效。 但是你可以使用它们。

这将是非常了不起的。 也许我们也可以在 linux 上像在 Windows 上一样滚动。 (动力学)

Arch 用户: https :

我已经使用最新的 VSCode(代码-git 只需要修补以使用electron而不是electron6以下 https://github.com/microsoft/vscode/pull/ 83796)

有一些奇怪的症状(可能是我注释掉了我不明白的代码) - 但它有效。 如此锋利,尺寸如此正确!

@hedgepigdaniel你打算用你的更改创建 PR 吗? 我只是尝试使用 PKGBUILD 中的 gn 标志检查和编译电子,但我收到编译错误......

../../ui/base/cursor/ozone/bitmap_cursor_factory_ozone.cc:53:15: error: no member named 'find_if' in namespace 'std'
(easy fix: just #include <algorithm>)
../../electron/shell/browser/ui/x/window_state_watcher.cc:59:32: error: no member named 'xproperty' in 'ui::Event'
  ::Atom changed_atom = event->xproperty.atom;
                        ~~~~~  ^
../../electron/shell/browser/ui/x/window_state_watcher.cc:61:18: error: reference to non-static member function must be called; did you mean to call it with no arguments?
          event->type == PropertyNotify && event->xproperty.window == widget_);
          ~~~~~~~^~~~
                     ()
../../electron/shell/browser/ui/x/window_state_watcher.cc:61:51: error: no member named 'xproperty' in 'ui::Event'
          event->type == PropertyNotify && event->xproperty.window == widget_);
                                           ~~~~~  ^

(these might be fixed by your conditional compiles?)

看起来这些可能会被您的提交修复?

更新:我们(Igalia)目前正致力于将旧版 Chromium/Linux(又名:Aura/X11)迁移到 Ozone( crbug.com/789065 ),以便在运行时可以相应地选择 X11 或 Wayland Ozone 后端。 此外,还需要能够在运行时在 Ozone 和 legacy 之间切换,作为后备机制,以防在此过渡期间出现问题。 一旦完成,并且 Wayland 后端经过适当的完善和测试,它有望进入 Chromium/Linux 官方版本。

很高兴听到 vscode/electron 已经能够在铬臭氧/wayland 之上运行(我需要找一些时间自己尝试一下:))。 感谢您的工作和分享。

如需进一步跟进,请通过 {nickdiego,msisov}@igalia.com 与我们联系

我不敢相信这终于发生了,梦想成真了......希望合并 ppc64le 补丁不会花那么长时间🤞

运行拱形/摇摆,构建电子臭氧似乎进展顺利,但是当我运行电子时:

electron -i

[57306:0311/201354.632474:FATAL:ozone_platform_wayland.cc(171)] Failed to initialize Wayland platform

请留下这两个命令的作用

echo $WAYLAND_DISPLAY
echo $XDG_RUNTIME_DIR

展示。

 ~ echo $WAYLAND_DISPLAY
wayland-0
 ~ echo $XDG_RUNTIME_DIR
/run/user/1000

我使用@hedgepigdaniel电子臭氧包(我也在拱形/摇摆)得到与@garth完全相同的错误。

在同一台机器上,铬臭氧运行良好(除了一些小问题,如上下文菜单/选择输入错位: chromium#1052685 )。

好的,尝试按以下方式运行应用程序:

WAYLAND_DISPLAY=1 ./your-app.

现在有效吗? 如果没有,请尝试使用 WAYLAND_DEBUG=1 运行并共享输出。 谢谢

我使用@hedgepigdaniel电子臭氧包(我也在拱形/摇摆)得到与@garth完全相同的错误。

在同一台机器上,铬臭氧运行良好(除了一些小问题,如上下文菜单/选择输入错位: chromium#1052685 )。

我没有看到。 感谢您在此处发布此链接。 它将被分类和修复。

在摇摆之下:

 ~ WAYLAND_DISPLAY=1 electron -i
> [130498:0312/123434.824982:FATAL:ozone_platform_wayland.cc(171)] Failed to initialize Wayland platform

我还用 Gnome 进行了测试,它可以工作。

它应该是

WAYLAND_DISPLAY=wayland-1 (if such display socket exists)


根据我的环境,它应该是wayland-0,但我尝试了 0 和 1,效果相同。 这是调试输出。

 ~ WAYLAND_DISPLAY=wayland-0 WAYLAND_DEBUG=1 electron -i
> [430007.888]  -> [email protected]_registry(new id wl_registry@2)
[430007.898]  -> [email protected](new id wl_callback@3)
[430008.013] [email protected]_id(3)
[430008.020] [email protected](1, "wl_shm", 1)
[430008.028]  -> [email protected](1, "wl_shm", 1, new id [unknown]@4)
[430008.040] [email protected](2, "zwp_linux_dmabuf_v1", 3)
[430008.051]  -> [email protected](2, "zwp_linux_dmabuf_v1", 3, new id [unknown]@5)
[430008.062]  -> [email protected](new id wl_callback@6)
[430008.066] [email protected](3, "wl_drm", 2)
[430008.075] [email protected](4, "wl_compositor", 4)
[430008.087]  -> [email protected](4, "wl_compositor", 4, new id [unknown]@7)
[430008.124] [email protected](5, "wl_subcompositor", 1)
[430008.136]  -> [email protected](5, "wl_subcompositor", 1, new id [unknown]@8)
[430008.152] [email protected](6, "wl_data_device_manager", 3)
[430008.161]  -> [email protected](6, "wl_data_device_manager", 3, new id [unknown]@9)
[430008.209] [email protected](7, "zwlr_gamma_control_manager_v1", 1)
[430008.220] [email protected](8, "gtk_primary_selection_device_manager", 1)
[430008.232] [email protected](9, "zxdg_output_manager_v1", 3)
[430008.244] [email protected](10, "org_kde_kwin_idle", 1)
[430008.257] [email protected](11, "zwp_idle_inhibit_manager_v1", 1)
[430008.269] [email protected](12, "zwlr_layer_shell_v1", 2)
[430008.281] [email protected](13, "xdg_wm_base", 2)
[430008.293] [email protected](14, "zwp_tablet_manager_v2", 1)
[430008.304] [email protected](15, "org_kde_kwin_server_decoration_manager", 1)
[430008.317] [email protected](16, "zxdg_decoration_manager_v1", 1)
[430008.329] [email protected](17, "zwp_relative_pointer_manager_v1", 1)
[430008.340] [email protected](18, "zwp_pointer_constraints_v1", 1)
[430008.352] [email protected](19, "wp_presentation", 1)
[430008.364]  -> [email protected](19, "wp_presentation", 1, new id [unknown]@10)
[430008.380] [email protected](20, "zwlr_output_manager_v1", 1)
[430008.391] [email protected](21, "zwlr_export_dmabuf_manager_v1", 1)
[430008.402] [email protected](22, "zwlr_screencopy_manager_v1", 2)
[430008.414] [email protected](23, "zwlr_data_control_manager_v1", 2)
[430008.427] [email protected](24, "zwp_primary_selection_device_manager_v1", 1)
[430008.437] [email protected](25, "zwp_virtual_keyboard_manager_v1", 1)
[430008.449] [email protected](26, "zwlr_virtual_pointer_manager_v1", 1)
[430008.461] [email protected](27, "zwlr_input_inhibit_manager_v1", 1)
[430008.473] [email protected](28, "wl_seat", 7)
[430008.499]  -> [email protected](28, "wl_seat", 4, new id [unknown]@11)
[430008.516]  -> [email protected]_data_device(new id wl_data_device<strong i="10">@12</strong>, wl_seat@11)
[430008.526] [email protected](29, "zwp_pointer_gestures_v1", 1)
[430008.538] [email protected](30, "wl_output", 3)
[430008.548]  -> [email protected](30, "wl_output", 3, new id [unknown]@13)
[430008.583] [email protected](241)
[430008.698] [email protected]_id(6)
[430008.716] [email protected](1211384385, 0, 0)
[430008.723] [email protected](1211384385, 16777216, 1)
[430008.729] [email protected](1211384385, 16777216, 2)
[430008.736] [email protected](1211384385, 16777216, 4)
[430008.762] [email protected](1211384408, 0, 0)
[430008.771] [email protected](1211384408, 16777216, 1)
[430008.781] [email protected](1211384408, 16777216, 2)
[430008.803] [email protected](1211384408, 16777216, 4)
[430008.832] [email protected](808669761, 0, 0)
[430008.844] [email protected](808669761, 16777216, 1)
[430008.856] [email protected](808669761, 16777216, 2)
[430008.868] [email protected](808669784, 0, 0)
[430008.880] [email protected](808669784, 16777216, 1)
[430008.891] [email protected](808669784, 16777216, 2)
[430008.903] [email protected](808665665, 0, 0)
[430008.913] [email protected](808665665, 16777216, 1)
[430008.925] [email protected](808665665, 16777216, 2)
[430008.937] [email protected](808665688, 0, 0)
[430008.948] [email protected](808665688, 16777216, 1)
[430008.958] [email protected](808665688, 16777216, 2)
[430008.969] [email protected](875713089, 0, 0)
[430008.981] [email protected](875713089, 16777216, 1)
[430009.006] [email protected](875713089, 16777216, 2)
[430009.035] [email protected](875713089, 16777216, 4)
[430009.046] [email protected](875708993, 0, 0)
[430009.058] [email protected](875708993, 16777216, 1)
[430009.069] [email protected](875708993, 16777216, 2)
[430009.081] [email protected](875708993, 16777216, 4)
[430009.093] [email protected](875713112, 0, 0)
[430009.105] [email protected](875713112, 16777216, 1)
[430009.129] [email protected](875713112, 16777216, 2)
[430009.141] [email protected](875713112, 16777216, 4)
[430009.152] [email protected](875709016, 0, 0)
[430009.183] [email protected](875709016, 16777216, 1)
[430009.193] [email protected](875709016, 16777216, 2)
[430009.204] [email protected](875709016, 16777216, 4)
[430009.230] [email protected](892424769, 0, 0)
[430009.261] [email protected](892424769, 16777216, 1)
[430009.272] [email protected](892424769, 16777216, 2)
[430009.285] [email protected](909199186, 0, 0)
[430009.297] [email protected](909199186, 16777216, 1)
[430009.310] [email protected](909199186, 16777216, 2)
[430009.320] [email protected](538982482, 0, 0)
[430009.331] [email protected](538982482, 16777216, 1)
[430009.342] [email protected](538982482, 16777216, 2)
[430009.354] [email protected](540422482, 0, 0)
[430009.364] [email protected](540422482, 16777216, 1)
[430009.387] [email protected](540422482, 16777216, 2)
[430009.415] [email protected](943215175, 0, 0)
[430009.427] [email protected](943215175, 16777216, 1)
[430009.440] [email protected](943215175, 16777216, 2)
[430009.464] [email protected](842224199, 0, 0)
[430009.493] [email protected](842224199, 16777216, 1)
[430009.506] [email protected](842224199, 16777216, 2)
[430009.517] [email protected](842224199, 16777216, 4)
[430009.528] [email protected](961959257, 0, 0)
[430009.539] [email protected](961959257, 16777216, 1)
[430009.550] [email protected](961959257, 16777216, 2)
[430009.562] [email protected](825316697, 0, 0)
[430009.574] [email protected](825316697, 16777216, 1)
[430009.586] [email protected](825316697, 16777216, 2)
[430009.598] [email protected](842093913, 0, 0)
[430009.610] [email protected](842093913, 16777216, 1)
[430009.635] [email protected](842093913, 16777216, 2)
[430009.646] [email protected](909202777, 0, 0)
[430009.658] [email protected](909202777, 16777216, 1)
[430009.670] [email protected](909202777, 16777216, 2)
[430009.682] [email protected](875713881, 0, 0)
[430009.694] [email protected](875713881, 16777216, 1)
[430009.704] [email protected](875713881, 16777216, 2)
[430009.716] [email protected](961893977, 0, 0)
[430009.727] [email protected](961893977, 16777216, 1)
[430009.739] [email protected](961893977, 16777216, 2)
[430009.751] [email protected](825316953, 0, 0)
[430009.763] [email protected](825316953, 16777216, 1)
[430009.775] [email protected](825316953, 16777216, 2)
[430009.787] [email protected](842094169, 0, 0)
[430009.799] [email protected](842094169, 16777216, 1)
[430009.811] [email protected](842094169, 16777216, 2)
[430009.823] [email protected](909203033, 0, 0)
[430009.854] [email protected](909203033, 16777216, 1)
[430009.864] [email protected](909203033, 16777216, 2)
[430009.871] [email protected](875714137, 0, 0)
[430009.882] [email protected](875714137, 16777216, 1)
[430009.892] [email protected](875714137, 16777216, 2)
[430009.917] [email protected](842094158, 0, 0)
[430009.929] [email protected](842094158, 16777216, 1)
[430009.942] [email protected](842094158, 16777216, 2)
[430009.953] [email protected](808530000, 0, 0)
[430009.966] [email protected](808530000, 16777216, 1)
[430009.978] [email protected](808530000, 16777216, 2)
[430009.990] [email protected](842084432, 0, 0)
[430010.000] [email protected](842084432, 16777216, 1)
[430010.011] [email protected](842084432, 16777216, 2)
[430010.023] [email protected](909193296, 0, 0)
[430010.035] [email protected](909193296, 16777216, 1)
[430010.048] [email protected](909193296, 16777216, 2)
[430010.058] [email protected](909203022, 0, 0)
[430010.068] [email protected](909203022, 16777216, 1)
[430010.079] [email protected](909203022, 16777216, 2)
[430010.090] [email protected](1448433985, 0, 0)
[430010.103] [email protected](1448433985, 16777216, 1)
[430010.114] [email protected](1448433985, 16777216, 2)
[430010.125] [email protected](1448433985, 16777216, 4)
[430010.137] [email protected](1448434008, 0, 0)
[430010.149] [email protected](1448434008, 16777216, 1)
[430010.160] [email protected](1448434008, 16777216, 2)
[430010.171] [email protected](1448434008, 16777216, 4)
[430010.182] [email protected](1448695129, 0, 0)
[430010.211] [email protected](1448695129, 16777216, 1)
[430010.221] [email protected](1448695129, 16777216, 2)
[430010.230] [email protected](1498831189, 0, 0)
[430010.252] [email protected](1498831189, 16777216, 1)
[430010.282] [email protected](1498831189, 16777216, 2)
[430010.293] [email protected](241)
[430010.299] [email protected]("seat0")
[430010.304] [email protected](3)
[430010.310]  -> [email protected]_pointer(new id wl_pointer@6)
[430010.330]  -> [email protected]_surface(new id wl_surface@3)
[430010.355]  -> [email protected]_keyboard(new id wl_keyboard@14)
[430010.363] [email protected](0, 0, 340, 190, 0, "Unknown", "0xA029", 0)
[430010.385] [email protected](1, 3840, 2160, 60000)
[430010.428] [email protected](2)
[430010.435] [email protected]()
[5217:0312/130033.546314:FATAL:ozone_platform_wayland.cc(171)] Failed to initialize Wayland platform
[1]    5217 trace trap (core dumped)  WAYLAND_DISPLAY=wayland-0 WAYLAND_DEBUG=1 electron -i

我可能错过了,但是您的系统规格是什么?

OS: Arch Linux x86_64 
Host: XPS 15 7590 
Kernel: 5.5.8-arch1-1 
Uptime: 35 mins 
Packages: 1222 (pacman) 
Shell: zsh 5.8 
Resolution: 3840x2160 
DE: GNOME 
WM: sway 
Theme: Material-Black-Frost [GTK2/3] 
Icons: Black-Frost-Numix [GTK2/3] 
Terminal: termite 
Terminal Font: MonoLisa 11 
CPU: Intel i7-9750H (12) @ 4.500GHz 
GPU: Intel UHD Graphics 630 
GPU: NVIDIA GeForce GTX 1650 Mobile / Max-Q 
Memory: 3492MiB / 31753MiB 

我想你使用 Mesa 并且你使用的 gpu 是英特尔的,对吧?

你能不能去 ui/ozone/platform/wayland/host/wayland_connection.cc[1] 并改变这个

display_.reset(wl_display_connect(nullptr));

display_.reset(wl_display_connect("wayland-0"));
[1] https://cs.chromium.org/chromium/src/ui/ozone/platform/wayland/host/wayland_connection.cc?q=wayland_connection.cc&dr&l=58

而且,顺便说一句,您是否使用系统 libwayland 进行了 Chromium 编译? 这也可能是一个问题。

我正在使用 AUR,所以不确定 libwayland。 我正在同步 repo 以进行您建议的更改。

是的,我正在运行 Mesa/Intel,因为 Nvidia 只销售惰性块,它们只会增加 Linux 笔记本电脑的重量。

我指的是这个 - https://cs.chromium.org/chromium/src/third_party/wayland/features.gni?type=cs&q=use_system_libwayland&g=0&l=8

如果您还没有接触过那个 gn arg,请尝试将其设置为 true 并重新编译。

@msisov我已经按照您的建议和重新编译更改了两个 src 文件。 不幸的是,结果是一样的。

我还构建了 AUR 包electron-ozone并且它也失败了,但如下:

~ # GDK_BACKEND=x11 electron

[538602:0407/171819.513284:FATAL:ozone_platform_wayland.cc(171)] Failed to initialize Wayland platform
[1]    538602 trace trap (core dumped)  GDK_BACKEND=x11 electron
~ # GDK_BACKEND=wayland electron                                                                                                                                         133

(electron:538765): Gtk-WARNING **: 17:18:40.362: cannot open display: :0



md5-09c493bca06795a5a417eb676256b4ca



'blink_symbol_level=0'
'icu_use_data_file=false'
'is_component_ffmpeg=false'
'link_pulseaudio=true'
'linux_use_bundled_binutils=false'
'treat_warnings_as_errors=false'
'use_custom_libcxx=false'
'use_gnome_keyring=false'
'use_sysroot=false'
'use_ozone=true'
'ozone_auto_platforms=false'
'ozone_platform_wayland=true'
'ozone_platform_x11=true'
'use_xkbcommon=true'
'use_system_libwayland=true'
'use_system_minigbm=true'
'use_system_libdrm=true'
'use_glib=true'

我通过在8.2.1稳定版本之上重新定位 @hedgepigdaniel补丁,设法在 Wayland 下运行 Electron。

如果@hedgepigdaniel将使用这些更改更新电子臭氧AUR 包,那就太好了(如果有帮助,我可以提交拉取请求)。

编辑:电子臭氧AUR 包已更新为这些更改。

electron-ozone AUR 包对某些sway用户失败的一个可能原因可能是由于在 sway v1.4 (https://github.com/swaywm/sway/) 中删除了 xdg-shell v6 不稳定pull/4466) 这是在 Electron 7.1.8/Chromium 78 ( chromium#997631 ) 中使用的。

@vially很棒!

我已经制作了https://github.com/hedgepigdaniel/pkgbuild-electron-ozone它是 AUR 包的镜像 - 欢迎你提交 PR,我会发布它。

包已更新,谢谢@vially

可以确认新构建在sway 上工作

虽然它似乎不适用于 vscode 的code-git构建 - 我得到两个窗口code-gitCode - OSS两者都是空白的 - 但也许这是 vscode 的问题.

可以确认新构建在sway 上工作

虽然它似乎不适用于 vscode 的code-git构建 - 我得到两个窗口code-gitCode - OSS两者都是空白的 - 但也许这是 vscode 的问题.

我不认为 VSCode 已更新为与电子 8 一起使用: https :

code-git 包尚未更新为依赖于 electron7 而不是电子,这可能是一个错误。

我明白了,我尝试了更多的应用程序,比如drawio-desktop ,它们似乎与electron-ozone版本配合得很好。

是否有机会添加“rtc_use_pipewire=true”构建标志以支持 Wayland 屏幕共享?

当不在拱门上时,有哪些选择可以建造 Wayland?
电子何时与臭氧一起运输?

我不认为 VSCode 已更新为与电子 8 一起使用

太糟糕了,这是我能够使用 Wayland 的真正障碍。 不能在 XWyaland 上使用它,因为 XWayland 缩放的应用程序非常模糊。

我查看了电子 8 分支,看起来没有什么特别之处,他们只是撞了电子版本: https :

所以看起来vscode应该可以与electron 8一起使用(但可能有一些错误,因为它仍然局限于自己的分支中)。
@nostdm你能检查一下它在 Xorg 上是否更好用吗?

我确实尝试了vscodeelectron-ozone构建(上面提到的版本8.2.1 ),它确实启动了,但它有一些问题导致它经常崩溃,我不得不这样做回到 X11/XWayland 版本。

YMMV,我鼓励您尝试它,因为它的构建非常简单。 对于我的构建,我刚刚在这个 PKGBUILD中用electron替换了electron7

-- _electron=electron7
++ _electron=electron

我在vscode中看到的大多数崩溃都是由于我在chromium-ozone版本 80 中也遇到的一些错误造成的(其中大部分与工具提示有关)。 好消息是,由于 Igalia 团队的持续工作,大部分崩溃现在在chromium-ozone 81 版本中都消失了。

对我来说,如果 Electron 的第 9 版(将基于 Chromium 82 版:#22932)结果证明与 Wayland 上的 Chromium 81 一样稳定,那么我将切换到运行vscode在 Wayland 上并彻底放弃 XWayland。 或者这至少是计划 :smiley:

是否有机会添加“rtc_use_pipewire=true”构建标志以支持 Wayland 屏幕共享?

已经在新的 8.2.2 版本上做了。

谢谢! 这是个好消息。 一有机会我就试一试。

感谢您的作品@hedgepigdaniel。
我根据你的 PKGBUILD 编写了一个 Gentoo ebuild:
https://github.com/12101111/overlay/blob/master/dev-util/electron/electron-8.2.3.ebuild
它可以在wayland(sway)下运行,在加载vscode时崩溃(electron-8.0.x分支)。
它无法在 X 会话中打开:

(electron-8:17347): Gtk-WARNING **: 21:48:29.145: cannot open display: :0

臭氧平台_x11 比臭氧平台平台更不稳定吗?

@12101111 Ozone/X11 是 WIP,所以是的,它仍然很不稳定。 您能否提供有关您的 X 环境的更多详细信息? DE/WM 和版本? 我每天在不同的 DE/WM 中运行它,没有类似的问题。

@nickdiego我正在使用 Xorg 服务器 1.20.8、mesa 20.0.4、gtk 3.24.18、sway 1.4、很棒的 wm 4.3。
臭氧构建不在 X 或 Xwayland 下运行

$ GDK_BACKEND=x11 ./electron --no-sandbox

(electron:29446): Gtk-WARNING **: 10:17:14.534: cannot open display: :0
$ GDK_BACKEND=x11 ./electron --no-sandbox --gtk-debug=all --gdk-debug=all
Gtk-Message: 10:16:04.809: Failed to open display (null)
Gtk-Message: 10:16:04.809: Failed to separate connection to default display
Received signal 11 SEGV_MAPERR 000000000018
#0 0x55a48ab79f19 <unknown>
#1 0x55a48aaac243 <unknown>
#2 0x55a48ab79ad2 <unknown>
#3 0x7f23f46be160 <unknown>
#4 0x7f23f3851e80 <unknown>
#5 0x7f23f37259aa gtk_css_value_icon_theme_compute
#6 0x7f23f37483a7 _gtk_css_value_compute
#7 0x7f23f372e2b2 gtk_css_value_initial_compute
#8 0x7f23f37483a7 _gtk_css_value_compute
#9 0x7f23f372e15d gtk_css_value_inherit_compute
#10 0x7f23f37483a7 _gtk_css_value_compute
#11 0x7f23f3741094 gtk_css_static_style_compute_value
#12 0x7f23f372f428 _gtk_css_lookup_resolve
#13 0x7f23f3740ffa gtk_css_static_style_new_compute
#14 0x7f23f3740f5f gtk_css_static_style_get_default
#15 0x7f23f3730a02 gtk_css_node_init
#16 0x7f23f4580fa5 g_type_create_instance
#17 0x7f23f4571de1 g_object_new_internal
#18 0x7f23f4571838 g_object_new_with_properties
#19 0x7f23f45716a3 g_object_new
#20 0x7f23f3748608 gtk_css_widget_node_new
#21 0x7f23f38f1b5f gtk_widget_init
#22 0x7f23f4580fa5 g_type_create_instance
#23 0x7f23f4571de1 g_object_new_internal
#24 0x7f23f4571bf8 g_object_new_valist
#25 0x7f23f4571690 g_object_new
#26 0x7f23f36b3644 gtk_inspector_window_new
#27 0x7f23f390c69b gtk_window_set_debugging
#28 0x7f23f390c66a gtk_window_set_interactive_debugging
#29 0x7f23f37d3f3c gtk_init_check
#30 0x7f23f37d3f46 gtk_init
#31 0x55a48e81e106 <unknown>
#32 0x55a48e814ad2 <unknown>
#33 0x55a48e819e7b <unknown>
#34 0x55a48864637a <unknown>
#35 0x55a48a200beb <unknown>
#36 0x55a48a205068 <unknown>
#37 0x55a48a2003a6 <unknown>
#38 0x55a48a0862a4 <unknown>
#39 0x55a48a085fc3 <unknown>
#40 0x55a48c111201 <unknown>
#41 0x55a4891d0ffe <unknown>
#42 0x55a48858bcc2 <unknown>
#43 0x7f23f00ffe1b __libc_start_main
#44 0x55a48858ba6a _start
  r8: 0000000000000000  r9: 0000000000000065 r10: 0000000000000028 r11: 0000000000000000
 r12: 0000000000000000 r13: 0000213a58f820a0 r14: 0000000000000000 r15: 0000213a58f820a0
  di: 0000000000000000  si: 0000213a58e7b5b0  bp: 0000000000000003  bx: 0000000000000000
  dx: 0000213a58e7b5b0  ax: 0000000000000000  cx: fffffffd52dbbc5e  sp: 00007fff0d0d5038
  ip: 00007f23f3851e80 efl: 0000000000010206 cgf: 002b000000000033 erf: 0000000000000004
 trp: 000000000000000e msk: 0000000000000000 cr2: 0000000000000018
[end of stack trace]
Calling _exit(1). Core file will not be generated.

数据库:

$ GDK_BACKEND=x11 lldb ./electron
(lldb) target create "./electron"
Current executable set to '/tmp/electron-ozone/usr/lib64/electron-8/electron' (x86_64).
(lldb) r --no-sandbox --gtk-debug=all --gdk-debug=all
Process 26504 launched: '/tmp/electron-ozone/usr/lib64/electron-8/electron' (x86_64)
Gtk-Message: 10:12:06.866: Failed to open display (null)
Gtk-Message: 10:12:06.866: Failed to separate connection to default display
Process 26504 stopped
* thread #1, name = 'electron', stop reason = signal SIGSEGV: invalid address (fault address: 0x18)
    frame #0: 0x00007ffff711ce80 libgtk-3.so.0`_gtk_settings_get_screen(settings=0x0000000000000000) at gtksettings.c:3348:20
(lldb) bt
* thread #1, name = 'electron', stop reason = signal SIGSEGV: invalid address (fault address: 0x18)
  * frame #0: 0x00007ffff711ce80 libgtk-3.so.0`_gtk_settings_get_screen(settings=0x0000000000000000) at gtksettings.c:3348:20
    frame #1: 0x00007ffff6ff09aa libgtk-3.so.0`gtk_css_value_icon_theme_compute(icon_theme=<unavailable>, property_id=<unavailable>, provider=<unavailable>, style=<unavailable>, parent_style=<unavailable>) at gtkcssiconthemevalue.c:84:48
    frame #2: 0x00007ffff70133a7 libgtk-3.so.0`_gtk_css_value_compute(value=<unavailable>, property_id=<unavailable>, provider=<unavailable>, style=<unavailable>, parent_style=<unavailable>) at gtkcssvalue.c:97:10
    frame #3: 0x00007ffff6ff92b2 libgtk-3.so.0`gtk_css_value_initial_compute(value=<unavailable>, property_id=3, provider=0x0000000000000000, style=0x000010d49974c0a0, parent_style=0x0000000000000000) at gtkcssinitialvalue.c:73:10
    frame #4: 0x00007ffff70133a7 libgtk-3.so.0`_gtk_css_value_compute(value=<unavailable>, property_id=<unavailable>, provider=<unavailable>, style=<unavailable>, parent_style=<unavailable>) at gtkcssvalue.c:97:10
    frame #5: 0x00007ffff6ff915d libgtk-3.so.0`gtk_css_value_inherit_compute(value=<unavailable>, property_id=3, provider=<unavailable>, style=<unavailable>, parent_style=<unavailable>) at gtkcssinheritvalue.c:49:14
    frame #6: 0x00007ffff70133a7 libgtk-3.so.0`_gtk_css_value_compute(value=<unavailable>, property_id=<unavailable>, provider=<unavailable>, style=<unavailable>, parent_style=<unavailable>) at gtkcssvalue.c:97:10
    frame #7: 0x00007ffff700c094 libgtk-3.so.0`gtk_css_static_style_compute_value(style=0x000010d49974c0a0, provider=0x0000000000000000, parent_style=0x0000000000000000, id=3, specified=0x00007ffff722c230, section=0x0000000000000000) at gtkcssstaticstyle.c:237:11
    frame #8: 0x00007ffff6ffa428 libgtk-3.so.0`_gtk_css_lookup_resolve(lookup=0x000010d4995ffe00, provider=0x0000000000000000, style=0x000010d49974c0a0, parent_style=0x0000000000000000) at gtkcsslookup.c:122:9
    frame #9: 0x00007ffff700bffa libgtk-3.so.0`gtk_css_static_style_new_compute(provider=0x0000000000000000, matcher=<unavailable>, parent=0x0000000000000000) at gtkcssstaticstyle.c:195:3
    frame #10: 0x00007ffff700bf5f libgtk-3.so.0`gtk_css_static_style_get_default at gtkcssstaticstyle.c:164:23
    frame #11: 0x00007ffff6ffba02 libgtk-3.so.0`gtk_css_node_init(cssnode=0x000010d49973d1b0) at gtkcssnode.c:667:34
    frame #12: 0x00007ffff7e4bfa5 libgobject-2.0.so.0`g_type_create_instance(type=<unavailable>) at gtype.c:1861:4
    frame #13: 0x00007ffff7e3cde1 libgobject-2.0.so.0`g_object_new_internal(class=0x000010d4995e3960, params=0x0000000000000000, n_params=0) at gobject.c:1937:24
    frame #14: 0x00007ffff7e3c838 libgobject-2.0.so.0`g_object_new_with_properties(object_type=18505292407456, n_properties=0, names=0x0000000000000000, values=0x0000000000000000) at gobject.c:2105:14
    frame #15: 0x00007ffff7e3c6a3 libgobject-2.0.so.0`g_object_new(object_type=<unavailable>, first_property_name=<unavailable>) at gobject.c:1777:12
    frame #16: 0x00007ffff7013608 libgtk-3.so.0`gtk_css_widget_node_new(widget=0x000010d499748480) at gtkcsswidgetnode.c:297:12
    frame #17: 0x00007ffff71bcb5f libgtk-3.so.0`gtk_widget_init(instance=0x000010d499748480, g_class=0x000010d4995e1200) at gtkwidget.c:4468:19
    frame #18: 0x00007ffff7e4bfa5 libgobject-2.0.so.0`g_type_create_instance(type=<unavailable>) at gtype.c:1861:4
    frame #19: 0x00007ffff7e3cde1 libgobject-2.0.so.0`g_object_new_internal(class=0x000010d4995e1200, params=0x00007fffffffcbe0, n_params=1) at gobject.c:1937:24
    frame #20: 0x00007ffff7e3cbf8 libgobject-2.0.so.0`g_object_new_valist(object_type=<unavailable>, first_property_name=<unavailable>, var_args=<unavailable>) at gobject.c:2262:16
    frame #21: 0x00007ffff7e3c690 libgobject-2.0.so.0`g_object_new(object_type=<unavailable>, first_property_name=<unavailable>) at gobject.c:1780:12
    frame #22: 0x00007ffff6f7e644 libgtk-3.so.0`gtk_inspector_window_new at window.c:321:10
    frame #23: 0x00007ffff71d769b libgtk-3.so.0`gtk_window_set_debugging(enable=1, select=0, warn=0) at gtkwindow.c:12767:26
    frame #24: 0x00007ffff71d766a libgtk-3.so.0`gtk_window_set_interactive_debugging(enable=<unavailable>) at gtkwindow.c:12830:3
    frame #25: 0x00007ffff709ef3c libgtk-3.so.0`gtk_init_check(argc=<unavailable>, argv=<unavailable>) at gtkmain.c:1112:5
    frame #26: 0x00007ffff709ef46 libgtk-3.so.0`gtk_init(argc=<unavailable>, argv=<unavailable>) at gtkmain.c:1166:8
    frame #27: 0x000055555e380106 electron`___lldb_unnamed_symbol405691$$electron + 150
    frame #28: 0x000055555e376ad2 electron`___lldb_unnamed_symbol405583$$electron + 866
    frame #29: 0x000055555e37be7b electron`___lldb_unnamed_symbol405643$$electron + 27
    frame #30: 0x00005555581a837a electron`___lldb_unnamed_symbol4472$$electron + 106
    frame #31: 0x0000555559d62beb electron`___lldb_unnamed_symbol95227$$electron + 187
    frame #32: 0x0000555559d67068 electron`___lldb_unnamed_symbol95278$$electron + 648
    frame #33: 0x0000555559d623a6 electron`___lldb_unnamed_symbol95219$$electron + 182
    frame #34: 0x0000555559be82a4 electron`___lldb_unnamed_symbol89107$$electron + 692
    frame #35: 0x0000555559be7fc3 electron`___lldb_unnamed_symbol89106$$electron + 323
    frame #36: 0x000055555bc73201 electron`___lldb_unnamed_symbol226506$$electron + 3761
    frame #37: 0x0000555558d32ffe electron`___lldb_unnamed_symbol54351$$electron + 142
    frame #38: 0x00005555580edcc2 electron`___lldb_unnamed_symbol3$$electron + 450
    frame #39: 0x00007ffff39cae1b libc.so.6`__libc_start_main + 235
    frame #40: 0x00005555580eda6a electron`_start + 42

我从来没有遇到过那个特定的错误。 你能在你的环境中运行 Chromium Ozone/x11 吗? 由于它正在大量开发中,检查最新版本会很有趣。 如果是,它可能是 gtk/ozone 初始化中特定于电子的东西。 我还会查看其他用户报告的问题/修复,上面有一些评论:point_up:。 他们中的一些人在最近的版本中观察到了稳定性的提升。

_作为黑暗中的一个镜头,它可能与这个问题有关,在我的环境中,只有在尝试打开 gtk 对话框时才会导致崩溃,而不是在启动时。_

@nickdiego我想这是因为他们使用稳定频道,在他们的情况下是“80.0.3987.163”。 在 Ozone/X11/Wayland 的情况下它不可靠,因为后备箱不断发生变化。

我尝试构建chromium-83.0.4103.15,它在wayland上工作,我需要chromium --ozone-platform=x11才能在X上运行。
但是电子不能在 X 上发射:

$ ./electron --ozone-platform=x11

Electron 8.2.3 - Build cross platform desktop apps with JavaScript, HTML, and CSS
Usage: electron [options] [path]

A path to an Electron app may be specified. It must be one of the following:
  - index.js file.
  - Folder containing a package.json file.
  - Folder containing an index.js file.
  - .html/.htm file.
  - http://, https://, or file:// URL.

Options:
  -i, --interactive     Open a REPL to the main process.
  -r, --require         Module to preload (option can be repeated).
  -v, --version         Print the version.
  -a, --abi             Print the Node ABI version.
Received signal 11 SEGV_MAPERR 000000000000
#0 0x55b9f7eadf19 <unknown>
#1 0x55b9f7de0243 <unknown>
#2 0x55b9f7eadad2 <unknown>
#3 0x7fa643ba4160 <unknown>
#4 0x55b9f898ad06 <unknown>
#5 0x55b9f609f3a8 <unknown>
#6 0x55b9f91f07de <unknown>
#7 0x55b9f8dc5f09 <unknown>
#8 0x55b9fae0172b <unknown>
#9 0x55b9fae33d70 <unknown>
#10 0x55b9fae3211f <unknown>
#11 0x55b9fadfd418 <unknown>
#12 0x55b9f599a0c0 <unknown>
#13 0x55b9f599c0bb <unknown>
#14 0x55b9f592558b <unknown>
#15 0x55b9f58dffc9 <unknown>
#16 0x55b9f58e1b63 <unknown>
#17 0x55b9f58dd422 <unknown>
#18 0x55b9f58dd166 <unknown>
#19 0x55b9f58dd313 <unknown>
#20 0x55b9f6706782 <unknown>
#21 0x55b9f670589e <unknown>
#22 0x55b9f670513e <unknown>
#23 0x55b9f711dbf9 <unknown>
  r8: 0000000000000000  r9: 000000000606ece8 r10: 0000000000000018 r11: 002fc8b7156f8000
 r12: 00001497d4b9b180 r13: 00001497d4dfea80 r14: 00001497d515f510 r15: 00007fff79d10f80
  di: 00001497d531c634  si: 0000000000000001  bp: 00007fff79d10f10  bx: 00001497d515f480
  dx: 0000000000000010  ax: 0000000000000000  cx: 000055b9fc042fc8  sp: 00007fff79d10ef0
  ip: 000055b9f898ad06 efl: 0000000000010202 cgf: 002b000000000033 erf: 0000000000000004
 trp: 000000000000000e msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]
Calling _exit(1). Core file will not be generated.

@msisov是的,这是有道理的。

我尝试构建chromium-83.0.4103.15,它在wayland上工作,我需要chromium --ozone-platform=x11 在X上运行。
但是电子不能在 X 上发射:

因此,在 Gtk/Ozone 初始化中似乎存在一些特定于电子的问题。 有人可以在其他设置中确认这个问题吗? 抱歉,但我目前没有时间研究它(甚至没有本地电子构建)。

我是否需要将 Ozone_auto_platforms 更改为 true?

目前ozone_auto_platforms只是将 x11 设置为默认后端,因为我们在 Linux 桌面上仍然没有平台自动检测。

我使用 CXXFLAGS= -O1 -g构建电子 8.2.3,并使用源代码获取回溯:

$ lldb ./electron
(lldb) target create "./electron"
Current executable set to '/data/tmp/portage/dev-util/electron-8.2.3/image/usr/lib/electron-8/electron' (x86_64).
(lldb) r --ozone-platform=x11
Process 823 launched: '/data/tmp/portage/dev-util/electron-8.2.3/image/usr/lib/electron-8/electron' (x86_64)
Process 823 stopped and restarted: thread 1 received signal: SIGCHLD

Electron 8.2.3 - Build cross platform desktop apps with JavaScript, HTML, and CSS
Usage: electron [options] [path]

A path to an Electron app may be specified. It must be one of the following:
  - index.js file.
  - Folder containing a package.json file.
  - Folder containing an index.js file.
  - .html/.htm file.
  - http://, https://, or file:// URL.

Options:
  -i, --interactive     Open a REPL to the main process.
  -r, --require         Module to preload (option can be repeated).
  -v, --version         Print the version.
  -a, --abi             Print the Node ABI version.
Process 823 stopped
* thread #1, name = 'electron', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
    frame #0: 0x00005555636e2a11 electron`ui::InputMethodAuraLinux::InputMethodAuraLinux(this=0x000055556836a480, delegate=<unavailable>) at input_method_auralinux.cc:35:51
   32         << "Trying to initialize InputMethodAuraLinux, but "
   33            "LinuxInputMethodContextFactory is not initialized yet.";
   34     context_ =
-> 35         LinuxInputMethodContextFactory::instance()->CreateInputMethodContext(
   36             this, false);
   37     context_simple_ =
   38         LinuxInputMethodContextFactory::instance()->CreateInputMethodContext(
(lldb) bt
* thread #1, name = 'electron', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
  * frame #0: 0x00005555636e2a11 electron`ui::InputMethodAuraLinux::InputMethodAuraLinux(this=0x000055556836a480, delegate=<unavailable>) at input_method_auralinux.cc:35:51
    frame #1: 0x000055555e778750 electron`std::__1::__unique_if<ui::InputMethodAuraLinux>::__unique_single std::__1::make_unique<ui::InputMethodAuraLinux, ui::internal::InputMethodDelegate*&>(__args=<unavailable>) at memory:3028:32
    frame #2: 0x000055555e79d9b2 electron`ui::(anonymous namespace)::OzonePlatformX11::CreateInputMethod(this=<unavailable>, delegate=0x0000555568501020) at ozone_platform_x11.cc:115:12
    frame #3: 0x0000555564241a20 electron`ui::CreateInputMethod(delegate=<unavailable>, widget=<unavailable>) at input_method_factory.cc:69:44
    frame #4: 0x0000555563be4da2 electron`aura::WindowTreeHost::GetInputMethod(this=0x0000555568501020) at window_tree_host.cc:276:9
    frame #5: 0x00005555665a0f53 electron`views::DesktopNativeWidgetAura::GetInputMethod(this=0x0000555568507240) at desktop_native_widget_aura.cc:693:27
    frame #6: 0x0000555566558db6 electron`views::Widget::GetInputMethod(this=0x0000555568369c80) at widget.cc:814:37
    frame #7: 0x000055556655a26b electron`views::Widget::OnNativeWidgetSizeChanged(this=0x0000555568369c80, new_size=0x00007fffffffb4a8) at widget.cc:1202:28
    frame #8: 0x00005555665a2343 electron`views::DesktopNativeWidgetAura::OnHostResized(this=<unavailable>, host=<unavailable>) at desktop_native_widget_aura.cc:1250:28
    frame #9: 0x00005555665a0858 electron`views::DesktopNativeWidgetAura::InitNativeWidget(this=0x0000555568507240, params=InitParams @ 0x00007fffffffb540) at desktop_native_widget_aura.cc:552:3
    frame #10: 0x000055556655766a electron`views::Widget::Init(this=0x0000555568369c80, params=InitParams @ 0x00007fffffffb958) at widget.cc:353:19
    frame #11: 0x000055555dc7f316 electron`electron::NativeWindowViews::NativeWindowViews(this=0x000055556843ae20, options=<unavailable>, parent=<unavailable>) at native_window_views.cc:206:13
    frame #12: 0x000055555dc8116b electron`electron::NativeWindow::Create(options=<unavailable>, parent=<unavailable>) at native_window_views.cc:1484:14
    frame #13: 0x000055555db98cb7 electron`electron::api::TopLevelWindow::TopLevelWindow(this=<unavailable>, isolate=0x00005555687a28c0, options=0x00007fffffffbde0) at electron_api_top_level_window.cc:96:17
    frame #14: 0x000055555db11647 electron`electron::api::BrowserWindow::BrowserWindow(this=0x00005555685f32a0, args=0x00007fffffffbf20, options=0x00007fffffffbde0) at electron_api_browser_window.cc:34:7
    frame #15: 0x000055555db12e32 electron`electron::api::BrowserWindow::New(thrower=<unavailable>, args=0x00007fffffffbf20) at electron_api_browser_window.cc:464:14
    frame #16: 0x000055555db09d7c electron`mate::WrappableBase* base::internal::FunctorTraits<mate::WrappableBase* (*)(gin_helper::ErrorThrower, gin::Arguments*), void>::Invoke<mate::WrappableBase* (function=<unavailable>, args=<unavailable>, args=<unavailable>)(gin_helper::ErrorThrower, gin::Arguments*), gin_helper::ErrorThrower, gin::Arguments*>(mate::WrappableBase* (* const&)(gin_helper::ErrorThrower, gin::Arguments*), gin_helper::ErrorThrower&&, gin::Arguments*&&) at bind_internal.h:398:12
    frame #17: 0x000055555db09d19 electron`mate::WrappableBase* base::internal::InvokeHelper<false, mate::WrappableBase*>::MakeItSo<mate::WrappableBase* (functor=<unavailable>, args=<unavailable>, args=<unavailable>)(gin_helper::ErrorThrower, gin::Arguments*), gin_helper::ErrorThrower, gin::Arguments*>(mate::WrappableBase* (* const&)(gin_helper::ErrorThrower, gin::Arguments*), gin_helper::ErrorThrower&&, gin::Arguments*&&) at bind_internal.h:598:12
    frame #18: 0x000055555db09cc9 electron`mate::WrappableBase* base::internal::Invoker<base::internal::BindState<mate::WrappableBase* (*)(gin_helper::ErrorThrower, gin::Arguments*)>, mate::WrappableBase* (gin_helper::ErrorThrower, gin::Arguments*)>::RunImpl<mate::WrappableBase* (functor=<unavailable>, bound=<unavailable>, (null)=<unavailable>, unbound_args=<unavailable>, unbound_args=<unavailable>)(gin_helper::ErrorThrower, gin::Arguments*), std::__1::tuple<> const&>(mate::WrappableBase* (* const&)(gin_helper::ErrorThrower, gin::Arguments*), std::__1::tuple<> const&, std::__1::integer_sequence<unsigned long>, gin_helper::ErrorThrower&&, gin::Arguments*&&) at bind_internal.h:671:12
    frame #19: 0x000055555db09c7b electron`base::internal::Invoker<base::internal::BindState<mate::WrappableBase* (*)(gin_helper::ErrorThrower, gin::Arguments*)>, mate::WrappableBase* (gin_helper::ErrorThrower, gin::Arguments*)>::Run(base=<unavailable>, unbound_args=<unavailable>, unbound_args=0x00007fffffffbf20) at bind_internal.h:653:12
    frame #20: 0x000055555db09b5c electron`base::RepeatingCallback<mate::WrappableBase* (gin_helper::ErrorThrower, gin::Arguments*)>::Run(this=<unavailable>, args=<unavailable>, args=0x00007fffffffbf20) const & at callback.h:132:12
    frame #21: 0x000055555db09a77 electron`mate::WrappableBase* mate::internal::InvokeFactory<gin_helper::ErrorThrower, gin::Arguments*>(args=<unavailable>, callback=0x000055556829ba68)> const&) at constructor.h:50:19
    frame #22: 0x000055555db09145 electron`void mate::internal::InvokeNew<mate::WrappableBase* (gin_helper::ErrorThrower, gin::Arguments*)>(factory=0x000055556829ba68, isolate=0x00005555687a28c0, args=0x00007fffffffc1c0)> const&, v8::Isolate*, mate::Arguments*) at constructor.h:143:14
    frame #23: 0x000055555db09829 electron`void base::internal::FunctorTraits<void (*)(base::RepeatingCallback<mate::WrappableBase* (gin_helper::ErrorThrower, gin::Arguments*)> const&, v8::Isolate*, mate::Arguments*), void>::Invoke<void (function=<unavailable>, args=<unavailable>, args=<unavailable>, args=<unavailable>)(base::RepeatingCallback<mate::WrappableBase* (gin_helper::ErrorThrower, gin::Arguments*)> const&, v8::Isolate*, mate::Arguments*), base::RepeatingCallback<mate::WrappableBase* (gin_helper::ErrorThrower, gin::Arguments*)> const&, v8::Isolate*, mate::Arguments*>(void (* const&)(base::RepeatingCallback<mate::WrappableBase* (gin_helper::ErrorThrower, gin::Arguments*)> const&, v8::Isolate*, mate::Arguments*), base::RepeatingCallback<mate::WrappableBase* (gin_helper::ErrorThrower, gin::Arguments*)> const&, v8::Isolate*&&, mate::Arguments*&&) at bind_internal.h:398:12
    frame #24: 0x000055555db0977e electron`void base::internal::InvokeHelper<false, void>::MakeItSo<void (functor=<unavailable>, args=<unavailable>, args=<unavailable>, args=<unavailable>)(base::RepeatingCallback<mate::WrappableBase* (gin_helper::ErrorThrower, gin::Arguments*)> const&, v8::Isolate*, mate::Arguments*), base::RepeatingCallback<mate::WrappableBase* (gin_helper::ErrorThrower, gin::Arguments*)> const&, v8::Isolate*, mate::Arguments*>(void (* const&)(base::RepeatingCallback<mate::WrappableBase* (gin_helper::ErrorThrower, gin::Arguments*)> const&, v8::Isolate*, mate::Arguments*), base::RepeatingCallback<mate::WrappableBase* (gin_helper::ErrorThrower, gin::Arguments*)> const&, v8::Isolate*&&, mate::Arguments*&&) at bind_internal.h:598:12
    frame #25: 0x000055555db0971e electron`void base::internal::Invoker<base::internal::BindState<void (*)(base::RepeatingCallback<mate::WrappableBase* (gin_helper::ErrorThrower, gin::Arguments*)> const&, v8::Isolate*, mate::Arguments*), base::RepeatingCallback<mate::WrappableBase* (gin_helper::ErrorThrower, gin::Arguments*)> >, void (v8::Isolate*, mate::Arguments*)>::RunImpl<void (functor=<unavailable>, bound=<unavailable>, (null)=<unavailable>, unbound_args=<unavailable>, unbound_args=<unavailable>)(base::RepeatingCallback<mate::WrappableBase* (gin_helper::ErrorThrower, gin::Arguments*)> const&, v8::Isolate*, mate::Arguments*), std::__1::tuple<base::RepeatingCallback<mate::WrappableBase* (gin_helper::ErrorThrower, gin::Arguments*)> > const&, 0ul>(void (* const&)(base::RepeatingCallback<mate::WrappableBase* (gin_helper::ErrorThrower, gin::Arguments*)> const&, v8::Isolate*, mate::Arguments*), std::__1::tuple<base::RepeatingCallback<mate::WrappableBase* (gin_helper::ErrorThrower, gin::Arguments*)> > const&, std::__1::integer_sequence<unsigned long, 0ul>, v8::Isolate*&&, mate::Arguments*&&) at bind_internal.h:671:12
    frame #26: 0x000055555db096b3 electron`base::internal::Invoker<base::internal::BindState<void (*)(base::RepeatingCallback<mate::WrappableBase* (gin_helper::ErrorThrower, gin::Arguments*)> const&, v8::Isolate*, mate::Arguments*), base::RepeatingCallback<mate::WrappableBase* (gin_helper::ErrorThrower, gin::Arguments*)> >, void (v8::Isolate*, mate::Arguments*)>::Run(base=<unavailable>, unbound_args=0x00005555687a28c0, unbound_args=0x00007fffffffc1c0) at bind_internal.h:653:12
    frame #27: 0x000055555db0951c electron`base::RepeatingCallback<void (v8::Isolate*, mate::Arguments*)>::Run(this=<unavailable>, args=0x00005555687a28c0, args=0x00007fffffffc1c0) const & at callback.h:132:12
    frame #28: 0x000055555db0944c electron`mate::internal::Invoker<mate::internal::IndicesHolder<0ul, 1ul>, v8::Isolate*, mate::Arguments*>::DispatchToCallback(this=<unavailable>, callback=<unavailable>)>) at function_template.h:209:14
    frame #29: 0x000055555db092d8 electron`mate::internal::Dispatcher<void (v8::Isolate*, mate::Arguments*)>::DispatchToCallback(info=<unavailable>) at function_template.h:243:15
    frame #30: 0x000055555f8d3095 electron`v8::internal::FunctionCallbackArguments::Call(this=0x00007fffffffc3c0, handler=CallHandlerInfo @ 0x00007fffffffc270) at api-arguments-inl.h:158:3
    frame #31: 0x000055555f8d19e3 electron`v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<true>(isolate=<unavailable>, function=<unavailable>, new_target=<unavailable>, fun_data=<unavailable>, receiver=<unavailable>, args=BuiltinArguments @ 0x00007fffffffc490) at builtins-api.cc:111:36
    frame #32: 0x000055555f8d0d58 electron`v8::internal::Builtin_Impl_HandleApiCall(args=BuiltinArguments @ 0x00007fffffffc4d0, isolate=0x00005555687a28c0) at builtins-api.cc:137:5
    frame #33: 0x000055555f8d09a9 electron`v8::internal::Builtin_HandleApiCall(args_length=6, args_object=0x00007fffffffc5d0, isolate=0x00005555687a28c0) at builtins-api.cc:129:1
    frame #34: 0x00005555605fbf39 electron`Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit + 57
    frame #35: 0x00005555605876a1 electron`Builtins_JSBuiltinsConstructStub + 97
    frame #36: 0x0000555560673fdb electron`Builtins_ConstructHandler + 187
    frame #37: 0x000055556058b9d8 electron`Builtins_InterpreterEntryTrampoline + 184
    frame #38: 0x00005555605b9b10 electron`Builtins_AsyncFunctionAwaitResolveClosure + 48
    frame #39: 0x00005555605db2f2 electron`Builtins_PromiseFulfillReactionJob + 50
    frame #40: 0x00005555605ab888 electron`Builtins_RunMicrotasks + 552
    frame #41: 0x0000555560589238 electron`Builtins_JSRunMicrotasksEntry + 120
    frame #42: 0x000055555f9f0200 electron`v8::internal::GeneratedCode<unsigned long, unsigned long, v8::internal::MicrotaskQueue*>::Call(this=<unavailable>, args=<unavailable>, args=<unavailable>) at simulator.h:142:12
    frame #43: 0x000055555f9eef4d electron`v8::internal::(anonymous namespace)::Invoke(isolate=0x00005555687a28c0, params=0x00007fffffffca18)::InvokeParams const&) at execution.cc:281:33
    frame #44: 0x000055555f9ef895 electron`v8::internal::(anonymous namespace)::InvokeWithTryCatch(isolate=0x00005555687a28c0, params=0x00007fffffffca18)::InvokeParams const&) at execution.cc:326:20
    frame #45: 0x000055555f9efa6e electron`v8::internal::Execution::TryRunMicrotasks(isolate=0x00005555687a28c0, microtask_queue=<unavailable>, exception_out=<unavailable>) at execution.cc:405:10
    frame #46: 0x000055555fa25acf electron`v8::internal::MicrotaskQueue::RunMicrotasks(this=0x0000555568435180, isolate=0x00005555687a28c0) at microtask-queue.cc:164:22
    frame #47: 0x000055555fa25839 electron`v8::internal::MicrotaskQueue::PerformCheckpoint(this=0x0000555568435180, v8_isolate=0x00005555687a28c0) at microtask-queue.cc:117:5
    frame #48: 0x000055555f862819 electron`v8::MicrotasksScope::PerformCheckpoint(v8_isolate=0x00005555687a28c0) at api.cc:9202:20
    frame #49: 0x000055555dc7a645 electron`electron::MicrotasksRunner::DidProcessTask(this=0x00005555682dbde0, pending_task=<unavailable>) at microtasks_runner.cc:18:3
    frame #50: 0x00005555627ca874 electron`base::sequence_manager::internal::SequenceManagerImpl::NotifyDidProcessTask(this=<unavailable>, executing_task=0x00007fffef864360, time_after_task=<unavailable>) at sequence_manager_impl.cc:867:16
    frame #51: 0x00005555627ca4ab electron`base::sequence_manager::internal::SequenceManagerImpl::DidRunTask(this=0x000055556803cde0) at sequence_manager_impl.cc:678:3
    frame #52: 0x00005555627e576e electron`base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(this=<unavailable>, continuation_lazy_now=0x00007fffffffce60, ran_task=0x00007fffffffceaf) at thread_controller_with_message_pump_impl.cc:378:37
    frame #53: 0x00005555627e5436 electron`base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoSomeWork(this=0x00007fffef85d9e0) at thread_controller_with_message_pump_impl.cc:219:7
    frame #54: 0x00005555627560c7 electron`base::MessagePumpGlib::Run(this=0x00007ffff1e89f20, delegate=<unavailable>) at message_pump_glib.cc:441:48
    frame #55: 0x00005555627e5e31 electron`base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(this=0x00007fffef85d9e0, application_tasks_allowed=true, timeout=(delta_ = 9223372036854775807)) at thread_controller_with_message_pump_impl.cc:463:12
    frame #56: 0x00005555627944c0 electron`base::RunLoop::Run(this=0x00007fffffffd060) at run_loop.cc:156:14
    frame #57: 0x0000555560c83a78 electron`content::BrowserMainLoop::MainMessageLoopRun(this=<unavailable>) at browser_main_loop.cc:1535:12
    frame #58: 0x0000555560c838b8 electron`content::BrowserMainLoop::RunMainMessageLoopParts(this=0x00005555680e2360) at browser_main_loop.cc:1062:5
    frame #59: 0x0000555560c8babd electron`content::BrowserMainRunnerImpl::Run(this=<unavailable>) at browser_main_runner_impl.cc:150:15
    frame #60: 0x0000555560c80f42 electron`content::BrowserMain(parameters=<unavailable>) at browser_main.cc:47:28
    frame #61: 0x00005555609b97db electron`content::RunBrowserProcessMain(main_function_params=0x00007fffffffd2e0, delegate=<unavailable>) at content_main_runner_impl.cc:527:10
    frame #62: 0x00005555609ba399 electron`content::ContentMainRunnerImpl::RunServiceManager(this=0x00007fffef922160, main_params=<unavailable>, start_service_manager_only=<unavailable>) at content_main_runner_impl.cc:960:10
    frame #63: 0x00005555609ba0db electron`content::ContentMainRunnerImpl::Run(this=0x00007fffef922160, start_service_manager_only=false) at content_main_runner_impl.cc:868:12
    frame #64: 0x000055555f24461f electron`content::ContentServiceManagerMainDelegate::RunEmbedderProcess(this=0x00007fffffffd5c0) at content_service_manager_main_delegate.cc:52:32
    frame #65: 0x00005555645ce0f3 electron`service_manager::Main(params=<unavailable>) at main.cc:423:29
    frame #66: 0x000055555f2469be electron`content::ContentMain(params=0x00007fffffffd660) at content_main.cc:19:10
    frame #67: 0x000055555dac9ffa electron`main(argc=2, argv=0x00007fffffffd768) at electron_main.cc:189:10

我认为https://github.com/chromium/chromium/commit/182d586fee5b5f9053b5702fcfc847f18ea5ec79将解决此问题,我将尝试将此修复程序向后移植到铬 80
编辑:应用此补丁后发生另一次崩溃

$ lldb ./electron
(lldb) target create "./electron"
Current executable set to '/data/tmp/portage/dev-util/electron-8.2.3/image/usr/lib/electron-8/electron' (x86_64).
(lldb) r --ozone-platform=x11
Process 15986 launched: '/data/tmp/portage/dev-util/electron-8.2.3/image/usr/lib/electron-8/electron' (x86_64)
Process 15986 stopped and restarted: thread 1 received signal: SIGCHLD

Electron 8.2.3 - Build cross platform desktop apps with JavaScript, HTML, and CSS
Usage: electron [options] [path]

A path to an Electron app may be specified. It must be one of the following:
  - index.js file.
  - Folder containing a package.json file.
  - Folder containing an index.js file.
  - .html/.htm file.
  - http://, https://, or file:// URL.

Options:
  -i, --interactive     Open a REPL to the main process.
  -r, --require         Module to preload (option can be repeated).
  -v, --version         Print the version.
  -a, --abi             Print the Node ABI version.
Process 15986 stopped
* thread #1, name = 'electron', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
    frame #0: 0x00005555665a03f4 electron`views::DesktopNativeWidgetAura::HandleActivationChanged(this=0x00005555683a9840, active=true) at desktop_native_widget_aura.cc:417:25
   414            view_for_activation->GetWidget()->GetNativeView());
   415        // Refreshes the focus info to IMF in case that IMF cached the old info
   416        // about focused text input client when it was "inactive".
-> 417        GetInputMethod()->OnFocus();
   418      }
   419    } else {
   420      // TODO(nektar): We need to harmonize the firing of accessibility
(lldb) bt
* thread #1, name = 'electron', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
  * frame #0: 0x00005555665a03f4 electron`views::DesktopNativeWidgetAura::HandleActivationChanged(this=0x00005555683a9840, active=true) at desktop_native_widget_aura.cc:417:25
    frame #1: 0x00005555665b82f5 electron`views::DesktopWindowTreeHostPlatform::OnActivationChanged(this=0x000055556834c400, active=<unavailable>) at desktop_window_tree_host_platform.cc:688:32
    frame #2: 0x00005555665abbd2 electron`views::DesktopWindowTreeHostLinux::OnActivationChanged(this=0x000055556834c400, active=true) at desktop_window_tree_host_linux.cc:291:34
    frame #3: 0x00005555636f2301 electron`ui::X11Window::OnXWindowIsActiveChanged(this=<unavailable>, active=<unavailable>) at x11_window.cc:607:30
    frame #4: 0x000055556353e8c6 electron`ui::XWindow::AfterActivationStateChanged(this=0x0000555568789e28) at x11_window.cc:923:5
    frame #5: 0x000055556353fa94 electron`ui::XWindow::OnFocusEvent(this=0x0000555568789e28, focus_in=<unavailable>, mode=<unavailable>, detail=3) at x11_window.cc:1040:3
    frame #6: 0x000055556353fc3c electron`ui::XWindow::ProcessEvent(this=0x0000555568789e28, xev=0x00007fffffffccc0) at x11_window.cc:1145:7
    frame #7: 0x000055555e7a8b98 electron`ui::X11WindowOzone::DispatchXEvent(this=<unavailable>, xev=0x00007fffffffccc0) at x11_window_ozone.cc:66:12
    frame #8: 0x00005555635c8ad3 electron`ui::X11EventSourceDefault::DispatchXEventToXEventDispatchers(this=0x00005555683a5c40, xevent=0x00007fffffffccc0) at x11_event_source_default.cc:136:22
    frame #9: 0x00005555635c8772 electron`ui::X11EventSourceDefault::ProcessXEvent(this=0x00005555683a5c40, xevent=0x00007fffffffccc0) at x11_event_source_default.cc:90:5
    frame #10: 0x00005555635c226c electron`ui::X11EventSource::ExtractCookieDataDispatchEvent(this=0x00005555683a5cc8, xevent=0x00007fffffffccc0) at x11_event_source.cc:273:14
    frame #11: 0x00005555635c2211 electron`ui::X11EventSource::DispatchXEvents(this=0x00005555683a5cc8) at x11_event_source.cc:140:5
    frame #12: 0x00005555635c8c70 electron`ui::X11EventSourceDefault::OnFileCanReadWithoutBlocking(this=<unavailable>, fd=<unavailable>) at x11_event_source_default.cc:165:17
    frame #13: 0x0000555562755f92 electron`base::MessagePumpGlib::FdWatchController::NotifyCanRead(this=<unavailable>) at message_pump_glib.cc:333:13
    frame #14: 0x000055556275634f electron`base::MessagePumpGlib::HandleFdWatchDispatch(this=<unavailable>, controller=0x00005555683a5d50) at message_pump_glib.cc:502:17
    frame #15: 0x00005555627564bd electron`base::(anonymous namespace)::FdWatchSourceDispatch(gsource=<unavailable>, unused_func=<unavailable>, unused_data=<unavailable>)(void*), void*) at message_pump_glib.cc:194:17
    frame #16: 0x00007ffff7e4d585

有谁知道如何编译电子来支持韦兰本地? (逐步)并在wayland(韦斯顿等...)中运行电子应用程序。
编译电子花了几个小时,我失败了很多次。

@caijw ,您可能不是PKGBUILD 的电子臭氧以获取构建它的线索。 我的理解是它仍然非常具有实验性。

vscode 将在下一个版本中跳过电子 8 并使用电子 9,该版本基于铬 83,并且与臭氧-韦兰和臭氧-x11 一起工作非常稳定。 但是电子 9 仍然需要一些补丁来编译臭氧

Chromium 内置臭氧标志即将推出https://bugs.chromium.org/p/chromium/issues/detail?id=1085700

这是我的 WIP 尝试在 v9.xx 上重新设置我的电子路分支: https :

目前它足以运行electron-quick-start ,但其他的不多。 最常见的症状是不出现窗口。

我还更新了https://aur.archlinux.org/packages/electron-ozone/

如果有人能找出问题所在,我会很乐意提供帮助 - 随时对我的叉子进行 PR。 也可以随意使用我的补丁并将它们变成抛光/可合并的东西 - 我真的没有时间自己做这一切。

感谢您为@hedgepigdaniel 打补丁。
我已经编译它并发现了一些问题:

  1. 无法关闭窗口(在 AUR 中提到)
  2. 运行electron-9 --ozone-platform=wayland但窗口没有出现。 electron-9 --ozone-platform=x11无需探针即可工作
  3. vscode 需要环境变量ELECTRON_RUN_AS_NODE=1才能启动,但是ELECTRON_RUN_AS_NODE=1 electron-9 --ozone-platform=x11出现错误: electron-9: bad option: --ozone-platform=x11
  4. 拖放不起作用(例如:文件资源管理器或 vscode 中的选项卡)

图片

我使用 arch 软件包进行了更多测试,

它可以工作,没有任何空窗口或任何东西。 我发现的主要问题是,如果您在应用程序菜单内使用鼠标滚轮滚动,所有窗口都会消失。 我认为这个错误已在更新的铬版本中得到修复。

@hedgepigdaniel我认为你在 Electron 上的补丁完全可以包含在上游,你有兴趣创建一个 PR 来合并主分支的更改吗?

有人有 Ubuntu 构建文件吗? 我愿意帮助修复 Wayland 错误 :)
有人知道顺便说一句。 哪个组件打破了拖放支持? 铬、臭氧、电子还是 vscode?

@hedgepigdaniel关闭窗口和菜单有什么问题? 如果我想修复,我可以从什么开始?

@ninja- 拖放在 Linux 上的 Chromium 上不起作用,所以我认为这不是电子或 vscode 错误。

@ninja- 拖放在 Linux 上的 Chromium 上不起作用,所以我认为这不是电子或 vscode 错误。

@WhyNotHugo您使用的是 Chromium Ozone/Wayland 的哪个版本(或头部提交)? 我有一个全新的主干,DnD 工作得很好。

我使用的是 Chromium 85.0.4183.83,但不是 Ozone 版本。 我没有资源从源代码构建 Ozone 版本。

@WhyNotHugo我们有好消息要告诉你 :) Ozone 现在默认为 Chromium 构建(今天第三次合并补丁🤣)。 很快,它也应该成为 dev chrome 版本的一部分。

https://chromium-review.googlesource.com/c/chromium/src/+/2382834

不过,补丁可能会再次恢复。 我们需要等待几天,直到它坚持。

一个月前我尝试用臭氧从头开始构建铬,结果一团糟:/无法编译

@nickdiego窗口关闭问题也解决了吗?

@ninja- 我对您无法编译臭氧感到非常惊讶和抱歉。 但是,我们开发人员每天都这样做,没有任何问题。

你使用了什么样的指导方针? 您是否从上游编译臭氧? 还是您使用了一些第三方食谱? 请注意,我们不对这些负责,它们正在维护下游项目。

我使用的是 Chromium 85.0.4183.83,但不是 Ozone 版本。 我没有资源从源代码构建 Ozone 版本。

明白了。 所以在这种情况下,Chromium X11/XWayland。 我在 Sway 下也遇到了 XWayland 的一些问题:( 例如:标签拖动完全损坏等。

@nickdiego窗口关闭问题也解决了吗?

@ninja- 哪一个? 你在 crbug.com 上报告过吗? 我们最近一直在修复许多错误,其中一些与弹出窗口有关。

@nickdiego我没有经历过,只是从 AUR 的评论中阅读,说这是一个主要的障碍

它在这里就像一个魅力。 Electron wayland native 给我带来了很多安慰,感谢(AUR + recompile vscodium)

作为 Electron 应用程序维护者,在这里非常兴奋。

这是否意味着未来的电子版本将直接支持 Wayland,还是我必须为我的应用程序做一些特别的事情?

你们都很了不起。

我最近用 Gnome 在 Wayland 上进行了测试,但是窗口周围没有任何框架。

@MyIsaak您是否使用了以前的用户数据目录? 我认为答案是肯定的。 您的 chrome 设置是否从旧数据目录中设置为“使用系统标题栏和边框”? 如果是,那是意料之中的,因为 xdg-decorations 支持正在进行中。

@msisov我只是再次重建整个项目,但结果仍然相同。 我是否需要在构建之前更改 chrome 设置,因为我只在构建之后才这样做?

默认情况下,chrome 会尝试重用您现有的用户数据目录。

尝试使用空的东西。 例如。 - --user-data-dir=/tmp/blah

@msisov好的,它可以切换到无框/无边框版本,除了关闭窗口(除非我按 ALT+F4)。 VSCode 也通过在settings.json设置"window.titleBarStyle": "custom"以同样的方式工作。 谢谢您的帮助!

我尝试了具有臭氧支持的主铬并在 gnome shell 上运行它会导致 100% 的 CPU 使用率永远和铬不启动:(
它在韦斯顿开始很好:(

操作系统:Ubuntu 20.04

@ninja- ,请使用 WAYLAND_DEBUG=1 运行并将日志粘贴到此处。 可能与https://crbug.com/1123382相关。 修复在路上。

@msisov是的,就是这样! 你能不能顺便说一句。 当 gnome shell 断开您的 Wayland 连接时,是否正确处理该案例? 因为目前它只是以 100% cpu 继续旋转 eventfd :/

[1894729.120]  -> [email protected]_registry(new id wl_registry@2)
[1894738.037]  -> [email protected](new id wl_callback@3)
[1894738.116] [email protected]_id(3)
[1894738.146] [email protected](1, "wl_drm", 2)
[1894738.160]  -> [email protected](1, "wl_drm", 2, new id [unknown]@4)
[1894738.181]  -> [email protected](new id wl_callback@5)
[1894738.186] [email protected](2, "wl_compositor", 4)
[1894738.195]  -> [email protected](2, "wl_compositor", 4, new id [unknown]@6)
[1894738.212] [email protected](3, "wl_shm", 1)
[1894738.218]  -> [email protected](3, "wl_shm", 1, new id [unknown]@7)
[1894738.231] [email protected](4, "wl_output", 2)
[1894738.242]  -> [email protected](4, "wl_output", 2, new id [unknown]@8)
[1894738.252] [email protected](5, "wl_output", 2)
[1894738.258]  -> [email protected](5, "wl_output", 2, new id [unknown]@9)
[1894738.275] [email protected](6, "zxdg_output_manager_v1", 3)
[1894738.282] [email protected](7, "wl_data_device_manager", 3)
[1894738.293]  -> [email protected](7, "wl_data_device_manager", 3, new id [unknown]@10)
[1894738.308] [email protected](8, "zwp_primary_selection_device_manager_v1", 1)
[1894738.319] [email protected](9, "gtk_primary_selection_device_manager", 1)
[1894738.328]  -> [email protected](9, "gtk_primary_selection_device_manager", 1, new id [unknown]@11)
[1894738.349] [email protected](10, "wl_subcompositor", 1)
[1894738.358]  -> [email protected](10, "wl_subcompositor", 1, new id [unknown]@12)
[1894738.370] [email protected](11, "xdg_wm_base", 3)
[1894738.382]  -> [email protected](11, "xdg_wm_base", 1, new id [unknown]@13)
[1894738.396] [email protected](12, "zxdg_shell_v6", 1)
[1894738.406]  -> [email protected](12, "zxdg_shell_v6", 1, new id [unknown]@14)
[1894738.418] [email protected](13, "wl_shell", 1)
[1894738.429] [email protected](14, "gtk_shell1", 3)
[1894738.438] [email protected](15, "wp_viewporter", 1)
[1894738.447] [email protected](16, "zwp_pointer_gestures_v1", 1)
[1894738.457] [email protected](17, "zwp_tablet_manager_v2", 1)
[1894738.465] [email protected](18, "wl_seat", 5)
[1894738.476]  -> [email protected](18, "wl_seat", 4, new id [unknown]@15)
[1894738.491]  -> [email protected]_data_device(new id wl_data_device<strong i="7">@16</strong>, wl_seat@15)
[1894738.510] [email protected](19, "zwp_relative_pointer_manager_v1", 1)
[1894738.520] [email protected](20, "zwp_pointer_constraints_v1", 1)
[1894738.531] [email protected](21, "zxdg_exporter_v1", 1)
[1894738.539] [email protected](22, "zxdg_importer_v1", 1)
[1894738.548] [email protected](23, "zwp_linux_dmabuf_v1", 3)
[1894738.559]  -> [email protected](23, "zwp_linux_dmabuf_v1", 3, new id [unknown]@17)
[1894738.573]  -> [email protected](new id wl_callback@18)
[1894738.579] [email protected](24, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[1894738.593] [email protected](25, "zwp_text_input_manager_v3", 1)
[1894738.604] [email protected](26, "gtk_text_input_manager", 1)
[1894738.618] [email protected](152130)
[1894738.728] [email protected]_id(5)
[1894738.732] [email protected]_id(18)
[1894738.737] [email protected]("/dev/dri/card0")
[1894738.903]  -> [email protected](4)
[1894738.908]  -> [email protected](new id wl_callback@3)
[1894738.914] [email protected](808669761)
[1894738.920] [email protected](808669784)
[1894738.925] [email protected](808665665)
[1894738.930] [email protected](808665688)
[1894738.932] [email protected](875713089)
[1894738.936] [email protected](875713112)
[1894738.940] [email protected](909199186)
[1894738.944] [email protected](961959257)
[1894738.948] [email protected](825316697)
[1894738.952] [email protected](842093913)
[1894738.955] [email protected](909202777)
[1894738.961] [email protected](875713881)
[1894738.965] [email protected](842094158)
[1894738.970] [email protected](909203022)
[1894738.976] [email protected](1448695129)
[1894738.981] [email protected](1)
[1894738.985] [email protected](152130)
[1894738.989] [email protected](1920, 0, 530, 300, 0, "DEL", "DELL P2419H", 0)
[1894739.009] [email protected](3, 1920, 1080, 60000)
[1894739.020] [email protected](1)
[1894739.024] [email protected]()
[1894739.028] [email protected](0, 0, 530, 300, 0, "DEL", "DELL P2419H", 0)
[1894739.046] [email protected](3, 1920, 1080, 60000)
[1894739.057] [email protected](1)
[1894739.060] [email protected]()
[1894739.064] [email protected](3)
[1894739.069]  -> [email protected]_pointer(new id wl_pointer@5)
[1894739.076]  -> [email protected]_surface(new id wl_surface@19)
[1894739.081]  -> [email protected]_keyboard(new id wl_keyboard@20)
[1894739.088] [email protected]("seat0")
[1894739.092] [email protected](875713089)
[1894739.096] [email protected](875713089, 16777215, 4294967295)
[1894739.107] [email protected](875713112)
[1894739.114] [email protected](875713112, 16777215, 4294967295)
[1894739.120] [email protected](808669761)
[1894739.124] [email protected](808669761, 16777215, 4294967295)
[1894739.134] [email protected](909199186)
[1894739.138] [email protected](909199186, 16777215, 4294967295)
[1894739.150] [email protected](152130)
[1894739.345] [email protected]_id(3)
[1894739.349] [email protected]()
[1894739.354] [email protected](152130)
[1894739.357] [email protected](1, fd 32, 54533)
[1894740.677] [email protected]_info(33, 500)
[1894773.934]  -> [email protected]_registry(new id wl_registry@2)
[1894773.945]  -> [email protected](new id wl_callback@3)
[1894773.990] [email protected]_id(3)
[1894773.994] [email protected](1, "wl_drm", 2)
[1894774.003] [email protected](2, "wl_compositor", 4)
[1894774.011]  -> [email protected](2, "wl_compositor", 3, new id [unknown]@4)
[1894774.022] [email protected](3, "wl_shm", 1)
[1894774.030]  -> [email protected](3, "wl_shm", 1, new id [unknown]@5)
[1894774.077]  -> [email protected]_pool(new id wl_shm_pool<strong i="8">@6</strong>, fd 38, 2304)
[1894774.189]  -> [email protected](6912)
[1894774.231]  -> [email protected](16128)
[1894774.296]  -> [email protected](34560)
[1894774.476]  -> [email protected](71424)
[1894774.738]  -> [email protected](145152)
[1894775.331]  -> [email protected](292608)
[1894776.011]  -> [email protected](587520)
[1894777.122]  -> [email protected](1177344)
[1894782.938] [email protected](4, "wl_output", 2)
[1894782.947]  -> [email protected](4, "wl_output", 2, new id [unknown]@7)
[1894782.983]  -> [email protected](new id wl_callback@8)
[1894782.988] [email protected](5, "wl_output", 2)
[1894782.995]  -> [email protected](5, "wl_output", 2, new id [unknown]@9)
[1894783.012]  -> [email protected](new id wl_callback@10)
[1894783.017] [email protected](6, "zxdg_output_manager_v1", 3)
[1894783.025]  -> [email protected](6, "zxdg_output_manager_v1", 3, new id [unknown]@11)
[1894783.041]  -> [email protected]_xdg_output(new id zxdg_output_v1<strong i="9">@12</strong>, wl_output@7)
[1894783.046]  -> [email protected]_xdg_output(new id zxdg_output_v1<strong i="10">@13</strong>, wl_output@9)
[1894783.055]  -> [email protected](new id wl_callback@14)
[1894783.061] [email protected](7, "wl_data_device_manager", 3)
[1894783.069]  -> [email protected](7, "wl_data_device_manager", 3, new id [unknown]@15)
[1894783.080] [email protected](8, "zwp_primary_selection_device_manager_v1", 1)
[1894783.088] [email protected](9, "gtk_primary_selection_device_manager", 1)
[1894783.098]  -> [email protected](9, "gtk_primary_selection_device_manager", 1, new id [unknown]@16)
[1894783.108] [email protected](10, "wl_subcompositor", 1)
[1894783.115]  -> [email protected](10, "wl_subcompositor", 1, new id [unknown]@17)
[1894783.131] [email protected](11, "xdg_wm_base", 3)
[1894783.138] [email protected](12, "zxdg_shell_v6", 1)
[1894783.144] [email protected](13, "wl_shell", 1)
[1894783.152] [email protected](14, "gtk_shell1", 3)
[1894783.167]  -> [email protected](14, "gtk_shell1", 3, new id [unknown]@18)
[1894783.188] [email protected](15, "wp_viewporter", 1)
[1894783.197] [email protected](16, "zwp_pointer_gestures_v1", 1)
[1894783.205]  -> [email protected](16, "zwp_pointer_gestures_v1", 1, new id [unknown]@19)
[1894783.223] [email protected](17, "zwp_tablet_manager_v2", 1)
[1894783.230]  -> [email protected](17, "zwp_tablet_manager_v2", 1, new id [unknown]@20)
[1894783.241] [email protected](18, "wl_seat", 5)
[1894783.248]  -> [email protected](18, "wl_seat", 5, new id [unknown]@21)
[1894784.921]  -> [email protected]_surface(new id wl_surface@22)
[1894784.934]  -> [email protected]_device(new id gtk_primary_selection_device<strong i="11">@23</strong>, wl_seat@21)
[1894784.943]  -> [email protected]_data_device(new id wl_data_device<strong i="12">@24</strong>, wl_seat@21)
[1894785.027]  -> [email protected]_surface(new id wl_surface@25)
[1894785.031]  -> [email protected]_tablet_seat(new id zwp_tablet_seat_v2<strong i="13">@26</strong>, wl_seat@21)
[1894785.040]  -> [email protected](new id wl_callback@27)
[1894785.045] [email protected](19, "zwp_relative_pointer_manager_v1", 1)
[1894785.053] [email protected](20, "zwp_pointer_constraints_v1", 1)
[1894785.060] [email protected](21, "zxdg_exporter_v1", 1)
[1894785.068]  -> [email protected](21, "zxdg_exporter_v1", 1, new id [unknown]@28)
[1894785.080] [email protected](22, "zxdg_importer_v1", 1)
[1894785.089]  -> [email protected](22, "zxdg_importer_v1", 1, new id [unknown]@29)
[1894785.101] [email protected](23, "zwp_linux_dmabuf_v1", 3)
[1894785.110] [email protected](24, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[1894785.117]  -> [email protected](24, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1, new id [unknown]@30)
[1894785.129] [email protected](25, "zwp_text_input_manager_v3", 1)
[1894785.136] [email protected](26, "gtk_text_input_manager", 1)
[1894785.145] [email protected](152130)
[1894785.277] [email protected]_id(8)
[1894785.281] [email protected]_id(10)
[1894785.283] [email protected]_id(14)
[1894785.287] [email protected]_id(27)
[1894785.293] [email protected](0)
[1894785.296] [email protected](1)
[1894785.301] [email protected](1920, 0, 530, 300, 0, "", "", 0)
[1894785.321] [email protected](3, 1920, 1080, 60000)
[1894785.327] [email protected](1)
[1894785.330] [email protected]()
[1894785.336] [email protected](152130)
[1894785.339] [email protected](0, 0, 530, 300, 0, "", "", 0)
[1894785.357] [email protected](3, 1920, 1080, 60000)
[1894785.362] [email protected](1)
[1894785.365] [email protected]()
[1894785.369] [email protected](152130)
[1894785.372] [email protected]_position(1920, 0)
[1894785.375] [email protected]_size(1920, 1080)
[1894785.379] [email protected]()
[1894785.383] [email protected]("")
[1894785.386] [email protected]()
[1894785.390] [email protected]_position(0, 0)
[1894785.395] [email protected]_size(1920, 1080)
[1894785.400] [email protected]("")
[1894785.403] [email protected](""")
[1894785.406] [email protected]()
[1894785.410] [email protected](152130)
[1894785.414] [email protected](0)
[1894785.421] [email protected](3)
[1894785.425]  -> [email protected]_pointer(new id wl_pointer@14)
[1894785.437]  -> [email protected]_swipe_gesture(new id zwp_pointer_gesture_swipe_v1<strong i="14">@10</strong>, wl_pointer@14)
[1894785.445]  -> [email protected]_pinch_gesture(new id zwp_pointer_gesture_pinch_v1<strong i="15">@8</strong>, wl_pointer@14)
[1894785.452]  -> [email protected]_keyboard(new id wl_keyboard@3)
[1894785.460] [email protected]("seat0")
[1894785.463] [email protected](152130)
[1894785.467]  -> [email protected](11, "xdg_wm_base", 1, new id [unknown]@27)
[1894840.113]  -> [email protected]_surface(new id wl_surface@31)
[1896097.874]  -> [email protected]_registry(new id wl_registry@2)
[1896097.897]  -> [email protected](new id wl_callback@3)
[1896097.947] [email protected]_id(3)
[1896097.962] [email protected](1, "wl_drm", 2)
[1896097.968]  -> [email protected](1, "wl_drm", 2, new id [unknown]@4)
[1896097.978] [email protected](2, "wl_compositor", 4)
[1896097.985] [email protected](3, "wl_shm", 1)
[1896097.993] [email protected](4, "wl_output", 2)
[1896098.000] [email protected](5, "wl_output", 2)
[1896098.006] [email protected](6, "zxdg_output_manager_v1", 3)
[1896098.015] [email protected](7, "wl_data_device_manager", 3)
[1896098.025] [email protected](8, "zwp_primary_selection_device_manager_v1", 1)
[1896098.036] [email protected](9, "gtk_primary_selection_device_manager", 1)
[1896098.050] [email protected](10, "wl_subcompositor", 1)
[1896098.059] [email protected](11, "xdg_wm_base", 3)
[1896098.068] [email protected](12, "zxdg_shell_v6", 1)
[1896098.077] [email protected](13, "wl_shell", 1)
[1896098.091] [email protected](14, "gtk_shell1", 3)
[1896098.099] [email protected](15, "wp_viewporter", 1)
[1896098.108] [email protected](16, "zwp_pointer_gestures_v1", 1)
[1896098.116] [email protected](17, "zwp_tablet_manager_v2", 1)
[1896098.127] [email protected](18, "wl_seat", 5)
[1896098.133] [email protected](19, "zwp_relative_pointer_manager_v1", 1)
[1896098.138] [email protected](20, "zwp_pointer_constraints_v1", 1)
[1896098.150] [email protected](21, "zxdg_exporter_v1", 1)
[1896098.158] [email protected](22, "zxdg_importer_v1", 1)
[1896098.166] [email protected](23, "zwp_linux_dmabuf_v1", 3)
[1896098.173]  -> [email protected](23, "zwp_linux_dmabuf_v1", 3, new id [unknown]@5)
[1896098.184] [email protected](24, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[1896098.193] [email protected](25, "zwp_text_input_manager_v3", 1)
[1896098.206] [email protected](26, "gtk_text_input_manager", 1)
[1896098.215] [email protected](152134)
[1896098.219]  -> [email protected](new id wl_callback@3)
[1896098.293] [email protected]_id(3)
[1896098.296] [email protected]("/dev/dri/card0")
[1896098.425]  -> [email protected](4)
[1896098.429] [email protected](808669761)
[1896098.435] [email protected](808669784)
[1896098.439] [email protected](808665665)
[1896098.441] [email protected](808665688)
[1896098.444] [email protected](875713089)
[1896098.447] [email protected](875713112)
[1896098.450] [email protected](909199186)
[1896098.454] [email protected](961959257)
[1896098.459] [email protected](825316697)
[1896098.464] [email protected](842093913)
[1896098.467] [email protected](909202777)
[1896098.470] [email protected](875713881)
[1896098.473] [email protected](842094158)
[1896098.476] [email protected](909203022)
[1896098.479] [email protected](1448695129)
[1896098.483] [email protected](1)
[1896098.486] [email protected](875713089)
[1896098.492] [email protected](875713089, 16777215, 4294967295)
[1896098.500] [email protected](875713112)
[1896098.512] [email protected](875713112, 16777215, 4294967295)
[1896098.525] [email protected](808669761)
[1896098.529] [email protected](808669761, 16777215, 4294967295)
[1896098.539] [email protected](909199186)
[1896098.544] [email protected](909199186, 16777215, 4294967295)
[1896098.554] [email protected](152134)
[1896098.560]  -> [email protected](new id wl_callback@3)
[1896098.585] [email protected]_id(3)
[1896098.588] [email protected]()
[1896098.590] [email protected](152134)
[1739236:1739236:0911/113806.380850:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
[1899569.137]  -> [email protected]_surface(new id wl_surface@3)
[1899569.182]  -> [email protected]_region(new id wl_region@18)
[1899569.186]  -> [email protected](0, 0, 945, 640)
[1899569.197]  -> [email protected]_opaque_region(wl_region@18)
[1899569.201]  -> [email protected]()
[1899895.275]  -> [email protected]_xdg_surface(new id xdg_surface<strong i="16">@21</strong>, wl_surface@3)
[1899895.294]  -> [email protected]_toplevel(new id xdg_toplevel@22)
[1899895.299]  -> [email protected]()
[1899895.302]  -> [email protected]_app_id("Chromium-browser")
[1899895.310]  -> [email protected]_fullscreen()
[1899895.312]  -> [email protected]_maximized()
[1900760.265] [email protected](1, fd 74, 54533)
[1900762.215] [email protected]_info(33, 500)
[1900762.250] [email protected]_id(18)
[1900762.255] [email protected](0, 0, array)
[1900762.267]  -> [email protected]_window_geometry(0, 0, 945, 640)
[1900762.279] [email protected](6108)
[1900762.284]  -> [email protected]_configure(6108)
[1902493.196]  -> [email protected]_params(new id zwp_linux_buffer_params_v1@18)
[1902493.215]  -> [email protected](fd 177, 0, 0, 4096, 16777215, 4294967295)
[1902493.226]  -> [email protected]_immed(new id wl_buffer<strong i="17">@23</strong>, 945, 640, 875708993, 0)
[1902493.276]  -> [email protected]_params(new id zwp_linux_buffer_params_v1@24)
[1902493.280]  -> [email protected](fd 170, 0, 0, 4096, 16777215, 4294967295)
[1902493.290]  -> [email protected]_immed(new id wl_buffer<strong i="18">@25</strong>, 945, 640, 875708993, 0)
[1902493.304]  -> [email protected]_params(new id zwp_linux_buffer_params_v1@26)
[1902493.308]  -> [email protected](fd 171, 0, 0, 4096, 16777215, 4294967295)
[1902493.317]  -> [email protected]_immed(new id wl_buffer<strong i="19">@27</strong>, 945, 640, 875708993, 0)
[1902493.564] [email protected](zwp_linux_buffer_params_v1<strong i="20">@18</strong>, 7, "failed to import supplied dmabufs: Unsupported buffer format 875708993")

@ninja-,是的。 我将会。

@ninja- ,如果您自己编译chromium,此补丁可以正常关闭浏览器+ 可以打印libwayland-client 发送的错误消息,此补丁修复了缓冲区不受支持的问题。 您可以应用它们并验证问题是否已修复。

在 Fedora 32 和 GNOME 中小数刻度的工作就像一个魅力

Chrome 84 与 Chrome Dev 87(启用wayland)
chrome

这对于电子应用程序和 Wayland 用户来说将是一个巨大的进步

好吧,我不得不承认它部分起作用,并且取决于wayland通过的价值。 问题是 wl_output 不支持分数缩放。 如果将 150% 舍入到 200%,则铬将获得“正确”值。

否则,应使用 xdg_output(Chromium 将根据显示器的物理和逻辑大小计算缩放比例)。 这项工作目前正在开发中。

好吧,我不得不承认它部分起作用,并且取决于wayland通过的价值。 问题是 wl_output 不支持分数缩放。 如果将 150% 舍入到 200%,则铬将获得“正确”值。

我明白了,有道理,我在测试中使用了 150%

@msisov你的修复终于登陆了每周一次的开发快照构建——效果很好! 谢谢!

以前 Chrome 每隔几秒钟就会在我的电脑上冻结 - 我真的不知道这是内核、amdgpu、chromium、xwayland 还是 gnome-shell 错误:/
我希望现在使用纯 Wayland 会更好。

@refi64非常感谢你提出这个问题! 有趣的

由于这不再被上游阻止,接下来的计划是什么? Chrome 87(现在处于 Beta 版)附带了 Wayland 作为臭氧平台,可以使用官方 Chrome PPA 中的google-chrome-beta --enable-features=UseOzonePlatform --ozone-platform=wayland启用。 目前electron@beta但是哪个船说 chrome 版本在预构建的二进制文件中不支持 wayland。

@vially似乎已经做出了一些努力来重构一些代码,以允许未来在构建中支持 Wayland。 还有其他主要障碍吗?

TLDR

电子的铬依赖当前指向哪个崩溃在启动时就韦兰(版本铬#1128997 )。

一旦情况不再如此(例如:在接下来的一两个铬块之后),我计划调整并尝试上游@hedgepigdaniel补丁,以便在官方 Electron 构建中启用 Wayland 支持。

技术细节

前 Chromium 87 补丁

上游当前Wayland 补丁的挑战之一是由于 Electron 最近将 Chromium 提升到版本 87,这使得 Ozone 和非 Ozone 代码路径都在同一构建中 ( chromium#1085700 )。

这些 Electron Wayland 补丁是在假设构建是 X11 构建 ( USE_X11 ) 或臭氧构建 ( USE_OZONE ) 的情况下编写的,这在版本 87 之前都是正确的,但不再是之后的情况。

这意味着需要调整补丁以解决现在USE_X11USE_OZONE可以同时为真的事实。

后 Chromium 87 补丁

我的计划是采用现有的补丁,通过借用chromium#1085700 (我在这个分支中所做的)的模式来调整它们,然后将它们上游到Electron。

但是,由于同时在 Chromium ( chromium#1128997 ) 中electron --enable-features=UseOzonePlatform --ozone-platform=wayland崩溃与 Chromium 错误报告中的错误相同)。

使用 Ozone/X11 ( electron --enable-features=UseOzonePlatform --ozone-platform=x11 ) 运行相同的 Electron 构建似乎可以很好地处理这些补丁,我想这是一个好兆头。

所以现在我只是在等待 Electron 中更多的 Chromium 碰撞,这应该可以解决当前的问题,但很可能会发现另一个.

而且我知道还会有另一个,因为我手动向后移植了chromium#2434928并且构建仍然无法启动,但这次使用了不同的

如果有人有兴趣查看,这是堆栈跟踪的一部分。 似乎暗示它也可能与缓冲区初始化有关(可能是chromium#2343545 ?),但我不能肯定。 也许它为@msisov或@nickdiego 敲响了警钟。


堆栈跟踪

[19947:1003/140001.730007:INFO:content_main_runner_impl.cc(976)] Chrome is running in full browser mode.
[4248247.318]  -> [email protected]_registry(new id wl_registry@2)
[4248247.345]  -> [email protected](new id wl_callback@3)
[4248247.458] [email protected]_id(3)
[4248247.470] [email protected](1, "wl_shm", 1)
[4248247.481]  -> [email protected](1, "wl_shm", 1, new id [unknown]@4)
[4248247.503] [email protected](2, "wl_drm", 2)
[4248247.513]  -> [email protected](2, "wl_drm", 2, new id [unknown]@5)
[4248247.528]  -> [email protected](new id wl_callback@6)
[4248247.534] [email protected](3, "zwp_linux_dmabuf_v1", 3)
[4248247.544]  -> [email protected](3, "zwp_linux_dmabuf_v1", 3, new id [unknown]@7)
[4248247.558]  -> [email protected](new id wl_callback@8)
[4248247.564] [email protected](4, "wl_compositor", 4)
[4248247.574]  -> [email protected](4, "wl_compositor", 4, new id [unknown]@9)
[4248247.587] [email protected](5, "wl_subcompositor", 1)
[4248247.597]  -> [email protected](5, "wl_subcompositor", 1, new id [unknown]@10)
[4248247.610] [email protected](6, "wl_data_device_manager", 3)
[4248247.620]  -> [email protected](6, "wl_data_device_manager", 3, new id [unknown]@11)
[4248247.634] [email protected](7, "zwlr_gamma_control_manager_v1", 1)
[4248247.644] [email protected](8, "gtk_primary_selection_device_manager", 1)
[4248247.654]  -> [email protected](8, "gtk_primary_selection_device_manager", 1, new id [unknown]@12)
[4248247.667] [email protected](9, "zxdg_output_manager_v1", 3)
[4248247.677] [email protected](10, "org_kde_kwin_idle", 1)
[4248247.687] [email protected](11, "zwp_idle_inhibit_manager_v1", 1)
[4248247.697] [email protected](12, "zwlr_layer_shell_v1", 2)
[4248247.706] [email protected](13, "xdg_wm_base", 2)
[4248247.716]  -> [email protected](13, "xdg_wm_base", 1, new id [unknown]@13)
[4248247.730] [email protected](14, "zwp_tablet_manager_v2", 1)
[4248247.740] [email protected](15, "org_kde_kwin_server_decoration_manager", 1)
[4248247.749] [email protected](16, "zxdg_decoration_manager_v1", 1)
[4248247.762]  -> [email protected](16, "zxdg_decoration_manager_v1", 1, new id [unknown]@14)
[4248247.775] [email protected](17, "zwp_relative_pointer_manager_v1", 1)
[4248247.785] [email protected](18, "zwp_pointer_constraints_v1", 1)
[4248247.795] [email protected](19, "wp_presentation", 1)
[4248247.805]  -> [email protected](19, "wp_presentation", 1, new id [unknown]@15)
[4248247.818] [email protected](20, "zwlr_output_manager_v1", 1)
[4248247.828] [email protected](21, "zwlr_output_power_manager_v1", 1)
[4248247.838] [email protected](22, "zwp_input_method_manager_v2", 1)
[4248247.847] [email protected](23, "zwp_text_input_manager_v3", 1)
[4248247.858] [email protected](24, "zwlr_foreign_toplevel_manager_v1", 2)
[4248247.867] [email protected](25, "zwlr_export_dmabuf_manager_v1", 1)
[4248247.877] [email protected](26, "zwlr_screencopy_manager_v1", 3)
[4248247.887] [email protected](27, "zwlr_data_control_manager_v1", 2)
[4248247.896] [email protected](28, "zwp_primary_selection_device_manager_v1", 1)
[4248247.906] [email protected](29, "wp_viewporter", 1)
[4248247.916] [email protected](30, "zwp_virtual_keyboard_manager_v1", 1)
[4248247.925] [email protected](31, "zwlr_virtual_pointer_manager_v1", 2)
[4248247.935] [email protected](32, "zwlr_input_inhibit_manager_v1", 1)
[4248247.945] [email protected](33, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[4248247.954] [email protected](34, "wl_seat", 7)
[4248247.964]  -> [email protected](34, "wl_seat", 5, new id [unknown]@16)
[4248247.978]  -> [email protected]_data_device(new id wl_data_device<strong i="23">@17</strong>, wl_seat@16)
[4248247.989] [email protected](35, "zwp_pointer_gestures_v1", 1)
[4248247.999] [email protected](39, "wl_output", 3)
[4248248.008]  -> [email protected](39, "wl_output", 3, new id [unknown]@18)
[4248248.022] [email protected](40, "wl_output", 3)
[4248248.032]  -> [email protected](40, "wl_output", 3, new id [unknown]@19)
[4248248.052] [email protected](41, "wl_output", 3)
[4248248.062]  -> [email protected](41, "wl_output", 3, new id [unknown]@20)
[4248248.075] [email protected](2593)
[4248248.203] [email protected]_id(6)
[4248248.210] [email protected]_id(8)
[4248248.215] [email protected]("/dev/dri/card0")
[4248248.399]  -> [email protected](6)
[4248248.406]  -> [email protected](new id wl_callback@3)
[4248248.413] [email protected](808669761)
[4248248.421] [email protected](808669784)
[4248248.427] [email protected](808665665)
[4248248.432] [email protected](808665688)
[4248248.436] [email protected](875713089)
[4248248.441] [email protected](875713112)
[4248248.445] [email protected](909199186)
[4248248.450] [email protected](961959257)
[4248248.455] [email protected](825316697)
[4248248.459] [email protected](842093913)
[4248248.464] [email protected](909202777)
[4248248.468] [email protected](875713881)
[4248248.473] [email protected](842094158)
[4248248.477] [email protected](909203022)
[4248248.482] [email protected](1448695129)
[4248248.486] [email protected](1)
[4248248.491] [email protected](2593)
[4248248.496] [email protected](1211384385, 16777215, 4294967295)
[4248248.506] [email protected](1211384408, 16777215, 4294967295)
[4248248.516] [email protected](808669761, 16777215, 4294967295)
[4248248.526] [email protected](808669784, 16777215, 4294967295)
[4248248.535] [email protected](808665665, 16777215, 4294967295)
[4248248.545] [email protected](808665688, 16777215, 4294967295)
[4248248.555] [email protected](875713089, 16777215, 4294967295)
[4248248.564] [email protected](875708993, 16777215, 4294967295)
[4248248.574] [email protected](875713112, 16777215, 4294967295)
[4248248.584] [email protected](875709016, 16777215, 4294967295)
[4248248.593] [email protected](892424769, 16777215, 4294967295)
[4248248.603] [email protected](909199186, 16777215, 4294967295)
[4248248.613] [email protected](538982482, 16777215, 4294967295)
[4248248.622] [email protected](540422482, 16777215, 4294967295)
[4248248.632] [email protected](943215175, 16777215, 4294967295)
[4248248.642] [email protected](842224199, 16777215, 4294967295)
[4248248.651] [email protected](961959257, 16777215, 4294967295)
[4248248.661] [email protected](825316697, 16777215, 4294967295)
[4248248.671] [email protected](842093913, 16777215, 4294967295)
[4248248.680] [email protected](909202777, 16777215, 4294967295)
[4248248.690] [email protected](875713881, 16777215, 4294967295)
[4248248.699] [email protected](961893977, 16777215, 4294967295)
[4248248.709] [email protected](825316953, 16777215, 4294967295)
[4248248.718] [email protected](842094169, 16777215, 4294967295)
[4248248.728] [email protected](909203033, 16777215, 4294967295)
[4248248.738] [email protected](875714137, 16777215, 4294967295)
[4248248.748] [email protected](842094158, 16777215, 4294967295)
[4248248.757] [email protected](808530000, 16777215, 4294967295)
[4248248.767] [email protected](842084432, 16777215, 4294967295)
[4248248.776] [email protected](909193296, 16777215, 4294967295)
[4248248.786] [email protected](909203022, 16777215, 4294967295)
[4248248.796] [email protected](1448433985, 16777215, 4294967295)
[4248248.805] [email protected](1448434008, 16777215, 4294967295)
[4248248.815] [email protected](1448695129, 16777215, 4294967295)
[4248248.824] [email protected](1498831189, 16777215, 4294967295)
[4248248.834] [email protected](2593)
[4248248.839] [email protected]("seat0")
[4248248.844] [email protected](3)
[4248248.849]  -> [email protected]_pointer(new id wl_pointer@8)
[4248248.855]  -> [email protected]_surface(new id wl_surface@6)
[4248248.861]  -> [email protected]_keyboard(new id wl_keyboard@21)
[4248248.875] [email protected](0, 0, 600, 340, 0, "Goldstar Company Ltd", "LG Ultra HD", 0)
[4248248.898] [email protected](1, 3840, 2160, 59997)
[4248248.911] [email protected](2)
[4248248.916] [email protected]()
[4248248.919] [email protected](0, 0, 600, 340, 0, "Goldstar Company Ltd", "LG Ultra HD", 0)
[4248248.942] [email protected](1, 3840, 2160, 59997)
[4248248.954] [email protected](2)
[4248248.959] [email protected]()
[4248248.962] [email protected](0, 0, 600, 340, 0, "Acer Technologies", "XV273K", 0)
[4248248.984] [email protected](1, 3840, 2160, 119910)
[4248248.996] [email protected](2)
[4248249.001] [email protected]()
[4248249.127] [email protected]_id(3)
[4248249.133] [email protected]()
[4248249.137] [email protected](2593)
[4248249.141] [email protected](1, fd 151, 48238)
[4248250.377] [email protected]_info(25, 600)
[4248252.512]  -> [email protected]_registry(new id wl_registry@2)
[4248252.523]  -> [email protected](new id wl_callback@3)
[4248252.568] [email protected]_id(3)
[4248252.575] [email protected](1, "wl_shm", 1)
[4248252.586]  -> [email protected](1, "wl_shm", 1, new id [unknown]@4)
[4248252.617]  -> [email protected]_pool(new id wl_shm_pool<strong i="24">@5</strong>, fd 157, 2304)
[4248252.728]  -> [email protected](6912)
[4248252.787]  -> [email protected](16128)
[4248253.706]  -> [email protected](34560)
[4248253.734]  -> [email protected](71424)
[4248253.771]  -> [email protected](145152)
[4248253.836]  -> [email protected](292608)
[4248254.912]  -> [email protected](587520)
[4248257.613]  -> [email protected](1177344)
[4248267.711] [email protected](2, "wl_drm", 2)
[4248267.726] [email protected](3, "zwp_linux_dmabuf_v1", 3)
[4248267.736] [email protected](4, "wl_compositor", 4)
[4248267.746]  -> [email protected](4, "wl_compositor", 3, new id [unknown]@6)
[4248267.760] [email protected](5, "wl_subcompositor", 1)
[4248267.770]  -> [email protected](5, "wl_subcompositor", 1, new id [unknown]@7)
[4248267.784] [email protected](6, "wl_data_device_manager", 3)
[4248267.794]  -> [email protected](6, "wl_data_device_manager", 3, new id [unknown]@8)
[4248267.808] [email protected](7, "zwlr_gamma_control_manager_v1", 1)
[4248267.818] [email protected](8, "gtk_primary_selection_device_manager", 1)
[4248267.827]  -> [email protected](8, "gtk_primary_selection_device_manager", 1, new id [unknown]@9)
[4248267.842] [email protected](9, "zxdg_output_manager_v1", 3)
[4248267.852]  -> [email protected](9, "zxdg_output_manager_v1", 3, new id [unknown]@10)
[4248267.866]  -> [email protected](new id wl_callback@11)
[4248267.872] [email protected](10, "org_kde_kwin_idle", 1)
[4248267.882] [email protected](11, "zwp_idle_inhibit_manager_v1", 1)
[4248267.892] [email protected](12, "zwlr_layer_shell_v1", 2)
[4248267.902] [email protected](13, "xdg_wm_base", 2)
[4248267.912] [email protected](14, "zwp_tablet_manager_v2", 1)
[4248267.921]  -> [email protected](14, "zwp_tablet_manager_v2", 1, new id [unknown]@12)
[4248267.935] [email protected](15, "org_kde_kwin_server_decoration_manager", 1)
[4248267.945]  -> [email protected](15, "org_kde_kwin_server_decoration_manager", 1, new id [unknown]@13)
[4248267.958] [email protected](16, "zxdg_decoration_manager_v1", 1)
[4248267.969] [email protected](17, "zwp_relative_pointer_manager_v1", 1)
[4248267.979] [email protected](18, "zwp_pointer_constraints_v1", 1)
[4248267.989] [email protected](19, "wp_presentation", 1)
[4248267.998] [email protected](20, "zwlr_output_manager_v1", 1)
[4248268.008] [email protected](21, "zwlr_output_power_manager_v1", 1)
[4248268.018] [email protected](22, "zwp_input_method_manager_v2", 1)
[4248268.028] [email protected](23, "zwp_text_input_manager_v3", 1)
[4248268.038] [email protected](24, "zwlr_foreign_toplevel_manager_v1", 2)
[4248268.048] [email protected](25, "zwlr_export_dmabuf_manager_v1", 1)
[4248268.058] [email protected](26, "zwlr_screencopy_manager_v1", 3)
[4248268.072] [email protected](27, "zwlr_data_control_manager_v1", 2)
[4248268.082] [email protected](28, "zwp_primary_selection_device_manager_v1", 1)
[4248268.093] [email protected](29, "wp_viewporter", 1)
[4248268.102] [email protected](30, "zwp_virtual_keyboard_manager_v1", 1)
[4248268.112] [email protected](31, "zwlr_virtual_pointer_manager_v1", 2)
[4248268.123] [email protected](32, "zwlr_input_inhibit_manager_v1", 1)
[4248268.133] [email protected](33, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[4248268.143]  -> [email protected](33, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1, new id [unknown]@14)
[4248268.157] [email protected](34, "wl_seat", 7)
[4248268.167]  -> [email protected](34, "wl_seat", 5, new id [unknown]@15)
[4248269.960]  -> [email protected]_surface(new id wl_surface@16)
[4248269.975]  -> [email protected]_device(new id gtk_primary_selection_device<strong i="25">@17</strong>, wl_seat@15)
[4248269.985]  -> [email protected]_data_device(new id wl_data_device<strong i="26">@18</strong>, wl_seat@15)
[4248270.059]  -> [email protected]_surface(new id wl_surface@19)
[4248270.067]  -> [email protected]_tablet_seat(new id zwp_tablet_seat_v2<strong i="27">@20</strong>, wl_seat@15)
[4248270.076]  -> [email protected](new id wl_callback@21)
[4248270.084] [email protected](35, "zwp_pointer_gestures_v1", 1)
[4248270.095]  -> [email protected](35, "zwp_pointer_gestures_v1", 1, new id [unknown]@22)
[4248270.108] [email protected](39, "wl_output", 3)
[4248270.118]  -> [email protected](39, "wl_output", 2, new id [unknown]@23)
[4248270.152]  -> [email protected]_xdg_output(new id zxdg_output_v1<strong i="28">@24</strong>, wl_output@23)
[4248270.162]  -> [email protected](new id wl_callback@25)
[4248270.168] [email protected](40, "wl_output", 3)
[4248270.178]  -> [email protected](40, "wl_output", 2, new id [unknown]@26)
[4248270.193]  -> [email protected]_xdg_output(new id zxdg_output_v1<strong i="29">@27</strong>, wl_output@26)
[4248270.202]  -> [email protected](new id wl_callback@28)
[4248270.208] [email protected](41, "wl_output", 3)
[4248270.218]  -> [email protected](41, "wl_output", 2, new id [unknown]@29)
[4248270.232]  -> [email protected]_xdg_output(new id zxdg_output_v1<strong i="30">@30</strong>, wl_output@29)
[4248270.240]  -> [email protected](new id wl_callback@31)
[4248270.246] [email protected](2596)
[4248270.373] [email protected]_id(11)
[4248270.381] [email protected]_id(21)
[4248270.386] [email protected]_id(25)
[4248270.391] [email protected]_id(28)
[4248270.395] [email protected]_id(31)
[4248270.400] [email protected](0)
[4248270.404] [email protected](1)
[4248270.409] [email protected](875709016)
[4248270.413] [email protected](875708993)
[4248270.418] [email protected](2596)
[4248270.423] [email protected]_mode(2)
[4248270.428] [email protected]("seat0")
[4248270.433] [email protected](3)
[4248270.438]  -> [email protected]_pointer(new id wl_pointer@11)
[4248270.452]  -> [email protected]_swipe_gesture(new id zwp_pointer_gesture_swipe_v1<strong i="31">@3</strong>, wl_pointer@11)
[4248270.461]  -> [email protected]_pinch_gesture(new id zwp_pointer_gesture_pinch_v1<strong i="32">@32</strong>, wl_pointer@11)
[4248270.470]  -> [email protected]_keyboard(new id wl_keyboard@33)
[4248270.481] [email protected](2596)
[4248270.487] [email protected](0, 0, 600, 340, 0, "Goldstar Company Ltd", "LG Ultra HD", 0)
[4248270.511] [email protected](1, 3840, 2160, 59997)
[4248270.524] [email protected](2)
[4248270.530] [email protected]()
[4248270.538] [email protected]("DP-3")
[4248270.544] [email protected]("Goldstar Company Ltd LG Ultra HD 0x0000E0B1 (DP-3)")
[4248270.548] [email protected]_position(3840, 0)
[4248270.556] [email protected]_size(1920, 1080)
[4248270.563] [email protected]()
[4248270.568] [email protected](2596)
[4248270.573] [email protected](0, 0, 600, 340, 0, "Goldstar Company Ltd", "LG Ultra HD", 0)
[4248270.597] [email protected](1, 3840, 2160, 59997)
[4248270.610] [email protected](2)
[4248270.614] [email protected]()
[4248270.619] [email protected]("DP-2")
[4248270.628] [email protected]("Goldstar Company Ltd LG Ultra HD 0x0000B9F1 (DP-2)")
[4248270.633] [email protected]_position(0, 0)
[4248270.640] [email protected]_size(1920, 1080)
[4248270.647] [email protected]()
[4248270.652] [email protected](2596)
[4248270.657] [email protected](0, 0, 600, 340, 0, "Acer Technologies", "XV273K", 0)
[4248270.681] [email protected](1, 3840, 2160, 119910)
[4248270.694] [email protected](2)
[4248270.699] [email protected]()
[4248270.704] [email protected]("DP-1")
[4248270.709] [email protected]("Acer Technologies XV273K 0x0000F25B (DP-1)")
[4248270.713] [email protected]_position(1920, 0)
[4248270.720] [email protected]_size(1920, 1080)
[4248270.727] [email protected]()
[4248270.733] [email protected](2596)
[4248270.738]  -> [email protected](13, "xdg_wm_base", 1, new id [unknown]@31)
[4248288.779]  -> [email protected]_surface(new id wl_surface@28)
[4248325.005]  -> [email protected]_surface(new id wl_surface@3)
[4248325.051]  -> [email protected]_buffer_scale(2)
[4248325.058]  -> [email protected]_region(new id wl_region@22)
[4248325.065]  -> [email protected](0, 0, 1920, 1240)
[4248325.077]  -> [email protected]_opaque_region(wl_region@22)
[4248325.083]  -> [email protected]()
[19947:1003/140002.022605:ERROR:wayland_window.cc(193)] Not implemented reached in virtual void ui::WaylandWindow::SetUseNativeFrame(bool)
[19947:1003/140002.022622:ERROR:wayland_window.cc(234)] Not implemented reached in virtual bool ui::WaylandWindow::ShouldWindowContentsBeTransparent() const
[19947:1003/140002.022730:ERROR:wayland_window.cc(244)] Not implemented reached in virtual void ui::WaylandWindow::SetWindowIcons(const gfx::ImageSkia &, const gfx::ImageSkia &)
[4248325.523]  -> [email protected]_region(new id wl_region@23)
[4248325.533]  -> [email protected](0, 0, 1920, 1240)
[4248325.545]  -> [email protected]_opaque_region(wl_region@23)
[4248325.551]  -> [email protected]()
[4248379.892]  -> [email protected]_registry(new id wl_registry@2)
[4248379.912]  -> [email protected](new id wl_callback@3)
[4248379.995] [email protected]_id(3)
[4248380.007] [email protected](1, "wl_shm", 1)
[4248380.017] [email protected](2, "wl_drm", 2)
[4248380.028]  -> [email protected](2, "wl_drm", 2, new id [unknown]@4)
[4248380.042] [email protected](3, "zwp_linux_dmabuf_v1", 3)
[4248380.052]  -> [email protected](3, "zwp_linux_dmabuf_v1", 3, new id [unknown]@5)
[4248380.066] [email protected](4, "wl_compositor", 4)
[4248380.075] [email protected](5, "wl_subcompositor", 1)
[4248380.085] [email protected](6, "wl_data_device_manager", 3)
[4248380.095] [email protected](7, "zwlr_gamma_control_manager_v1", 1)
[4248380.104] [email protected](8, "gtk_primary_selection_device_manager", 1)
[4248380.114] [email protected](9, "zxdg_output_manager_v1", 3)
[4248380.123] [email protected](10, "org_kde_kwin_idle", 1)
[4248380.133] [email protected](11, "zwp_idle_inhibit_manager_v1", 1)
[4248380.143] [email protected](12, "zwlr_layer_shell_v1", 2)
[4248380.152] [email protected](13, "xdg_wm_base", 2)
[4248380.162] [email protected](14, "zwp_tablet_manager_v2", 1)
[4248380.172] [email protected](15, "org_kde_kwin_server_decoration_manager", 1)
[4248380.182] [email protected](16, "zxdg_decoration_manager_v1", 1)
[4248380.191] [email protected](17, "zwp_relative_pointer_manager_v1", 1)
[4248380.201] [email protected](18, "zwp_pointer_constraints_v1", 1)
[4248380.211] [email protected](19, "wp_presentation", 1)
[4248380.220] [email protected](20, "zwlr_output_manager_v1", 1)
[4248380.230] [email protected](21, "zwlr_output_power_manager_v1", 1)
[4248380.240] [email protected](22, "zwp_input_method_manager_v2", 1)
[4248380.249] [email protected](23, "zwp_text_input_manager_v3", 1)
[4248380.259] [email protected](24, "zwlr_foreign_toplevel_manager_v1", 2)
[4248380.274] [email protected](25, "zwlr_export_dmabuf_manager_v1", 1)
[4248380.284] [email protected](26, "zwlr_screencopy_manager_v1", 3)
[4248380.299] [email protected](27, "zwlr_data_control_manager_v1", 2)
[4248380.309] [email protected](28, "zwp_primary_selection_device_manager_v1", 1)
[4248380.318] [email protected](29, "wp_viewporter", 1)
[4248380.328] [email protected](30, "zwp_virtual_keyboard_manager_v1", 1)
[4248380.338] [email protected](31, "zwlr_virtual_pointer_manager_v1", 2)
[4248380.347] [email protected](32, "zwlr_input_inhibit_manager_v1", 1)
[4248380.357] [email protected](33, "zwp_keyboard_shortcuts_inhibit_manager_v1", 1)
[4248380.371] [email protected](34, "wl_seat", 7)
[4248380.381] [email protected](35, "zwp_pointer_gestures_v1", 1)
[4248380.391] [email protected](39, "wl_output", 3)
[4248380.400] [email protected](40, "wl_output", 3)
[4248380.410] [email protected](41, "wl_output", 3)
[4248380.420] [email protected](2596)
[4248380.425]  -> [email protected](new id wl_callback@3)
[4248380.500] [email protected]_id(3)
[4248380.506] [email protected]("/dev/dri/card0")
[4248380.611]  -> [email protected](6)
[4248380.618] [email protected](808669761)
[4248380.623] [email protected](808669784)
[4248380.628] [email protected](808665665)
[4248380.632] [email protected](808665688)
[4248380.637] [email protected](875713089)
[4248380.642] [email protected](875713112)
[4248380.646] [email protected](909199186)
[4248380.654] [email protected](961959257)
[4248380.658] [email protected](825316697)
[4248380.663] [email protected](842093913)
[4248380.667] [email protected](909202777)
[4248380.672] [email protected](875713881)
[4248380.676] [email protected](842094158)
[4248380.681] [email protected](909203022)
[4248380.685] [email protected](1448695129)
[4248380.690] [email protected](1)
[4248380.695] [email protected](1211384385, 16777215, 4294967295)
[4248380.705] [email protected](1211384408, 16777215, 4294967295)
[4248380.715] [email protected](808669761, 16777215, 4294967295)
[4248380.724] [email protected](808669784, 16777215, 4294967295)
[4248380.734] [email protected](808665665, 16777215, 4294967295)
[4248380.744] [email protected](808665688, 16777215, 4294967295)
[4248380.754] [email protected](875713089, 16777215, 4294967295)
[4248380.763] [email protected](875708993, 16777215, 4294967295)
[4248380.773] [email protected](875713112, 16777215, 4294967295)
[4248380.782] [email protected](875709016, 16777215, 4294967295)
[4248380.792] [email protected](892424769, 16777215, 4294967295)
[4248380.802] [email protected](909199186, 16777215, 4294967295)
[4248380.811] [email protected](538982482, 16777215, 4294967295)
[4248380.821] [email protected](540422482, 16777215, 4294967295)
[4248380.830] [email protected](943215175, 16777215, 4294967295)
[4248380.840] [email protected](842224199, 16777215, 4294967295)
[4248380.849] [email protected](961959257, 16777215, 4294967295)
[4248380.859] [email protected](825316697, 16777215, 4294967295)
[4248380.869] [email protected](842093913, 16777215, 4294967295)
[4248380.878] [email protected](909202777, 16777215, 4294967295)
[4248380.888] [email protected](875713881, 16777215, 4294967295)
[4248380.898] [email protected](961893977, 16777215, 4294967295)
[4248380.907] [email protected](825316953, 16777215, 4294967295)
[4248380.917] [email protected](842094169, 16777215, 4294967295)
[4248380.926] [email protected](909203033, 16777215, 4294967295)
[4248380.936] [email protected](875714137, 16777215, 4294967295)
[4248380.945] [email protected](842094158, 16777215, 4294967295)
[4248380.955] [email protected](808530000, 16777215, 4294967295)
[4248380.965] [email protected](842084432, 16777215, 4294967295)
[4248380.974] [email protected](909193296, 16777215, 4294967295)
[4248380.987] [email protected](909203022, 16777215, 4294967295)
[4248380.997] [email protected](1448433985, 16777215, 4294967295)
[4248381.010] [email protected](1448434008, 16777215, 4294967295)
[4248381.019] [email protected](1448695129, 16777215, 4294967295)
[4248381.029] [email protected](1498831189, 16777215, 4294967295)
[4248381.038] [email protected](2596)
[4248381.044]  -> [email protected](new id wl_callback@3)
[4248381.068] [email protected]_id(3)
[4248381.075] [email protected]()
[4248381.078] [email protected](2596)
[19980:1003/140002.088964:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
[19947:1003/140002.112737:ERROR:wayland_window.cc(184)] Not implemented reached in virtual void ui::WaylandWindow::Activate()
[4248416.183] [email protected](1, fd 195, 48238)
[4248417.673] [email protected]_info(25, 600)
[19947:1003/140002.153267:WARNING:render_frame_host_impl.cc(789)] InterfaceRequest was dropped, the document is no longer active: blink.mojom.AppCacheBackend
[4248458.011]  -> [email protected]_params(new id zwp_linux_buffer_params_v1@24)
[4248458.031]  -> [email protected](fd 208, 0, 0, 7680, 16777215, 4294967295)
[4248458.050]  -> [email protected]_immed(new id wl_buffer<strong i="33">@25</strong>, 1920, 1240, 875708993, 0)
[4248458.123]  -> [email protected]_params(new id zwp_linux_buffer_params_v1@26)
[4248458.133]  -> [email protected](fd 204, 0, 0, 7680, 16777215, 4294967295)
[4248458.151]  -> [email protected]_immed(new id wl_buffer<strong i="34">@27</strong>, 1920, 1240, 875708993, 0)
[4248458.192]  -> [email protected]_params(new id zwp_linux_buffer_params_v1@28)
[4248458.200]  -> [email protected](fd 206, 0, 0, 7680, 16777215, 4294967295)
[4248458.218]  -> [email protected]_immed(new id wl_buffer<strong i="35">@29</strong>, 1920, 1240, 875708993, 0)
[19980:1003/140002.157746:FATAL:socket_utils_posix.cc(122)] Check failed: descriptors[i].get() >= 0 (-1 vs. 0)
#0 0x5646f5f6f3c9 base::debug::CollectStackTrace()
#1 0x5646f5ebdc33 base::debug::StackTrace::StackTrace()
#2 0x5646f5ed407f logging::LogMessage::~LogMessage()
#3 0x5646f5ed48fe logging::LogMessage::~LogMessage()
#4 0x5646f62b7973 mojo::SendmsgWithHandles()
#5 0x5646f346ef32 mojo::core::(anonymous namespace)::ChannelPosix::WriteNoLock()
#6 0x5646f346d036 mojo::core::(anonymous namespace)::ChannelPosix::Write()
#7 0x5646f3455e69 mojo::core::NodeChannel::WriteChannelMessage()
#8 0x5646f34567ed mojo::core::NodeChannel::SendChannelMessage()
#9 0x5646f345c368 mojo::core::NodeController::SendPeerEvent()
#10 0x5646f345c93b mojo::core::NodeController::ForwardEvent()
#11 0x5646f7ab6c7e mojo::core::ports::Node::SendUserMessageInternal()
#12 0x5646f7ab6910 mojo::core::ports::Node::SendUserMessage()
#13 0x5646f345a241 mojo::core::NodeController::SendUserMessage()
#14 0x5646f3454338 mojo::core::MessagePipeDispatcher::WriteMessage()
#15 0x5646f3446fba mojo::core::Core::WriteMessage()
#16 0x5646f628ccdc mojo::Connector::Accept()
#17 0x5646f629b61e mojo::internal::MultiplexRouter::InterfaceEndpoint::SendMessage()
#18 0x5646f628fefc mojo::InterfaceEndpointClient::SendMessage()
#19 0x5646f2e3ac17 ui::ozone::mojom::WaylandBufferManagerHostProxy::CommitOverlays()
#20 0x5646f2e02aeb ui::WaylandBufferManagerGpu::CommitOverlaysInternal()
#21 0x5646f2e04298 base::internal::Invoker<>::RunOnce()
#22 0x5646f5f1908b base::TaskAnnotator::RunTask()
#23 0x5646f5f321ac base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl()
#24 0x5646f5f31dd8 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork()
#25 0x5646f5ed8dd4 base::MessagePumpDefault::Run()
#26 0x5646f5f32a3c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run()
#27 0x5646f5efcfe5 base::RunLoop::Run()
#28 0x5646f9b1ee07 content::GpuMain()
#29 0x5646f4f1674d content::RunZygote()
#30 0x5646f4f17bae content::ContentMainRunnerImpl::Run()
#31 0x5646f3472397 content::RunContentProcess()
#32 0x5646f347248c content::ContentMain()
#33 0x5646f234fa9e main
#34 0x7f07cfaf7152 __libc_start_main
#35 0x5646f2337f6e _start
Task trace:
#0 0x5646f2e028cf ui::WaylandBufferManagerGpu::CommitOverlays()
#1 0x5646f2e32ba4 ui::GbmSurfacelessWayland::SwapBuffersAsync()
#2 0x5646f2e32ba4 ui::GbmSurfacelessWayland::SwapBuffersAsync()
#3 0x5646f7344b59 gpu::Scheduler::RunNextTask()
#4 0x5646f7344b59 gpu::Scheduler::RunNextTask()
Task trace buffer limit hit, update PendingTask::kTaskBacktraceLength to increase.

Received signal 6

下一步

我个人已经等了几年了,随着最近 Chromium 的进展,它看起来现在真的很接近了。

但仍有一些错误和问题留下,这就是为什么我在积极监测既铬和电子,看看是否有什么我可以做这个快发生有所帮助。 从对这个问题的兴趣来看,我很确定还有其他人也在做同样的事情,这让我相信这可能很快就会实施。

从好的方面来说,Electron 10 补丁目前对我来说效果很好,我已经在 Wayland 本地运行 Visual Studio Code 和 Slack 几个星期了,没有任何问题(尽管 vscode 需要一个小补丁才能与 Electron 兼容10)。 因此,在他们进入官方 Electron 构建之前,我认为这是目前在 Wayland 上运行 Electron 的好方法。

非常感谢您为此所做的一切努力。

@vially在上传这些补丁时的快速提醒,包括 Chromium 构建标志RTC_USE_PIPEWIRE=true将启用与来自 Mutter、KDE ​​和基于 wlroots 的合成器的电子应用程序(MS Teams/Slack/等)的屏幕共享。

即使当 Electron 仍在 XWayland 中运行时,该标志实际上也很有用,但是一旦 Wayland 支持上游 IMO,将其标准化绝对是有意义的。

@vially ,您

当然,我打算这样做,但由于我不完全确定这是一个 Chromium 错误,我想我会先对其进行更多调查。

这完全有可能是 Electron Wayland 补丁中的一个错误,或者它可能已经在上游 Chromium 中修复了,所以我想在创建 Chromium 错误之前排除这些问题。

有点题外话:我想你一定已经知道了,但如果没有,看起来目前 Chromium 87.0.4280.11引入了一个回归( 87.0.4278.0 )阻止 Chromium在 Wayland 上启动: chromium#1136287 (由#1136252复制)。 它不会以任何方式(或至少现在不会)影响 Electron,但我只是想我会提到它,以防您没有看到它并且您可能能够帮助对其进行分类。 @msisov

非常感谢所有为此付出时间和精力的人! 感谢@msisov和 Igalia 的朋友,感谢 @vially。

一个预编译的二进制文件也可用electron-nightly过几天,供想要尝试的每个人使用。


我在这个 repo 的任何地方都找不到RTC_USE_PIPEWIRE=true标志。 这似乎是(但不仅限于)wayland 应用程序和桌面环境的合乎逻辑的步骤。 应该有一个单独的问题吗?

我在这个 repo 的任何地方都找不到RTC_USE_PIPEWIRE=true标志。 这似乎是(但不仅限于)wayland 应用程序和桌面环境的合乎逻辑的步骤。 应该有一个单独的问题吗?

也许,我希望它会被包括在这里。 这是一个可以随时完成的简单修复。 我最近才知道它应该去哪里(我认为),所以我明天会尝试提交 PR。 问题是我需要时间和一个示例应用程序来测试它。

@danshick我也打算提交RTC_USE_PIPEWIRE=true的拉取请求,但我还没有这样做的唯一原因是因为我还没有能够在我的机器上使用 Chrome 进行屏幕共享(启用标志后)。 我不想为我无法测试的东西提交拉取请求。

但是如果能够测试这个的人可以弄清楚如何在 Electron 中启用它并提交拉取请求,那就太好了。

但是如果能够测试这个的人可以弄清楚如何在 Electron 中启用它并提交拉取请求,那就太好了。

我会试一试并在我有时间时将 PR 链接到这里

我会试一试并在我有时间时将 PR 链接到这里

哦,伙计,获取和构建电子是一件苦差事。 我终于把所有东西都拉出来了,所以希望我可以在接下来的几天内进行更改、构建和测试。

编辑: --script-executable=/usr/bin/python2 ,忘了 gn 是 python2 的坚定支持者。

Edit2: ...这还不够sed -i '1s|python$|&2|' third_party/dom_distiller_js/protoc_plugins/*.py

Edit3:我一直无法构建电子,在单元测试文件编译中出现错误,这应该与rtc_use_pipewire=true标志无关。 我知道这是可以做到的,因为AUR 中

../../components/net_log/net_export_file_writer_unittest.cc:876:22: error: variable type 'net_log::FakeNetworkContext' is an abstract class
  FakeNetworkContext fake_network_context;
                     ^
gen/services/network/public/mojom/network_context.mojom.h:617:16: note: unimplemented pure virtual method 'SetCertVerifierClient' in 'FakeNetworkContext'
  virtual void SetCertVerifierClient(::mojo::PendingRemote<CertVerifierClient> client) = 0;
               ^
1 error generated.
[38912/81310] CXX obj/components/network_time/unit_tests/network_time_tracker_unittest.o
ninja: build stopped: subcommand failed.


对于任何好奇的人,我正在尝试构建的补丁就是这个......

diff --git a/build/args/release.gn b/build/args/release.gn index e5017f6e1..3ecf23181 100644 --- a/build/args/release.gn +++ b/build/args/release.gn @@ -14,3 +14,6 @@ rtc_use_h264 = proprietary_codecs # who have an LGPL requirement to ship ffmpeg as a dynamically linked library, # we build ffmpeg as a shared library. is_component_ffmpeg = true + +# Enable pipewire support for screen casting on Wayland +rtc_use_pipewire = true diff --git a/build/args/testing.gn b/build/args/testing.gn index 8f62af6e4..db2a7752c 100644 --- a/build/args/testing.gn +++ b/build/args/testing.gn @@ -12,3 +12,6 @@ symbol_level = 1 # The initialization of the decoder depends on whether ffmpeg has # been built with H.264 support. rtc_use_h264 = proprietary_codecs + +# Enable pipewire support for screen casting on Wayland +rtc_use_pipewire = true

我不知道我是否应该把它放在这里,但到目前为止,我使用electron-nightly--enable-accelerated-mjpeg-decode --enable-accelerated-video --ignore-gpu-blacklist --enable-native-gpu-memory-buffers --enable-gpu-rasterization --enable-features=UseOzonePlatform --ozone-platform=wayland作为启动参数在 Wayland 下工作。 有一件事发生了,但是:任何窗口中都没有标题栏。

我应该开一个新问题还是我们可以在这里讨论?

@juxuanu你用的是什么合成器? 臭氧不是为了支持更简单的合成器而设计的。 如果您可以在 gnome-shell 上重现,那么它可能是一个错误。

@ninja- 它是 gnome-shell,所以 Mutter。 我想我们发现了一个错误。

Electron 使用服务器端装饰还是客户端装饰? GNOME 仅支持客户端。

@juxuanu这很有趣,因为我在用臭氧构建的铬稳定(86.x ...)上遇到了同样的问题。 所以这确实看起来像一些错误,但肯定不是稳定版的回归。 为什么你认为这是 Mutter 中的一个错误? 除了 Chromium 之外,其他所有 Wayland 本地应用程序似乎都可以在 Gnome 上运行。 这看起来更像是 Chromium 错误而不是 Mutter 错误。

为什么你认为这是 Mutter 中的一个错误? 除了 Chromium 之外,其他所有 Wayland 本地应用程序似乎都可以在 Gnome 上运行。 这看起来更像是 Chromium 错误而不是 Mutter 错误。

那是因为 Gnome 决定不支持服务器端装饰,这意味着所有应用程序都必须绘制自己的装饰 (https://gitlab.gnome.org/GNOME/mutter/-/issues/217)。

这意味着为了使 Electron 窗口在 Gnome 中看起来“正常”,需要发生以下任一情况:

  • Gnome 需要开始支持服务器端装饰(通过阅读链接的问题,这似乎不太可能),或者
  • 有人需要在 Electron 中添加对客户端装饰的支持

@vially哦,我想我误读了。 我以为我在读 Chromium,但他们在谈论 Electron(因为 Chromium 正在做客户端装饰,但我遇到了一些类似的问题)。

我已经考虑了更多,考虑到 Electron 已经在某些事情上使用 GTK,也许在 GNOME 中运行时,使用 GTK 绘制标题栏也不是很难。 如果它对愿意尝试的人有用,那么 Flutter 似乎正在这样做以有条件地启用 GNOME 中的标题栏装饰。

个人想法

我不是 GNOME 用户,所以我在这场比赛中没有马,但我仍然希望 GNOME 能够听取建设性的反馈并重新考虑他们在这方面的立场。

或者,也许libdecoration最终会被释放,这可能会在一定程度上缓解这个问题。 尽管我不确定是否要求应​​用程序链接到另一个库以使其在一个特定的合成器中正常运行(即使有些流行)是最好的结果。

老实说,我宁愿这整个窗户装饰的东西不要在电子中实现。 GNOME 开发人员表示“任何不按照他们的方式完成的事情都是不受支持的”,因此必须在所有客户端应用程序中解决这个问题只会增加所有下游应用程序的复杂性。

如果 GNOME 上的装饰被破坏,因为开发人员坚持“这就是它应该的方式”,那么就这样吧。 试图解决 GNOME 错误不断给非 GNOME 环境带来问题或不一致。

已经有足够多的应用程序以尝试在 GNOME 中正常工作的名义打破了微妙之处。 我宁愿将精力投入到关心标准化和跨 DE 兼容性的支持环境中。

Chromium 已经有了使用 GTK 绘制标题栏的代码:
https://chromium.googlesource.com/chromium/src/+/master/ui/gtk/native_theme_gtk.cc#695

在星期六,二〇二〇年十一月十四日,下午4:22雨果巴雷拉[email protected]写道:

老实说,我宁愿这整个窗户装饰都不
在电子中实现。 GNOME 开发人员的强硬立场是
“任何没有按照他们的方式完成的事情都是不受支持的”,所以必须解决这个问题
在所有客户端应用程序中只会增加所有下游应用程序的复杂性。

如果 GNOME 上的装饰被破坏,因为开发人员坚持“那是
应该是这样”,那就这样吧。尝试解决 GNOME 错误
不断给非 GNOME 环境带来问题或不一致。

已经有足够多的应用程序以尝试工作的名义打破了微妙之处
在 GNOME 中正确。 我宁愿努力投入支持环境
确实关心标准化和跨 DE 兼容性。


你收到这个是因为你被提到了。
直接回复本邮件,在GitHub上查看
https://github.com/electron/electron/issues/10915#issuecomment-727273382
或取消订阅
https://github.com/notifications/unsubscribe-auth/AAM4YSPJBCV2S5L5GULQVOTSP37J7ANCNFSM4EA2BOCA
.

那是因为 Gnome 决定不支持服务器端装饰,这意味着所有应用程序都必须绘制自己的装饰 (https://gitlab.gnome.org/GNOME/mutter/-/issues/217)。

这意味着为了使 Electron 窗口在 Gnome 中看起来“正常”,需要发生以下任一情况:

* Gnome needs to start supporting server-side decorations (by reading the linked issue, this seems unlikely), or

* someone needs to add support for client-side decorations in Electron

但是在链接的错误报告中有人指出:

这很明显,XDG 装饰规范本身需要客户的装饰支持。 它还明确允许
无视客户偏好的合成器。
也就是说,在配置事件中始终使用 client_side 模式的合成器实现将是完美的规范-
合规。 任何声称支持但不支持客户端装饰的客户端都不是。

因此,即使有人认为使用服务器端装饰更可取,但对于符合 Wayland 的客户端来说,它似乎必须支持 CSD。

这很明显,XDG 装饰规范本身需要客户的装饰支持。 它还明确允许
无视客户偏好的合成器。
也就是说,在配置事件中始终使用 client_side 模式的合成器实现将是完美的规范-
合规。 任何声称支持但不支持客户端装饰的客户端都不是。

FWIW,GNOME 根本不遵循此规则。 文件选择器之类的确认按钮被视为“装饰”,因此隐藏客户端装饰会隐藏主操作按钮。

也就是说,如果规范如此明确,那么我想电子支持这一点是有意义的。

我唯一担心的是应用程序开发人员最终可能会忘记考虑一种或另一种替代方案——客户端的这种灵活性听起来像是开发人员忽略的一个很好的因素。

可能有一个自动启用的客户端装饰的默认实现,然后为想要做一些更特定于应用程序的开发人员选择退出? 只是让没有服务器端装饰的人至少获得一些基础知识?

核心 Wayland 协议没有装饰的概念,除非另有明确说明(例如通过xdg_decoration如果实现 - 并记住一个简单的return CLIENT_SIDE将是一个有效的实现,尽管无意义的)

我赞成投票为此类主题创建单独的问题。 这个问题的最初原因是提供了一个 Wayland 构建,现在在夜间频道中完成。 我们肯定会遇到更多有关 Wayland 的问题,在此线程中讨论每个问题会产生大量垃圾邮件。

但是,关于标题栏的主题,我还将提到该问题也存在于 chrome 中,并且可能也需要在那里修复。 要在禁用 wayland 的情况下重现此打开的 chrome,请右键单击标题栏以确保启用“使用系统标题栏和边框”。 之后在启用wayland的情况下重新启动chrome,您将看到没有标题栏。 最好等待上游修复此问题。

任何 Wayland 构建都需要rtc_use_pipewire=true ,我认为应该在这里讨论。 @danshick我看到正在处理它。

任何 Wayland 构建都需要rtc_use_pipewire=true ,我认为应该在这里讨论。 @danshick我看到正在处理它。

不需要,但如果 desktopCapturer 可以工作,肯定会很有用。 启用该标志导致我遇到了许多构建错误。

我知道可以使用该标志进行构建,因为 AUR 电子臭氧程序包具有该标志,但是每当我尝试使用 desktopCapturer API 时,该程序包都会出现段错误,并且我一直没有成功修改该 PKGBUILD 以保留调试符号。

考虑到这种变化似乎不仅仅是添加标志和重建,而且它甚至来自 XWayland 也很有用的事实,我认为它可能最适合新问题/PR。

我知道可以使用该标志进行构建,因为 AUR 电子臭氧程序包具有该标志,但是每当我尝试使用 desktopCapturer API 时,该程序包都会出现段错误,并且我一直没有成功修改该 PKGBUILD 以保留调试符号。

调试符号对我有用 - 这可能是我的makepkg.conf相关部分:

#-- Compiler and Linker Flags
CPPFLAGS="-D_FORTIFY_SOURCE=2"
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt"
CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
#-- Make Flags: change this for DistCC/SMP systems
MAKEFLAGS="-j12"
#-- Debugging flags
#DEBUG_CFLAGS="-g -fvar-tracking-assignments"
#DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"
DEBUG_CFLAGS="-g -Og"
DEBUG_CXXFLAGS="-g -Og"

OPTIONS=(!strip docs !libtool !staticlibs emptydirs zipman purge debug)

感谢@hedgepigdaniel ,我尝试了!stripdebug选项,看起来它们在 pkgbuild 中受到尊重,但其中一些额外的编译器标志看起来很有用。

我仍然想得到这座建筑,因为它应该直接从 git 中取出,但至少我可以更立即地诊断出段错误。

此页面是否有帮助?
0 / 5 - 0 等级

相关问题

dangan-ronpa picture dangan-ronpa  ·  3评论

feross picture feross  ·  3评论

etiktin picture etiktin  ·  3评论

EladBezalel picture EladBezalel  ·  3评论

chonsser picture chonsser  ·  3评论