Skip to content

Fix power profile menu, screen sharing, screenshot HDR, and NVIDIA stability#5415

Closed
kuro-toji wants to merge 1 commit intobasecamp:devfrom
kuro-toji:fix/power-profile-screenshot-screen-sharing-nvidia
Closed

Fix power profile menu, screen sharing, screenshot HDR, and NVIDIA stability#5415
kuro-toji wants to merge 1 commit intobasecamp:devfrom
kuro-toji:fix/power-profile-screenshot-screen-sharing-nvidia

Conversation

@kuro-toji
Copy link
Copy Markdown

Summary

This PR fixes 4 bugs reported by users:

1. Power profile GUI not switching when clicked

  • Fix: omarchy-launch-walker was overriding menu arguments with defaults
  • Solution: Modified walker launcher to pass through --width, --maxheight, --minheight arguments properly
  • Users can now properly select power profiles from the GUI menu

2. Screen sharing notification bar 'Hide' button not responding

3. Screenshot regression with hyprpicker on HDR displays

4. NVIDIA GPU system lockups on media-heavy sites

Files Changed

  • bin/omarchy-launch-walker - Fix argument passing
  • bin/omarchy-cmd-screenshot - Add wayfreeze fallback for HDR
  • default/hypr/apps.conf - Source new screen-sharing config
  • default/hypr/apps/screen-sharing.conf - New window rules for screen sharing
  • install/config/nvidia-chromium-flags.sh - NVIDIA chromium flags installer
  • migrations/1777007316.sh - Screen sharing fix migration
  • migrations/1777007317.sh - NVIDIA stability fix migration
  • migrations/1777007318.sh - HDR screenshot fix migration

Testing

Please test:

  1. Power profile switching via Setup > Power Profile menu
  2. Screen sharing with Chrome/Chromium - verify Hide button works
  3. Screenshot functionality on HDR displays
  4. NVIDIA systems with media-heavy sites (YouTube, X/Twitter, etc.)

Copilot AI review requested due to automatic review settings April 24, 2026 05:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to address four user-reported regressions/issues in Omarchy around Walker menu sizing, Hyprland screen-sharing indicator interaction, HDR/Hyprpicker screenshot behavior, and NVIDIA/Chromium stability.

Changes:

  • Update Walker launcher to only apply default sizing args when the caller didn’t provide --width/--maxheight/--minheight.
  • Add new Hyprland screen-sharing rule config and source it from the default app rules.
  • Add migrations and an NVIDIA Chromium flags installer intended to improve NVIDIA stability, plus a wayfreeze-related migration for screenshots.

Reviewed changes

Copilot reviewed 6 out of 8 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
bin/omarchy-launch-walker Adjusts argument passthrough so defaults don’t override caller-provided sizing.
bin/omarchy-cmd-screenshot Introduces a wayfreeze-based capture path intended to improve results on HDR/NVIDIA.
default/hypr/apps.conf Sources a new screen-sharing-specific Hyprland rules file.
default/hypr/apps/screen-sharing.conf Adds Hyprland rules intended to make browser sharing indicators clickable.
install/config/nvidia-chromium-flags.sh Adds a helper intended to provide NVIDIA-optimized Chromium/Electron flags.
migrations/1777007316.sh Migration intended to apply the screen-sharing interaction fix.
migrations/1777007317.sh Migration intended to apply NVIDIA Wayland stability environment overrides.
migrations/1777007318.sh Migration intended to optionally re-install wayfreeze for screenshot compatibility.

