From 800962b18fe39e1bb8b4be6e7206f7ce214b519b Mon Sep 17 00:00:00 2001 From: Derek Date: Tue, 14 Oct 2025 01:44:55 -0700 Subject: [PATCH] fix: prevent Chromium crash when moving windows between monitors (#2394) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: prevent Chromium crash when moving windows between monitors Adds --disable-features=WaylandWpColorManagerV1 to Chromium and Brave flag configs to prevent crashes when moving windows between monitors or workspaces on Hyprland. This is a workaround for a Chromium/Wayland color management conflict. Upstream Chromium fix exists but won't reach stable for ~a month. This provides a temporary bridge until the fix lands in stable releases. Fixes #2384 Refs #2184 Refs: https://github.com/hyprwm/Hyprland/issues/11957 Refs: https://github.com/hyprwm/Hyprland/discussions/11961 Refs: https://issues.chromium.org/issues/40263183 Refs: https://chromium-review.googlesource.com/c/chromium/src/+/7003036 * Add migration to update existing Chromium/Brave configs with crash fix Adds migration script to append --disable-features=WaylandWpColorManagerV1 to existing users' chromium-flags.conf and brave-flags.conf files. The script: - Checks if config files exist before attempting to modify them - Uses grep to verify the flag isn't already present - Only adds the flag and explanatory comment if needed - Handles both Chromium and Brave configurations This ensures existing Omarchy users get the Hyprland crash workaround without needing to manually update their configs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude * Fix warnings and make conditional explicit --------- Co-authored-by: Derek Castillo Co-authored-by: Claude Co-authored-by: David Heinemeier Hansson --- config/brave-flags.conf | 2 ++ config/chromium-flags.conf | 2 ++ migrations/1760401344.sh | 15 +++++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 migrations/1760401344.sh diff --git a/config/brave-flags.conf b/config/brave-flags.conf index d6d120e..3510e03 100644 --- a/config/brave-flags.conf +++ b/config/brave-flags.conf @@ -1,3 +1,5 @@ --ozone-platform=wayland --ozone-platform-hint=wayland --enable-features=TouchpadOverscrollHistoryNavigation +# Chromium crash workaround for Wayland color management on Hyprland - see https://github.com/hyprwm/Hyprland/issues/11957 +--disable-features=WaylandWpColorManagerV1 diff --git a/config/chromium-flags.conf b/config/chromium-flags.conf index 88c8082..bce00d5 100644 --- a/config/chromium-flags.conf +++ b/config/chromium-flags.conf @@ -2,3 +2,5 @@ --ozone-platform-hint=wayland --enable-features=TouchpadOverscrollHistoryNavigation --load-extension=~/.local/share/omarchy/default/chromium/extensions/copy-url +# Chromium crash workaround for Wayland color management on Hyprland - see https://github.com/hyprwm/Hyprland/issues/11957 +--disable-features=WaylandWpColorManagerV1 diff --git a/migrations/1760401344.sh b/migrations/1760401344.sh new file mode 100644 index 0000000..5e5ca30 --- /dev/null +++ b/migrations/1760401344.sh @@ -0,0 +1,15 @@ +echo "Add Chromium crash workaround flag for Hyprland to existing configs" + +# Add flag to chromium-flags.conf if it exists and doesn't already have it +if [[ -f ~/.config/chromium-flags.conf ]]; then + if ! grep -qF -- "--disable-features=WaylandWpColorManagerV1" ~/.config/chromium-flags.conf; then + sed -i '$a # Chromium crash workaround for Wayland color management on Hyprland - see https://github.com/hyprwm/Hyprland/issues/11957\n--disable-features=WaylandWpColorManagerV1' ~/.config/chromium-flags.conf + fi +fi + +# Add flag to brave-flags.conf if it exists and doesn't already have it +if [[ -f ~/.config/brave-flags.conf ]]; then + if ! grep -qF -- "--disable-features=WaylandWpColorManagerV1" ~/.config/brave-flags.conf; then + sed -i '$a # Chromium crash workaround for Wayland color management on Hyprland - see https://github.com/hyprwm/Hyprland/issues/11957\n--disable-features=WaylandWpColorManagerV1' ~/.config/brave-flags.conf + fi +fi