From 6ac7c0c4d0e8f4fdae1f08f263f23c689f1ecb76 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Sun, 10 Nov 2024 09:49:25 +0800 Subject: [PATCH] xorg.libX11: Fix spurious Xerror when running synchronized This backports https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/264. This fixes 'XIO: fatal IO error 9 (Bad file descriptor) on X server ":102"' when GNOME's mutter is tearing down. ref: https://src.fedoraproject.org/rpms/libX11/c/ddc5e3368d876332178857fbdd3dce97fe614f9c ref: https://gitlab.gnome.org/GNOME/mutter/-/commit/f88b54502c77000d70e30984e7903b808d947049 --- pkgs/servers/x11/xorg/overrides.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index fcc9937b63b8b..94158aa99fcd9 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -149,6 +149,14 @@ self: super: libX11 = super.libX11.overrideAttrs (attrs: { outputs = [ "out" "dev" "man" ]; + patches = [ + # Fix spurious Xerror when running synchronized + # https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/264 + (fetchpatch { + url = "https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/f3d6ebac35301d4ad068e307f0fbe6aa12ccbccb.patch"; + hash = "sha256-wQNMsbQ+h9VlNiWr+r34AxvViC8fq02ZhcARRnw7O9k="; + }) + ]; configureFlags = attrs.configureFlags or [] ++ malloc0ReturnsNullCrossFlag ++ lib.optional (stdenv.targetPlatform.useLLVM or false) "ac_cv_path_RAWCPP=cpp";