Skip to content

fix: diagnose exclusive_caps and leftover gst on video10 - #50

Merged
kvm404 merged 1 commit into
mainfrom
fix/fedora-loopback-diagnostics
Aug 20, 2026
Merged

kvm404 merged 1 commit into
mainfrom
fix/fedora-loopback-diagnostics

Conversation

@kvm404

@kvm404 kvm404 commented Aug 20, 2026

Copy link
Copy Markdown
Owner

What

Make phonecam doctor, phonecam start preflight, and phonecam install catch the Fedora+OBS host failures from the first external rc.1 test, and stop leaving gst-launch behind when the terminal hangs up.

  • Per-device exclusive_caps. v4l2loopback treats exclusive_caps=1 as a CSV aligned with video_nr, not a global boolean. With OBS already on /dev/video0, devices=2 video_nr=0,10 exclusive_caps=1 becomes Y,N,… and PhoneCam on /dev/video10 has exclusive caps off. Doctor FAILs that; v4l2.Verify fails start the same way. Missing sysfs still skips (existing setups keep working).
  • Leftover holders. Doctor WARNs if another process already has /dev/video10 open (gst-launch-1.0, PipeWire, …) by walking /proc/*/fd. Never fails the report.
  • Firewalld false positive. If firewalld is active and --query-port succeeds for 47470/tcp and 47471/udp, doctor is INFO instead of WARN.
  • Install text. Keep the single-device default; document OBS coexistence (rmmod + exclusive_caps=1,1).
  • SIGHUP. start and smoke cancel on hangup so CommandContext kills gst-launch instead of orphaning it on /dev/video10.
  • Restart log. The snippet after Restarting GStreamer receiver (N) includes streaming stopped, reason not-negotiated instead of only the generic udpsrc line.

README Status notes the Fedora KDE aarch64 + OBS + Motorola Edge 60 Fusion report. Version stays 0.2.0-rc.1.

Why

The Motorola session paired and received 1280×720@30 RTP, then gst looped on udpsrc: Internal data stream error. That was v4l2sink not-negotiated: an orphaned receiver held video10, and exclusive caps were enabled only on OBS’s node. Doctor said ready; install taught exclusive_caps=1 for one device.

Tests

cd linux-cli && go test ./... && go test -race ./...

Plus -count=1 on v4l2, doctor, cli, start.

Compatibility

No pipeline, pairing, or Android change. exclusive_caps=1 remains required on the PhoneCam node. Meeting-app visibility is unchanged once that node is loaded correctly.

Notes

  • --query-port may still WARN if firewalld allowed a range (1025-65535) rather than the exact ports — we did not parse range lists.
  • DeviceOpeners skips EACCES, so a non-root doctor can miss root holders.
  • SIGHUP only helps new start/smoke sessions; an already-orphaned gst-launch still needs fuser -k /dev/video10.

exclusive_caps is per-device, so OBS-first v4l2loopback loads left
PhoneCam on video10 with caps disabled. Doctor and Verify now fail
that, warn on leftover /dev/video10 holders, and treat firewalld
ports as INFO when already allowed. start/smoke honor SIGHUP, and
receiver restart logs include gst's not-negotiated reason.
@kvm404
kvm404 merged commit a3bce57 into main Aug 20, 2026
1 check passed
@kvm404
kvm404 deleted the fix/fedora-loopback-diagnostics branch August 20, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant