fix: prevent Chromium crash when moving windows between monitors (#2394)

* 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 <noreply@anthropic.com>

* Fix warnings and make conditional explicit

---------

Co-authored-by: Derek Castillo <d-cas@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: David Heinemeier Hansson <david@hey.com>
This commit is contained in:
Derek
2025-10-14 01:44:55 -07:00
committed by GitHub
parent 87d7bd966b
commit 800962b18f
3 changed files with 19 additions and 0 deletions

View File

@@ -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

View File

@@ -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

15
migrations/1760401344.sh Normal file
View File

@@ -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