New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Backport]: interface 'wl_output' has no event 4 #32487
Comments
|
Upstream Chromium issue: https://bugs.chromium.org/p/chromium/issues/detail?id=1279574 (Pri: 1). I wrote a more detailed motivation for backporting here: https://bugs.chromium.org/p/chromium/issues/detail?id=1279574#c19
|
|
Is this the same as #32436? |
|
No, unfortunately not. #32436 is another issue that I can also reproduce and it's also present on "older" Wayland compositors that don't support version 4 of the wl_outupt protocol yet. As an update on this issue: Both fixes are now backported to M98 by upstream: AFAIK that means they'll automatically land in Electron version 17 so I guess the question is not just whether to backport them to Electron version 16? |
|
Threw up a test cherry-pick: #32565 |
|
Looks like there are some merge conflicts. I don't currently have the time to look deeper into it, but I'd be happy for someone to take over that cherry-pick PR. |
|
Thanks @nornagon. I did just try to backport the fixes to M96 (96.0.4664.99 to be precise) and there was luckily only a small and simple to resolve merge conflict when using Git: diff --cc ui/ozone/platform/wayland/host/wayland_zaura_shell.cc
index a9e723769879a,1b5585f7c18de..0000000000000
--- a/ui/ozone/platform/wayland/host/wayland_zaura_shell.cc
+++ b/ui/ozone/platform/wayland/host/wayland_zaura_shell.cc
@@@ -18,7 -19,8 +18,14 @@@
namespace ui {
namespace {
++<<<<<<< HEAD
+constexpr uint32_t kMaxAuraShellVersion = 24;
++||||||| parent of dd4c3ddadbb98... [linux/wayland] Fixed terminate caused by binding to wrong version.
++constexpr uint32_t kMaxAuraShellVersion = 28;
++=======
+ constexpr uint32_t kMinVersion = 1;
+ constexpr uint32_t kMaxVersion = 28;
++>>>>>>> dd4c3ddadbb98... [linux/wayland] Fixed terminate caused by binding to wrong version.
}
// static
* Unmerged path ui/ozone/platform/wayland/host/surface_augmenter.ccThe other required change is that I've then proceeded to update your PR accordingly primeos@c5c69f1 (the diff is a bit large because I backported the original changes from M99 - I could also backport the cherry-picked commits from M98, if preferred). Those patches should now apply to M96 but I haven't done any testing. Feel free to use that changes if it helps (also applies if someone else is interested in opening a PR - I could also open a PR for a CI run but I cannot test Electron, unfortunately). |
|
@primeos if you want to throw up a PR and let our CI do the testing, that would be great! |
Those fixes are required to fix Ozone/Wayland on newer Wayland compositors. The previous behaviour is incorrect but worked as long as Wayland compositors didn't implement newer protocol versions that aren't supported yet by Ozone/Wayland (e.g. wl_output version 4). Fix electron#32487. Upstream Chromium issue: https://bugs.chromium.org/p/chromium/issues/detail?id=1279574 Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
Those patches are required to fix Ozone/Wayland on newer Wayland compositors. The previous behaviour is incorrect but worked as long as Wayland compositors didn't implement newer protocol versions that aren't supported yet by Ozone/Wayland (e.g. wl_output version 4). Fix electron#32487. Upstream Chromium issue: https://bugs.chromium.org/p/chromium/issues/detail?id=1279574 Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
Those patches are required to fix Ozone/Wayland on newer Wayland compositors. The previous behaviour is incorrect but worked as long as Wayland compositors didn't implement newer protocol versions that aren't supported yet by Ozone/Wayland (e.g. wl_output version 4). Fix electron#32487. Upstream Chromium issue: https://bugs.chromium.org/p/chromium/issues/detail?id=1279574 Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
Those patches are required to fix Ozone/Wayland on newer Wayland compositors. The previous behaviour is incorrect but worked as long as Wayland compositors didn't implement newer protocol versions that aren't supported yet by Ozone/Wayland (e.g. wl_output version 4). Fix electron#32487. Upstream Chromium issue: https://bugs.chromium.org/p/chromium/issues/detail?id=1279574 Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
|
@nornagon sure :) I've opened #32603 and the Linux builds already passed. However, I wasn't able to test/confirm if it works as expected (due to NixOS-specific issues / additional Electron issues). It would be awesome if you or someone else here could help with that. I've noted my results in #32603 (comment) (plus a link to the build artifact). |
|
I'm facing this issue too, using Arch Linux + Sway |
|
Here as well with Chrome and Discord. Element defaults to Xwayland and with the wayland flags it gives the above error. |
|
Same here on Artix + Sway. Bug reproduced with Brave and FreeTube. They work fine in XWayland. |
|
Does this work for electron 13 too? Or does it need a different fix? |
|
electron 13 is too different. I currently try to fix it there but wasn't able to build it yet. |
|
The fix for electron 13 should work now. I had to make a small change in wl_keyboard related code too. |
Thank you so much. |
This patch is required to fix Ozone/Wayland on recent compositors (e.g. wlroots 15). Chromium tries to bind to interface versions it does not support. This wasn't a problem until wl_output version 4 got released because chromium supported every version up to this. Fix #32487. Upstream chromium issue: https://bugs.chromium.org/p/chromium/issues/detail?id=1279574
|
On Arch + Sway until solved: Update: |
Also can tack sway and wlroots into IgnorePkg in /etc/pacman.conf (until solved) |
|
Yes, otherwise on upgrade is reinstalled again. I am using: |
|
in case somebody else has cleared their pacman cache: |
|
I've version locked sway and wlroots in order to use Seems to work with the fix @emvidi posted! |
@emvidi is there anything special that needs to be done to get Code to use this electron version? In other words, does Code (and other electron apps) bundle its electron dependency with it, or does it use a system-wide version? |
|
Note that electron-13 is no longer supported. |
|
@caleb-allen on arch Code has a dep on electron13 (at the moment) so I have installed first the package from aur (electron13-bin) and then code. I am no expert neither on arch nor electron/code, this is what is working for me at the mom. |
Preflight Checklist
Electron Version
16.0.6
What operating system are you using?
Other Linux
Operating System Version
NixOS 21.11
What arch are you using?
x64
Last Known Working Electron version
None
Expected Behavior
When electron is started using the ozone wayland platform it does not crash.
Actual Behavior
Under the latest wlroots or sway release, any electron app crashes at start with the error message in the title.
Testcase Gist URL
No response
Additional Information
This is an upstream issue in chromium and fixed with the following commit included with v99.0.4766.
However this chromium version is only uses in electron v18 nightly so far, so it might be worth back porting it to v17 and even v16.
The text was updated successfully, but these errors were encountered: