You are not logged in.

#1 2022-11-03 19:10:51

n4gumls5
Member
Registered: 2022-11-03
Posts: 1

Build-in webcam keeps restarting usb bus which crashes wireplumber

Hi!

I run Lenovo Ideapad S540-14API with AMD Ryzen 5 3500U CPU and Arch 6.0.6-arch1-1.

My build-in webcam every once in a while begins to disconnect and then reconnect to the usb bus. It has been doing so for quite a while, but before I wasn't more than a minor annoyance as I use external camera anyway. Since Arch switched from using pipewire-session to wireblumber the issue got worse, as now every few such reconnects the wireplumber crashes thus breaking any ongoing audio playbacks.

I'm including logs of one such event pasetbin

Thanks!

Offline

#2 2022-11-04 08:01:16

botsunny
Member
Registered: 2022-03-14
Posts: 3

Re: Build-in webcam keeps restarting usb bus which crashes wireplumber

I believe I am facing a similar issue. Wireplumber crashes when I connect my external USB webcam to my laptop, even though it has always been working fine just before a few days ago. All my audio output and input devices just disappear.

Trying to restart wireplumber with the webcam connected shows this:

$ systemctl --user restart wireplumber pipewire pipewire-pulse
Job for wireplumber.service failed because a fatal signal was delivered causing the control process to dump core.
See "systemctl --user status wireplumber.service" and "journalctl --user -xeu wireplumber.service" for details.

Checking the wireplumber service:

$ systemctl --user status wireplumber.service
× wireplumber.service - Multimedia Service Session Manager
     Loaded: loaded (/usr/lib/systemd/user/wireplumber.service; enabled; preset: enabled)
     Active: failed (Result: core-dump) since Fri 2022-11-04 11:24:40 +08; 3s ago
   Duration: 297ms
    Process: 8059 ExecStart=/usr/bin/wireplumber (code=dumped, signal=SEGV)
   Main PID: 8059 (code=dumped, signal=SEGV)
        CPU: 102ms

Relevant output of

journalctl --user -xeu wireplumber.service

is here.
Webcam is called Jieli Technology USB PHY 2.0.

Laptop: Lenovo Yoga Slim 7 Pro 14ARH5
CPU: Ryzen 7 4800H
Kernel: 6.0.6-arch1-1
Wireplumber version: 0.4.12-1
Pipewire version: 1:0.3.59-3

It is only when the webcam is disconnected that I am able to restart wireplumber successfully and get all my audio devices back. This is the first post I found that reports something close to the issue I am having. Really weird.

Last edited by botsunny (2022-11-04 08:05:13)

Offline

#3 2022-11-13 11:01:34

kvtb
Member
Registered: 2014-01-11
Posts: 30

Re: Build-in webcam keeps restarting usb bus which crashes wireplumber

Hi I'm currently not on arch but NixOS, but I can confirm these reports.

It's a combination of two issues:
1. USB autosuspend killing the built-in webcam, causing a loop of USB disconnect and connect
2. PipeWire/Wireplumber crashing on USB webcam disconnect
3. Since the usb connect/disconnect happens in an infinite loop, CPU usage goes to 100% (all cores in use) and memory usage as well goes to 100% until OOM killer kicks in


I don't have a real solution yet, I think it needs to be solved by both kernel (USB core) to not randomly disconnect the camera, and PipeWire, to not crash when camera is disconnected


I'm currently running with USB autosuspend disabled on built-in the USB2.0 hub. Would be nice if you could test this too.

Offline

Board footer

Powered by FluxBB