-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Fix power profile menu, screen sharing, screenshot HDR, and NVIDIA stability #5415
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # Screen sharing notification bar fixes | ||
| # Fix for: Screen sharing notification bar "Hide" button not responding to clicks | ||
| # The notification bar from Chromium/Chrome needs proper input handling | ||
|
|
||
| # Note: These rules use Hyprland 0.53+ match: syntax | ||
|
|
||
| # WebRTC indicator windows from Chromium should float and not steal focus | ||
| # but should still receive input for the Hide button | ||
| windowrule = float on, match:title ^(chrome-shill-webui|chrome-webui-media-router)$ | ||
| windowrule = no_focus on, match:title ^(chrome-shill-webui|chrome-webui-media-router)$ | ||
|
|
||
| # Screen sharing notification bar - float and receive input | ||
| windowrule = float on, match:title .*(screen sharing|Sharing|is sharing|Stop sharing|Hide).* | ||
| windowrule = noborder on, match:title .*(screen sharing|Sharing|is sharing|Stop sharing|Hide).* | ||
|
|
||
| # Ensure WebRTC indicator layer windows can receive input | ||
| # Note: layerrule uses match:namespace for namespace matching |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,28 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #!/bin/bash | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Install Chromium flags for better NVIDIA Wayland stability | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Fix for: System lockups on NVIDIA GPUs when browsing media-heavy sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CHROMIUM_FLAGS_DIR="$HOME/.config" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| mkdir -p "$CHROMIUM_FLAGS_DIR" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Write NVIDIA-optimized Chromium flags to the config file Omarchy reads | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cat > "$CHROMIUM_FLAGS_DIR/chromium-flags.conf" << 'CONFEOF' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # NVIDIA-optimized Chromium flags for Wayland systems with NVIDIA GPUs | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --ozone-platform=x11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --enable-features=VaapiVideoDecoder,VaapiVideoEncoder | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --disable-features=Vulkan,VulkanFromANGLE,DefaultANGLEVulkan | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CONFEOF | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Also set environment variables for Electron apps | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| NVIDIA_ENV_FILE="$HOME/.config/hypr/envs.conf" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if ! grep -q "OZONE_PLATFORM,x11" "$NVIDIA_ENV_FILE" 2>/dev/null; then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cat >> "$NVIDIA_ENV_FILE" << 'ENVEOF' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # NVIDIA Chromium/Electron stability | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| env = ELECTRON_OZONE_PLATFORM_HINT,x11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| env = OZONE_PLATFORM,x11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ENVEOF | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+7
to
+27
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| mkdir -p "$CHROMIUM_FLAGS_DIR" | |
| # Create a helper script that sets NVIDIA-optimized flags | |
| cat > "$HOME/.config/chromium-flags/set-flags" << 'EOF' | |
| #!/bin/bash | |
| # NVIDIA-optimized Chromium flags for Wayland | |
| # Prevents system lockups on media-heavy sites | |
| # Use X11 backend instead of Wayland for Chromium on NVIDIA | |
| # Wayland + NVIDIA + Chromium can cause lockups | |
| export CHROMIUM_FLAGS="--ozone-platform=x11 --enable-features=VaapiVideoDecoder,VaapiVideoEncoder --disable-features=Vulkan, VulkanFromANGLE, DefaultANGLEVulkan" | |
| # Apply to Electron apps too | |
| export ELECTRON_OZONE_PLATFORM_HINT=x11 | |
| EOF | |
| chmod +x "$HOME/.config/chromium-flags/set-flags" | |
| CHROMIUM_FLAGS_FILE="$HOME/.config/chromium-flags.conf" | |
| mkdir -p "$CHROMIUM_FLAGS_DIR" | |
| # Write NVIDIA-optimized Chromium flags to the config file Omarchy reads | |
| cat > "$CHROMIUM_FLAGS_FILE" << 'EOF' | |
| # NVIDIA-optimized Chromium flags for Wayland systems with NVIDIA GPUs | |
| --ozone-platform=x11 | |
| --enable-features=VaapiVideoDecoder,VaapiVideoEncoder | |
| --disable-features=Vulkan,VulkanFromANGLE,DefaultANGLEVulkan | |
| EOF |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,22 @@ | ||||||||||||||
| #!/bin/bash | ||||||||||||||
|
|
||||||||||||||
| # Fix screen sharing notification bar "Hide" button not responding | ||||||||||||||
| # See: https://github.com/basecamp/omarchy/issues/5373 | ||||||||||||||
|
|
||||||||||||||
| echo "Adding screen sharing notification bar fixes" | ||||||||||||||
|
|
||||||||||||||
| # Add screen-sharing.conf to the app configs if it doesn't exist | ||||||||||||||
| SCREEN_SHARING_CONF="$HOME/.config/hypr/apps/screen-sharing.conf" | ||||||||||||||
| if [[ ! -f $SCREEN_SHARING_CONF ]]; then | ||||||||||||||
| cat > "$SCREEN_SHARING_CONF" << 'CONFEOF' | ||||||||||||||
| # Screen sharing notification bar fixes | ||||||||||||||
| # Fix for: Screen sharing notification bar "Hide" button not responding to clicks | ||||||||||||||
| # The notification bar from Chromium/Chrome needs to be on a layer that receives input | ||||||||||||||
|
|
||||||||||||||
| # Ensure notification popups from browsers receive input | ||||||||||||||
| windowrule = float, class:^(chrome|chromium|brave|microsoft-edge),title:.*(screen sharing|Sharing|is sharing|Stop sharing|Hide) | ||||||||||||||
| windowrule = noborder, class:^(chrome|chromium|brave|microsoft-edge),title:.*(screen sharing|Sharing|is sharing|Stop sharing|Hide) | ||||||||||||||
| windowrule = noblur, class:^(chrome|chromium|brave|microsoft-edge),title:.*(screen sharing|Sharing|is sharing|Stop sharing|Hide) | ||||||||||||||
|
Comment on lines
+17
to
+19
|
||||||||||||||
| windowrule = float, class:^(chrome|chromium|brave|microsoft-edge),title:.*(screen sharing|Sharing|is sharing|Stop sharing|Hide) | |
| windowrule = noborder, class:^(chrome|chromium|brave|microsoft-edge),title:.*(screen sharing|Sharing|is sharing|Stop sharing|Hide) | |
| windowrule = noblur, class:^(chrome|chromium|brave|microsoft-edge),title:.*(screen sharing|Sharing|is sharing|Stop sharing|Hide) | |
| windowrule = float, match:(class:^(chrome|chromium|brave|microsoft-edge)$,title:.*(screen sharing|Sharing|is sharing|Stop sharing|Hide)) | |
| windowrule = noborder, match:(class:^(chrome|chromium|brave|microsoft-edge)$,title:.*(screen sharing|Sharing|is sharing|Stop sharing|Hide)) | |
| windowrule = noblur, match:(class:^(chrome|chromium|brave|microsoft-edge)$,title:.*(screen sharing|Sharing|is sharing|Stop sharing|Hide)) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Fix NVIDIA GPU system lockups on media-heavy sites | ||
| # See: https://github.com/basecamp/omarchy/issues/5372 | ||
|
|
||
| echo "Adding NVIDIA Wayland stability fixes" | ||
|
|
||
| # Check if we're on NVIDIA | ||
| if command -v nvidia-smi &>/dev/null; then | ||
| # Add NVIDIA-specific environment variables to the existing envs.conf | ||
| NVIDIA_ENV_FILE="$HOME/.config/hypr/envs.conf" | ||
|
|
||
| # Ensure the file exists and is sourced | ||
| if [[ ! -f $NVIDIA_ENV_FILE ]]; then | ||
| mkdir -p "$(dirname "$NVIDIA_ENV_FILE")" | ||
| touch "$NVIDIA_ENV_FILE" | ||
| fi | ||
|
|
||
| # Check if NVIDIA fixes are already applied | ||
| if ! grep -q "# NVIDIA Wayland stability fixes" "$NVIDIA_ENV_FILE" 2>/dev/null; then | ||
| cat >> "$NVIDIA_ENV_FILE" << 'CONFEOF' | ||
|
|
||
| # NVIDIA Wayland stability fixes | ||
| # Use X11 platform hint for Chromium/Electron on NVIDIA Wayland | ||
| # This prevents VA-API/Vulkan conflicts that cause lockups | ||
| env = ELECTRON_OZONE_PLATFORM_HINT,x11 | ||
| env = OZONE_PLATFORM,x11 | ||
| CONFEOF | ||
| notify-send "NVIDIA stability fix applied" "Restart Hyprland to apply NVIDIA stability improvements" | ||
| else | ||
| echo "NVIDIA stability fix already applied" | ||
| fi | ||
| else | ||
| echo "No NVIDIA GPU detected, skipping NVIDIA-specific fixes" | ||
| fi |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Fix screenshot regression with hyprpicker on HDR displays | ||
| # See: https://github.com/basecamp/omarchy/issues/5376 | ||
|
|
||
| echo "Adding screenshot HDR fix" | ||
|
|
||
| # Backup existing screenshot script | ||
| if [[ -f ~/.local/share/omarchy/bin/omarchy-cmd-screenshot ]]; then | ||
| cp ~/.local/share/omarchy/bin/omarchy-cmd-screenshot ~/.local/share/omarchy/bin/omarchy-cmd-screenshot.bak | ||
| fi | ||
|
|
||
| # The fix adds wayfreeze fallback for HDR displays where hyprpicker causes color issues | ||
| # wayfreeze was removed in migration 1762156000, but it may still be needed for HDR compatibility | ||
| # This migration reinstalls wayfreeze for users who need it | ||
|
|
||
| if ! omarchy-cmd-present wayfreeze; then | ||
| if gum confirm "Install wayfreeze for better HDR screenshot support?"; then | ||
| omarchy-pkg-add wayfreeze | ||
| fi | ||
| fi | ||
|
|
||
| notify-send "Screenshot HDR fix applied" "Restart Hyprland to apply changes" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default/hypr/apps/browser.confalready has a rule that moves screen-sharing bars matching.*is sharing.*to a special workspace (hiding them). If the goal is to make the bar clickable (so the Hide button works), that existing rule may still apply and effectively bypass this new config; consider updating/removing the older rule to avoid conflicting behavior.