Can't disable laptop monitor with `hyprctl keyword monitor 'eDP-1, disable'`

When i run hyprctl keyword monitor 'eDP-1, disable' it disables my laptop monitor for a sec and immediately enables it back with that ‘phantom monitor’ with empty desktop except the wallpaper. Essentially i can’t even disable my laptop monitor at all right now via this hyprctl command without completely breaking hyprland and needing to kill it. Issue appeared NOT with latest upgrade to v0.50. Disabling external monitor with that command works, problem only touches laptop monitor.

Similar issue that yields same results was brought up on discord by ‘jficz’:

so, I’ve got this ghost / phantom monitor issue - after sleep, when disconnected from the dock, sometimes the connected monitor remains present in hyprctl monitors (as DP-4, ID n) and after reconnecting, another monitor appears as DP-4 (ID n+1) but it is the same monitor. This breaks rendering as the original (now phantom) monitor remains in use by Hyprland but the new actual monitor is somehow “drawn over” it - the symptom is that the desktop is completely empty (except background) but the cursor shape changes according to whatever is (probably) “displayed” on the phantom monitor. hyprctl keyword monitor 'DP-4,disable' does nothing (apparent). Checking /sys/class/drm , the DP-4 device disappears when the monitor disconnects and there is no indication of multiple monitors there when it is reconnected again,

This sounds like some driver shenanigans to me, tbh.

Please run inxi -G and paste the output Did you try added the disable to your config and reboot?

Just adding monitor = eDP1, disable to config does indeed do the job, no reboot needed, no phantom monitors.

The inxi -G output:

Graphics:
  Device-1: Intel Meteor Lake-P [Intel Arc Graphics] driver: i915 v: kernel
  Device-2: Advanced Micro Devices [AMD/ATI] Navi 33 [Radeon RX 7600/7600
    XT/7600M XT/7600S/7700S / PRO W7600] driver: amdgpu v: kernel
  Display: wayland server: Xwayland v: 24.1.8 compositor: Hyprland v: 0.50.0
    driver: gpu: i915 resolution: 1: 2560x1440~144Hz 2: 1728x1152~120Hz
  API: Vulkan v: 1.4.313 drivers: intel,radv,llvmpipe surfaces: N/A
  API: EGL Message: EGL data requires eglinfo. Check --recommends.
  Info: Tools: api: vulkaninfo gpu: amdgpu_top x11: xprop,xrandr

Great! Glad to hear it

So should i just echo that ‘disable’ line to my config and make a keybind ? is there no other way to maybe fix that thing at the moment ? Ping me if i can provide any additional logs please, thank you.

so apparently that happens only if i use v2 monitor syntax.

So lets say i have this config:

monitorv2 {
  output = eDP-1
  mode = highrr # or like this 1920x1080@144
  position = 0x0
  scale = $display_scale
}

and a binding

bind = SUPERSHIFTCTRL, code:20, exec, hyprctl keyword monitor "eDP-1, disable"

then after i press that binding monitors gets disabled for like 1-2 sec and then turns back on with that ‘phantom’ monitor that is unable to display anything but background.

BUT

if in config i have monitor = eDP-1, highrr, 0x0, $display_scale than this binding works just fine

with v2, use hyprctl keyword monitorv2[DP-1]:scale 2 or an analogous cmd

1 Like