diff --git a/crates/pf-encode/src/enc/linux/nvenc_cuda.rs b/crates/pf-encode/src/enc/linux/nvenc_cuda.rs index 572c7faf..38bbfed1 100644 --- a/crates/pf-encode/src/enc/linux/nvenc_cuda.rs +++ b/crates/pf-encode/src/enc/linux/nvenc_cuda.rs @@ -1415,7 +1415,12 @@ impl Encoder for NvencCudaEncoder { if !self.cursor_tried { self.cursor_tried = true; match cuda::CursorBlend::new(CURSOR_PTX) { - Ok(cb) => self.cursor = Some(cb), + Ok(cb) => { + // Success is as diagnosis-critical as failure: a silent no-cursor session + // must be attributable to "overlay never arrived", not "module never said". + tracing::info!("NVENC (Linux): cursor blend module loaded"); + self.cursor = Some(cb); + } Err(e) => tracing::warn!( error = %format!("{e:#}"), "NVENC (Linux): cursor blend module load failed — cursor not composited" @@ -1465,6 +1470,28 @@ impl Encoder for NvencCudaEncoder { } } else { self.cursor_blend_warned = false; + // TEMP KWin composite probe (DROP BEFORE MERGE): prove the blend launches and + // with what geometry — the on-glass symptom is a loaded module and a silent, + // invisible cursor. + { + use std::sync::atomic::{AtomicU64, Ordering as ProbeOrd}; + static PROBE_BLEND: AtomicU64 = AtomicU64::new(0); + let n = PROBE_BLEND.fetch_add(1, ProbeOrd::Relaxed) + 1; + if n == 1 || n % 512 == 0 { + tracing::info!( + n, + fmt = ?self.buffer_fmt, + ov_x = ov.x, + ov_y = ov.y, + ov_w = ov.w, + ov_h = ov.h, + surf_w = w, + surf_h = h, + visible = ov.visible, + "cursor blend probe: kernel launched" + ); + } + } } } } diff --git a/crates/punktfunk-host/src/native/stream.rs b/crates/punktfunk-host/src/native/stream.rs index 774e2789..a7c059c9 100644 --- a/crates/punktfunk-host/src/native/stream.rs +++ b/crates/punktfunk-host/src/native/stream.rs @@ -2077,6 +2077,34 @@ pub(super) fn virtual_stream(ctx: SessionContext, prepared: Option tracing::info!( + n, + x = c.x, + y = c.y, + w = c.w, + h = c.h, + visible = c.visible, + serial = c.serial, + "composite probe: overlay riding to the encoder" + ), + None => tracing::info!( + n, + "composite probe: NO overlay on the frame (capturer.cursor() None \ + and no frame-attached overlay)" + ), + } + } + } } } // The overlay surfaces hidden pointers too (for the hint above) — strip them