omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

screenrecord --fullscreen ignores OMARCHY_SCREENRECORD_USE_PORTAL for external GPU monitors

Open nightdevil00 opened this issue 3 months ago • 1 comments

Bug

omarchy screenrecord --fullscreen always uses the kms backend (passing the monitor name to gpu-screen-recorder -w), even when OMARCHY_SCREENRECORD_USE_PORTAL=true is set. This means fullscreen recording fails on monitors driven by an NVIDIA GPU because the kms backend cannot see displays on the discrete GPU.

Steps to reproduce

  1. Have a dual-GPU laptop (Intel integrated + NVIDIA discrete) with an external monitor connected to the NVIDIA GPU
  2. Set OMARCHY_SCREENRECORD_USE_PORTAL=true in hyprland.lua via hl.env()
  3. Focus the external monitor
  4. Run omarchy screenrecord --fullscreen

Expected behavior

The portal backend (-w portal) should be used when OMARCHY_SCREENRECORD_USE_PORTAL=true, including in fullscreen mode.

Actual behavior

The kms backend is used with the monitor name. gpu-screen-recorder cannot find the display:

gsr error: display "HDMI-A-1" not found, expected one of:
  "screen"
  "eDP-1"    (1920x1080+1920+0)

Root cause

In omarchy-capture-screenrecording, the fullscreen path at line 154-156 does not check OMARCHY_SCREENRECORD_USE_PORTAL:

if [[ $FULLSCREEN == "true" ]]; then
    target="monitor:$(omarchy-hyprland-monitor-focused)"
    capture_args=(-w "${target#monitor:}" -s "${RESOLUTION:-$(default_resolution)}")
elif [[ ${OMARCHY_SCREENRECORD_USE_PORTAL:-false} == "true" ]]; then

The portal check is in the elif branch, so it is never reached when --fullscreen is set.

Suggested fix

Check OMARCHY_SCREENRECORD_USE_PORTAL before the fullscreen branch:

if [[ $FULLSCREEN == "true" && ${OMARCHY_SCREENRECORD_USE_PORTAL:-false} == "true" ]]; then
    target="portal"
    capture_args=(-w portal -s "${RESOLUTION:-$(default_resolution)}")
elif [[ $FULLSCREEN == "true" ]]; then
    target="monitor:$(omarchy-hyprland-monitor-focused)"
    capture_args=(-w "${target#monitor:}" -s "${RESOLUTION:-$(default_resolution)}")
elif [[ ${OMARCHY_SCREENRECORD_USE_PORTAL:-false} == "true" ]]; then

System info

  • Omarchy 4.0.0-1
  • gpu-screen-recorder 6.0.0-1
  • GPU: Intel UHD Graphics ( CometLake-H ) + NVIDIA GeForce GTX 1650 Ti Mobile
  • External monitor: Samsung C27F390 on HDMI-A-1 (NVIDIA GPU)
  • Kernel: 7.1.8-arch1-3

Debug log

See attached /tmp/omarchy-screenrecord.log — the last entry shows the kms backend failing to find HDMI-A-1.

nightdevil00 avatar Aug 20 '26 10:08 nightdevil00

[

external-monitor.md

](url)

nightdevil00 avatar Aug 20 '26 10:08 nightdevil00