From cf8b14541445a6ed5b8f596ded0e65d3b3667eb3 Mon Sep 17 00:00:00 2001 From: emilylange Date: Tue, 15 Apr 2025 21:42:49 +0200 Subject: [PATCH] chromium: fix SIGKILL when trying to screenshare with PipeWire 1.4 See . Electron is not affected by this because it is built with use_cfi=false. --- .../networking/browsers/chromium/common.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index d4532106533f..573eed048030 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -520,6 +520,20 @@ let revert = true; hash = "sha256-PuinMLhJ2W4KPXI5K0ujw85ENTB1wG7Hv785SZ55xnY="; }) + ] + ++ lib.optionals (!isElectron && !chromiumVersionAtLeast "137") [ + # Backport "Add more CFI suppressions for inline PipeWire functions" from M137 + # to fix SIGKILL (ud1) when screensharing with PipeWire 1.4+ and is_cfi = true. + # Our chromium builds set is_official_build = true, which in turn enables is_cfi. + # We don't apply this patch to electron, because we build electron with + # is_cfi = false and as such is not affected by this. + # https://chromium-review.googlesource.com/c/chromium/src/+/6421030 + (fetchpatch { + name = "add-more-CFI-suppressions-for-inline-PipeWire-functions.patch"; + url = "https://chromium.googlesource.com/chromium/src/+/0eebf40b9914bca8fe69bef8eea89522c1a5d4ce^!?format=TEXT"; + decode = "base64 -d"; + hash = "sha256-xMqGdu5Q8BGF/OIRdmMzPrrrMGDOSY2xElFfhRsJlDU="; + }) ]; postPatch =