OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
wayland-compat medium occasional DISPUTE

Fix screen recording producing nothing on a hybrid-GPU external monitor

omarchyhyprlandwaylandnvidiaintelamdlaptop
CORRECTED An auditor found the fix wrong or incomplete and rewrote it.
AUDIT NOTE

Outstanding sourcing everywhere except the last step. I confirmed the mechanism in Omarchy's own bin/omarchy-capture-screenrecording on the quattro branch: the if [[ $FULLSCREEN == "true" ]] branch is evaluated BEFORE the elif [[ ${OMARCHY_SCREENRECORD_USE_PORTAL:-false} == "true" ]] branch, exactly as the record claims, and both env vars are real and documented in that script's header. Issues 7184, 7530 and 7640 all exist with matching titles. gpu-screen-recorder's -w portal, --list-capture-options and -fallback-cpu-encoding yes|no are all genuine. But the Pascal advice contradicts its own cited source: omarchy#7640 is titled '-fallback-cpu-encoding yes doesn't catch NVENC API version mismatch' and its body shows omarchy-capture-screenrecording ALREADY passes that flag while recording still fails hard at avcodec_open2. The issue's stated workaround is forcing -encoder cpu explicitly. So the record hands a Pascal user the exact flag its source proves does not work.

The cause above was not rewritten and may still contain the error described. The fix below is the corrected version.

Symptom

Screen recording does nothing on the external monitor of a hybrid-GPU laptop. Pressing the record keybind produces no file, no notification, no error. With debug on you see: gsr error: display "HDMI-A-1" not found, expected one of: "screen" "eDP-1".

Cause

gpu-screen-recorder's KMS backend attaches to one DRM card and only enumerates that card's connectors. On a hybrid laptop the internal panel is on the iGPU (e.g. card2) and the external monitor is on the dGPU (card1), so the external connector is invisible to the recorder. The portal backend is GPU-agnostic and does work, but Omarchy's --fullscreen code path is evaluated before the portal branch and ignores OMARCHY_SCREENRECORD_USE_PORTAL.

Fix

Confirm the split:


ls /sys/class/drm/card*-*/status
gpu-screen-recorder --list-capture-options

If your external connector is on a different card number than the one listed, that is this bug.

Work around it by recording through the portal instead of KMS. Do not use the --fullscreen path, which is evaluated before the portal branch and ignores the variable:


OMARCHY_SCREENRECORD_USE_PORTAL=true omarchy-capture-screenrecording

Or call gpu-screen-recorder directly with the portal capture target:


gpu-screen-recorder -w portal -f 60 -o ~/Videos/recording.mp4

To see why a silent failure happened:


OMARCHY_SCREENRECORD_DEBUG=true omarchy-capture-screenrecording --fullscreen

On Pascal-era NVIDIA cards, do NOT rely on -fallback-cpu-encoding yes: omarchy#7640 shows that flag only guards encoder *detection* and does not catch the later avcodec_open2 failure ([h264_nvenc] Driver does not support the required nvenc API version. Required: 13.1 Found: 13.0), so recording still dies. Force software encoding explicitly instead:


gpu-screen-recorder -w portal -encoder cpu -o ~/Videos/recording.mp4

That is the workaround confirmed in the issue. The 13.0 NVENC ceiling is permanent on Pascal (driver branch 580.xx is the last one for that hardware), so no future driver update will restore GPU encoding there.

Verify

A file appears in ~/Videos with real content, and gpu-screen-recorder --list-capture-options output no longer needs to contain your external connector for the recording to work (the portal target replaces it).

Sources

screen-recording-fails-hybrid-gpu-external-monitor