chore(kwin-composite): TEMP blend-path probes — DROP BEFORE MERGE
Rate-limited journal logging bracketing the silent segment of the Linux composite path: what overlay (if any) the encode loop's composite arm hands the encoder, and whether the NVENC cursor-blend kernel launches and with what geometry. On-glass (KWin leg) the blend module loads yet the composite cursor stays invisible — these two probes attribute it to no-overlay / stripped-en-route / kernel-draws-nothing. The module-loaded INFO line is permanent (success must be as attributable as failure); everything else in this commit is temporary. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -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"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2077,6 +2077,34 @@ pub(super) fn virtual_stream(ctx: SessionContext, prepared: Option<PreparedDispl
|
||||
if let Some(live) = capturer.cursor() {
|
||||
frame.cursor = Some(live);
|
||||
}
|
||||
// TEMP KWin composite probe (DROP BEFORE MERGE): what the composite arm actually
|
||||
// hands the encoder — on-glass the blend module loads yet nothing draws, so the
|
||||
// open question is whether an overlay reaches the frame at all.
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
{
|
||||
use std::sync::atomic::{AtomicU64, Ordering as ProbeOrd};
|
||||
static PROBE_COMPOSITE: AtomicU64 = AtomicU64::new(0);
|
||||
let n = PROBE_COMPOSITE.fetch_add(1, ProbeOrd::Relaxed) + 1;
|
||||
if n == 1 || n % 512 == 0 {
|
||||
match frame.cursor.as_ref() {
|
||||
Some(c) => 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
|
||||
|
||||
Reference in New Issue
Block a user