Skip to content

Fix internal monitor disable for systems where built-in display is not eDP-1#5511

Merged
dhh merged 1 commit intobasecamp:devfrom
17xande:fix/internal-monitor-dynamic-edp-detection
Apr 30, 2026
Merged

Fix internal monitor disable for systems where built-in display is not eDP-1#5511
dhh merged 1 commit intobasecamp:devfrom
17xande:fix/internal-monitor-dynamic-edp-detection

Conversation

@17xande
Copy link
Copy Markdown
Contributor

@17xande 17xande commented Apr 30, 2026

Problem

default/hypr/toggles/internal-monitor-disable.conf hardcodes monitor=eDP-1,disable. On laptops with hybrid GPUs (e.g. Intel iGPU + NVIDIA dGPU), the iGPU claims eDP-1 as a disconnected connector while the actual built-in panel is enumerated as eDP-2 or higher. Hyprland silently accepts the config but does nothing, so the toggle fires the notification but the display stays on.

Fixes #5443.

Solution

Detect the internal monitor name dynamically at runtime using hyprctl monitors -j, following the same pattern already used in omarchy-hyprland-monitor-internal-mirror. The disable() function now writes the toggle flag file directly with the detected name instead of copying the static conf.

The static default/hypr/toggles/internal-monitor-disable.conf is removed — it is no longer needed.

Testing

Tested on a system where the built-in display is eDP-2 (Intel + NVIDIA hybrid GPU). Both the lid switch and the keyboard shortcut correctly disable and re-enable the internal monitor.

AI Disclosure

Claude assisted with identifying the pattern in the omarchy-hyprland-monitor-internal-mirror script. I wasn't 100% happy with it's attempt at fixing it so I refactored it to match the style in the mirror script.

Detect the internal monitor name dynamically at runtime instead of
hardcoding eDP-1 in a static toggle conf file. Uses the same pattern
as omarchy-hyprland-monitor-internal-mirror.

Fixes basecamp#5443
Copilot AI review requested due to automatic review settings April 30, 2026 12:54
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

Updates the Hyprland “internal monitor disable” toggle to dynamically detect the laptop panel output name at runtime (via hyprctl monitors -j), addressing systems where the built-in display is not eDP-1 (Fixes #5443).

Changes:

  • Detect the internal monitor output name dynamically in omarchy-hyprland-monitor-internal.
  • Write the toggle flag config directly using the detected output name and reload Hyprland.
  • Remove the now-unneeded static toggle config default/hypr/toggles/internal-monitor-disable.conf.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
default/hypr/toggles/internal-monitor-disable.conf Removes the hardcoded monitor=eDP-1,disable static toggle source.
bin/omarchy-hyprland-monitor-internal Computes the internal output name dynamically and writes the state toggle config directly.

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.

@timbelmon
Copy link
Copy Markdown
Contributor

timbelmon commented Apr 30, 2026

Glad to see the dynamic detection actually working 👍

@dhh dhh merged commit 5683b1b into basecamp:dev Apr 30, 2026
3 of 4 checks passed
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.

Laptop display toggle fails on ASUS TUF Dash F15 (Internal monitor named eDP-2)

4 participants