screenrecord --fullscreen ignores OMARCHY_SCREENRECORD_USE_PORTAL for external GPU monitors
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
- Have a dual-GPU laptop (Intel integrated + NVIDIA discrete) with an external monitor connected to the NVIDIA GPU
- Set
OMARCHY_SCREENRECORD_USE_PORTAL=truein hyprland.lua viahl.env() - Focus the external monitor
- 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.