NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.48k stars 12.97k forks source link

PipeWire has a libcamera-related crash if Elgato Camlink 4k is connected #181314

Closed mixedCase closed 1 year ago

mixedCase commented 1 year ago

Describe the bug

Title.

All available info is in the core dump file listed in the additional context section.

Steps To Reproduce

Steps to reproduce the behavior:

  1. In a system with PipeWire enabled, connect an Elgato Camlink 4k
  2. See PipeWire's unit core dump on a libcamera function call, enter a crash loop and lose your audio
  3. Despair

Expected behavior

PipeWire should not crash, even if it means not having my camera as a whatever-pipewire-does-with-it when libcamera shits the bed.

Additional context

Logs of core dump: pipewire-libcamera-error.txt

Additional camera info obtained via v4l2-ctl -d /dev/video0 --all: v4l2cam4link.txt

Notify maintainers

@Kranzes (pipewire -- jtojnar was privately contacted and let me know he no longer maintains PipeWire despite being on the maintainer list) @CitadelCore (libcamera)

Metadata

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.18.10, NixOS, 22.11 (Raccoon), 22.11.20220710.5f43d8b`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.9.1`
 - channels(root): `"nixos"`
 - channels(mixedcase): `""`
 - nixpkgs: `/nix/store/a885zpv9ys2p2x7qnzqvxlsy321mclip-source`
halturin commented 1 year ago

my camera AverMedia 513, disappeared after the last update. here is dmesg

[13690.202689] usb 4-2.2: new SuperSpeed USB device number 12 using xhci_hcd
[13690.215186] usb 4-2.2: New USB device found, idVendor=07ca, idProduct=513c, bcdDevice=50.10
[13690.215190] usb 4-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[13690.215192] usb 4-2.2: Product: Live Streamer CAM 513
[13690.215194] usb 4-2.2: Manufacturer: AVerMedia Technologies, Inc.
[13690.215195] usb 4-2.2: SerialNumber: 1562DD065C
[13690.237000] hub 4-2.2:1.0: USB hub found
[13690.237023] hub 4-2.2:1.0: 2 ports detected
[13690.682689] usb 4-2.2.1: new SuperSpeed USB device number 13 using xhci_hcd
[13690.695824] usb 4-2.2.1: New USB device found, idVendor=07ca, idProduct=513a, bcdDevice= 0.01
[13690.695828] usb 4-2.2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[13690.695829] usb 4-2.2.1: Product: Live Streamer CAM 513
[13690.695830] usb 4-2.2.1: Manufacturer: AVerMedia Information Inc.
[13690.695831] usb 4-2.2.1: SerialNumber: 5203676400351
[13690.754037] usb 4-2.2.1: Found UVC 1.10 device Live Streamer CAM 513 (07ca:513a)
[13690.755935] input: Live Streamer CAM 513 as /devices/pci0000:20/0000:20:08.1/0000:22:00.3/usb4/4-2/4-2.2/4-2.2.1/4-2.2.1:1.0/input/input34
[13690.756452] input: AVerMedia Information Inc. Live Streamer CAM 513 as /devices/pci0000:20/0000:20:08.1/0000:22:00.3/usb4/4-2/4-2.2/4-2.2.1/4-2.2.1:1.2/0003:07CA:513A.0012/input/input35
[13690.807702] input: AVerMedia Information Inc. Live Streamer CAM 513 Consumer Control as /devices/pci0000:20/0000:20:08.1/0000:22:00.3/usb4/4-2/4-2.2/4-2.2.1/4-2.2.1:1.2/0003:07CA:513A.0012/input/input36
[13690.807794] hid-generic 0003:07CA:513A.0012: input,hiddev96,hidraw2: USB HID v1.01 Device [AVerMedia Information Inc. Live Streamer CAM 513] on usb-0000:22:00.3-2.2.1/input2
[13690.839629] usb 8-3.3: Failed to query (GET_DEF) UVC control 11 on unit 1: -32 (exp. 2).
[13690.840253] usb 8-3.3: Failed to query (GET_DEF) UVC control 11 on unit 1: -32 (exp. 2).
[13690.841255] usb 8-3.3: Failed to query (GET_DEF) UVC control 11 on unit 1: -32 (exp. 2).
[13690.842666] usb 8-3.3: Failed to query (GET_DEF) UVC control 11 on unit 1: -32 (exp. 2).

and systemctl status

❯❯❯❯ systemctl --user status pipewire
● pipewire.service - PipeWire Multimedia Service
     Loaded: loaded (/etc/systemd/user/pipewire.service; linked-runtime; vendor preset: enabled)
    Drop-In: /nix/store/40wvmjpij9v9rfbkjskxlkd7hkf8ab43-user-units/pipewire.service.d
             └─overrides.conf
     Active: active (running) since Wed 2022-07-27 14:55:31 CEST; 2min 39s ago
TriggeredBy: ● pipewire.socket
   Main PID: 69202 (pipewire)
      Tasks: 5 (limit: 154417)
     Memory: 6.7M
        CPU: 31ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire.service
             └─69202 /nix/store/zsx8q2mx9b7pjqm8rr9wjaihm9l7icnc-pipewire-0.3.54/bin/pipewire

Jul 27 14:55:31 sevelen systemd[2436]: Stopped PipeWire Multimedia Service.
Jul 27 14:55:31 sevelen systemd[2436]: Started PipeWire Multimedia Service.
Jul 27 14:55:32 sevelen pipewire[69202]: [3:53:41.528943360] [69202]  INFO IPAManager ipa_manager.cpp:138 libcamera is not installed. Adding '/nix/store/src/ipa' to the IPA search path
Jul 27 14:55:32 sevelen pipewire[69202]: [3:53:41.529122432] [69202]  INFO Camera camera_manager.cpp:293 libcamera v0.0.0
Jul 27 14:55:32 sevelen pipewire[69202]: spa.v4l2: '/dev/video2' VIDIOC_QUERYCTRL: Input/output error
Jul 27 14:55:32 sevelen pipewire[69202]: spa.v4l2: '/dev/video2' VIDIOC_QUERYCTRL: Input/output error

not sure, but supposed it's related.

here is my system info

❯❯❯❯ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.18.13, NixOS, 22.11 (Raccoon), 22.11pre393984.5a0e0d73b94`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.10.3`
 - channels(root): `"nixos"`
 - channels(taras): `"home-manager"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
mixedCase commented 1 year ago

@halturin Doesn't seem like the same error.

Here's an upstream bug report I ended up filing for the OP btw: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2581

mixedCase commented 1 year ago

Fixed upstream

adminy commented 10 hours ago

systemctl --user status pipewire ○ pipewire.service Loaded: masked (Reason: Unit pipewire.service is masked.) Active: inactive (dead)