[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread migrations/1777007317.sh Outdated
Comment on lines +10 to +14
# Add NVIDIA-specific environment variables
NVIDIA_ENV_FILE="$HOME/.config/hypr/env-nvidia.conf"

if [[ ! -f $NVIDIA_ENV_FILE ]]; then
cat > "$NVIDIA_ENV_FILE" << 'CONFEOF'
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This writes NVIDIA env overrides to ~/.config/hypr/env-nvidia.conf, but the shipped Hyprland config doesn’t source that file (it sources specific known files like the default envs.conf). Unless you also add a source = for this file (or append to a sourced env file), this migration won’t have any effect.

Suggested change
# Add NVIDIA-specific environment variables
NVIDIA_ENV_FILE="$HOME/.config/hypr/env-nvidia.conf"
if [[ ! -f $NVIDIA_ENV_FILE ]]; then
cat > "$NVIDIA_ENV_FILE" << 'CONFEOF'
# Add NVIDIA-specific environment variables to a sourced Hyprland env file
NVIDIA_ENV_FILE="$HOME/.config/hypr/envs.conf"
mkdir -p "$(dirname "$NVIDIA_ENV_FILE")"
if ! grep -Fq "# NVIDIA-specific environment variables for better Wayland compatibility" "$NVIDIA_ENV_FILE" 2>/dev/null; then
cat >> "$NVIDIA_ENV_FILE" << 'CONFEOF'

Copilot uses AI. Check for mistakes.
Comment thread install/config/nvidia-chromium-flags.sh Outdated

# 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"
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CHROMIUM_FLAGS includes spaces after commas in --disable-features=Vulkan, VulkanFromANGLE, .... If this string is later expanded into args, those spaces can split the value and break Chromium’s flag parsing. Use a comma-separated list without spaces (or ensure the flags are passed as an array).

Suggested change
export CHROMIUM_FLAGS="--ozone-platform=x11 --enable-features=VaapiVideoDecoder,VaapiVideoEncoder --disable-features=Vulkan, VulkanFromANGLE, DefaultANGLEVulkan"
export CHROMIUM_FLAGS="--ozone-platform=x11 --enable-features=VaapiVideoDecoder,VaapiVideoEncoder --disable-features=Vulkan,VulkanFromANGLE,DefaultANGLEVulkan"

Copilot uses AI. Check for mistakes.
Comment thread default/hypr/apps/screen-sharing.conf Outdated
Comment on lines +6 to +16
windowrule = opacity 1.0 1.0, class:^(chrome-shill-webui|chrome-webui-media-router|chrome-extension),title:.*(screen|sharing|tab|cast).*
windowrule = nofocus, class:^(chrome-shill-webui|chrome-webui-media-router),title:.*indicator.*

# 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)

# Force the WebRTC indicator to be focusable and receive mouse events
layerrule = ignore_zero_containers on, class:^(chrome-shill-webui|chrome-webui-media-router)$
layerrule = no_anim on, class:^(chrome-shill-webui|chrome-webui-media-router)$
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hyprland config in this repo uses the 0.53+ match: syntax (e.g. match:class, match:title) and rules like no_focus on. These windowrule lines use class:/title: and nofocus, so they are likely ignored and won’t affect the WebRTC indicator windows.

Suggested change
windowrule = opacity 1.0 1.0, class:^(chrome-shill-webui|chrome-webui-media-router|chrome-extension),title:.*(screen|sharing|tab|cast).*
windowrule = nofocus, class:^(chrome-shill-webui|chrome-webui-media-router),title:.*indicator.*
# 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)
# Force the WebRTC indicator to be focusable and receive mouse events
layerrule = ignore_zero_containers on, class:^(chrome-shill-webui|chrome-webui-media-router)$
layerrule = no_anim on, class:^(chrome-shill-webui|chrome-webui-media-router)$
windowrule = opacity 1.0 1.0, match:class:^(chrome-shill-webui|chrome-webui-media-router|chrome-extension), match:title:.*(screen|sharing|tab|cast).*
windowrule = no_focus on, match:class:^(chrome-shill-webui|chrome-webui-media-router), match:title:.*indicator.*
# Ensure notification popups from browsers receive input
windowrule = float, match:class:^(chrome|chromium|brave|microsoft-edge), match:title:.*(screen sharing|Sharing|is sharing|Stop sharing|Hide)
windowrule = noborder, match:class:^(chrome|chromium|brave|microsoft-edge), match:title:.*(screen sharing|Sharing|is sharing|Stop sharing|Hide)
windowrule = noblur, match:class:^(chrome|chromium|brave|microsoft-edge), match:title:.*(screen sharing|Sharing|is sharing|Stop sharing|Hide)
# Force the WebRTC indicator to be focusable and receive mouse events
layerrule = ignore_zero_containers on, match:class:^(chrome-shill-webui|chrome-webui-media-router)$
layerrule = no_anim on, match:class:^(chrome-shill-webui|chrome-webui-media-router)$

Copilot uses AI. Check for mistakes.
Comment thread default/hypr/apps/screen-sharing.conf Outdated
Comment on lines +10 to +12
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)
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These rules also use windowrule = float / noborder / noblur without the ... on pattern and without match: selectors seen elsewhere in the repo. If Hyprland ignores them, the intended clickability fix won’t apply.

Suggested change
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 on match:class:^(chrome|chromium|brave|microsoft-edge)$,title:.*(screen sharing|Sharing|is sharing|Stop sharing|Hide).*
windowrule = noborder on match:class:^(chrome|chromium|brave|microsoft-edge)$,title:.*(screen sharing|Sharing|is sharing|Stop sharing|Hide).*
windowrule = noblur on match:class:^(chrome|chromium|brave|microsoft-edge)$,title:.*(screen sharing|Sharing|is sharing|Stop sharing|Hide).*

Copilot uses AI. Check for mistakes.
Comment on lines +7 to +24
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"

Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Omarchy’s Chromium flag management appears to use ~/.config/chromium-flags.conf (see bin/omarchy-refresh-chromium). This installer writes a separate ~/.config/chromium-flags/set-flags script, but nothing in the repo invokes or sources it, so the NVIDIA flags likely never apply.

Suggested change
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

Copilot uses AI. Check for mistakes.
Comment thread default/hypr/apps.conf
source = ~/.local/share/omarchy/default/hypr/apps/terminals.conf
source = ~/.local/share/omarchy/default/hypr/apps/walker.conf
source = ~/.local/share/omarchy/default/hypr/apps/webcam-overlay.conf
source = ~/.local/share/omarchy/default/hypr/apps/screen-sharing.conf
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default/hypr/apps/browser.conf already 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.

Suggested change
source = ~/.local/share/omarchy/default/hypr/apps/screen-sharing.conf
# screen-sharing.conf is intentionally not sourced here because browser.conf
# already contains screen-sharing window rules; loading both creates
# conflicting behavior until the older browser rule is updated/removed.

Copilot uses AI. Check for mistakes.
Comment thread default/hypr/apps/screen-sharing.conf Outdated
Comment on lines +15 to +16
layerrule = ignore_zero_containers on, class:^(chrome-shill-webui|chrome-webui-media-router)$
layerrule = no_anim on, class:^(chrome-shill-webui|chrome-webui-media-router)$
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

layerrule matching in this repo uses match:namespace (see default/hypr/apps/hyprshot.conf). Using class: here is likely invalid for layer rules, so these directives probably won't have any effect.

Suggested change
layerrule = ignore_zero_containers on, class:^(chrome-shill-webui|chrome-webui-media-router)$
layerrule = no_anim on, class:^(chrome-shill-webui|chrome-webui-media-router)$
layerrule = ignore_zero_containers on, match:namespace:^(chrome-shill-webui|chrome-webui-media-router)$
layerrule = no_anim on, match:namespace:^(chrome-shill-webui|chrome-webui-media-router)$

Copilot uses AI. Check for mistakes.
Comment thread migrations/1777007316.sh
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)
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The windowrule syntax emitted by this migration (class:/title: qualifiers and windowrule = float without match: selectors) doesn’t match the Hyprland 0.53+ syntax used in the shipped configs. This likely results in the rules being ignored, so the migration wouldn’t fix #5373.

Suggested change
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))

Copilot uses AI. Check for mistakes.
…ability

This commit addresses 4 bugs reported by users:

1. Power profile GUI not switching when clicked (#power-profile)
   - Fix omarchy-launch-walker to properly pass through --width,
     --maxheight, --minheight arguments to walker
   - Prevents walker defaults from overriding menu-specific arguments
   - Users can now properly select power profiles from the GUI menu

2. Screen sharing notification bar 'Hide' button not responding
   - Add window rules for Chromium/Chrome WebRTC indicator windows
   - Ensure notification popups receive input events properly
   - Fixes: basecamp#5373

3. Screenshot regression with hyprpicker on HDR displays
   - Add wayfreeze fallback for HDR displays
   - wayfreeze provides proper color handling for HDR screenshots
   - Add migration to reinstall wayfreeze for HDR users
   - Fixes: basecamp#5376

4. NVIDIA GPU system lockups on media-heavy sites
   - Add NVIDIA-specific environment variables for Wayland stability
   - Add chromium flags installer for NVIDIA GPU optimization
   - Helps prevent DMA allocation errors and system lockups
   - Fixes: basecamp#5372
@kuro-toji kuro-toji force-pushed the fix/power-profile-screenshot-screen-sharing-nvidia branch from c7abbdd to ffcde4d Compare April 24, 2026 06:14
@kuro-toji
Copy link
Copy Markdown
Author

This PR is superseded by #5422 which combines all fixes with proper Copilot review feedback addressed. Please review that PR instead.

@kuro-toji kuro-toji closed this Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants