NicknDi
Posts: 61
Joined: Tue Jul 07, 2020 9:47 am

Audio activation causes webcam to freeze

Sun Feb 14, 2021 12:18 pm

I've spent hours trying to get a functioning video chat setup on a RPi4B (Rev 1.4) using a usb webcam and analogue audio out.

I've tried several webcams, several OSs (Raspbian, Ubuntu, Mate) and several platforms (Google Duo, Google Meet, Zoom, Skype) on both Firefox and Chrome. For a brief period Google Hangouts worked, but then stopped. I've read extensively online and tried various tweaks, all to no avail. In the best case, the camera comes on and a fluid moving image is displayed, but the moment I test the speakers or try to activate the microphone (and I've tried both mic built into webcam and separate usb mic, also using a powered usb hub and plugging directly into the RPi ports) either the desktop freezes or the camera cuts out or both.

In desperation, when I read reports of the A4Tech PK-910H being sold by the PiHut and having been tested fairly extensively and "working out of the box" according to many reports, I bought one, wrote a clean image of the latest Raspbian release to a new micro sd card and hoped for the best. No joy! (And it makes no difference if I boot up with the webcam connected or disconnected.)


Setup:
RPi4B Rev 1.4 8GB Raspbian 10 desktop 32 bit (11/01/21), updated. Kernel 5.4.83-v7l+

Powered USB2 hub to which keyboard and mouse connected. Webcam (A4Tech PK-910H) plugged into the powered USB2 hub on the RPi. Audio out jack on RPi connected with standard cable to an old pair of powered Labtech desktop speakers. Ethernet network connection (wi-fi not configured).

Most recent attempt:

1. Flash Raspberry Pi OS (32-bit) Desktop (Recommended) to 128GB Sandisk Ultra micro SD using Raspberry Pi Imager

2. Install OS on RPi 4B, set new password etc. Only keyboard, mouse, monitors and ethernet connected.

3. Sudo apt-get update, sudo apt-get upgrade.

4. Sudo apt update, sudo apt install pavucontrol pulseaudio-utils

5.Launch Device Profiles (from speaker/sound icon, right end of top bar) and set
AVjack > Analog Stereo Output
HDMI-1 > Off
HDMI-2 > Off

6. Launch Chromium, go to webcamtests.com

[At this point, webcam not plugged in, but site says: "A web camera was detected." Hmm! Doesn't inspire confidence.]

7. Plug webcam into powered hub.
Chrome detects webcam and asks permission. Allow.
Webcamtest site picks up camera, displays good moving image and begins processing webcam details.
When complete, panel on left shows: "Built-in Microphone : None" Hmm!

8. Close webcamtests.com tab and open onlinemictest.com
Permission requested and granted
Line shows in test area, but no response to sounds
First sign of trouble: cursor starts sticking and becomes intermittently unresponsive.

9. Launch PulseAudio Volume Control
A4Tech PK-910H is showing as fallback Input - Device Port : Microphone

10. Unplug webcam and reboot RPi

11. Set up Zoom meeting from another desktop (linux) computer

12. Launch Chrome on RPi, open Zoom invitation email and click on join link.

13. Wait for admission to meeting (Posts here - viewtopic.php?f=140&t=301552&p=1809437& ... m#p1809437 - and elsewhere suggest plugging in camera as final step)

14. Plug in webcam (to powered hub this time, but have also tried direct to RPi) and grant browser permission to use camera and microphone.

15. Turn on video at base of Zoom window. Fine: camera starts displaying live image.

16. Turn on audio at base of Zoom window ... things start to deteriorate: cursor becomes sticky/jerky, camera image freezes, then camera cuts out completely and mouse freezes completely.

17. Unplug webcam ... normality returns. (At other times it hasn't and I've had to do a power shutdown.)


I don't understand it: other people have it working with near identical setups; yet there's also a lot of evidence from posts in this forum that points to issues with the microphone on the A4Tech. But that is without doubt the best of several webcams I've tried. What to do next? I'm not one to give up.

Murple
Posts: 21
Joined: Tue Feb 16, 2021 6:49 pm

Re: Audio activation causes webcam to freeze

Tue Feb 16, 2021 6:57 pm

I am having this issue too, my webcam (same model as yours) arrived today and I haven't been able to get the microphone to work at all. I am using it on a pi4 4gb with stock pi OS (updated).

I was hoping it was a power issue but it seems you have ruled that out.

I will test it on other computers (including a pi400 which seems to play better with other webcams I had tried).

I bought this webcam as I was having problems with other usb webcams I had laying around. The all cause similar issues (locking up of mouse and keyboard) while the camera is active. I was hoping this one would be different...

NicknDi
Posts: 61
Joined: Tue Jul 07, 2020 9:47 am

Re: Audio activation causes webcam to freeze

Tue Feb 16, 2021 8:07 pm

I realised I needed to do more to help myself, and it was time to learn more about tapping into the tools available in the terminal. The trouble is, I don't understand how to interpret the results. Can someone please help?

Here's the output from dmesg when I plugged the webcam in after a reboot, then launched Chrome and tested the webcam microphone, then camera at webcamtests.com:

Code: Select all

pi@raspberrypi:~ $ dmesg --follow
[  443.596680] usb 1-1.4.4.4: new high-speed USB device number 8 using xhci_hcd
[  443.758436] usb 1-1.4.4.4: New USB device found, idVendor=09da, idProduct=2695, bcdDevice= 1.00
[  443.758456] usb 1-1.4.4.4: New USB device strings: Mfr=2, Product=1, SerialNumber=3
[  443.758471] usb 1-1.4.4.4: Product: A4tech FHD 1080P PC Camera
[  443.758484] usb 1-1.4.4.4: Manufacturer: Sonix Technology Co., Ltd.
[  443.758497] usb 1-1.4.4.4: SerialNumber: SN0001
[  443.852448] uvcvideo: Found UVC 1.00 device A4tech FHD 1080P PC Camera (09da:2695)
[  443.867006] input: A4tech FHD 1080P PC Camera: A4t as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4.4/1-1.4.4.4/1-1.4.4.4:1.0/input/input2
[  443.867363] usbcore: registered new interface driver uvcvideo
[  443.867375] USB Video Class driver (1.1.1)
[  443.909146] usb 1-1.4.4.4: 3:1: cannot get freq at ep 0x84
[  443.914837] usbcore: registered new interface driver snd-usb-audio
[  444.031654] usb 1-1.4.4.4: 3:1: cannot get freq at ep 0x84
[  444.361173] usb 1-1.4.4.4: 3:1: cannot get freq at ep 0x84
[  444.419747] v3d fec00000.v3d: MMU error from client L2T (0) at 0x5641000, pte invalid
[  536.428191] retire_capture_urb: 2 callbacks suppressed
[  543.489256] retire_capture_urb: 5 callbacks suppressed
[  716.987200] usb 1-1.4.4-port4: disabled by hub (EMI?), re-enabling...
[  716.987246] usb 1-1.4.4.4: USB disconnect, device number 8
[  716.987655] usb 1-1.4.4.4: cannot submit urb (err = -19)
[  716.988228] uvcvideo: Failed to resubmit video URB (-19).
[  716.988262] usb 1-1.4.4.4: cannot submit urb 0, error -19: no device
[  716.992240] uvcvideo: Failed to resubmit video URB (-19).
[  716.996310] uvcvideo: Failed to resubmit video URB (-19).
[  717.000354] uvcvideo: Failed to resubmit video URB (-19).
[  717.004338] uvcvideo: Failed to resubmit video URB (-19).
[  717.139421] xhci_hcd 0000:01:00.0: ERROR Transfer event for disabled endpoint slot 8 ep 2
[  717.139432] xhci_hcd 0000:01:00.0: @000000041ed084d0 00000000 00000000 0f000000 08038001
[  717.442576] usb 1-1.4.4.4: new high-speed USB device number 9 using xhci_hcd
[  717.606015] usb 1-1.4.4.4: New USB device found, idVendor=09da, idProduct=2695, bcdDevice= 1.00
[  717.606035] usb 1-1.4.4.4: New USB device strings: Mfr=2, Product=1, SerialNumber=3
[  717.606045] usb 1-1.4.4.4: Product: A4tech FHD 1080P PC Camera
[  717.606056] usb 1-1.4.4.4: Manufacturer: Sonix Technology Co., Ltd.
[  717.606064] usb 1-1.4.4.4: SerialNumber: SN0001
[  717.612166] uvcvideo: Found UVC 1.00 device A4tech FHD 1080P PC Camera (09da:2695)
[  717.628536] input: A4tech FHD 1080P PC Camera: A4t as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4.4/1-1.4.4.4/1-1.4.4.4:1.0/input/input3
[  717.640602] usb 1-1.4.4.4: 3:1: cannot get freq at ep 0x84
[  718.196811] usb 1-1.4.4.4: 3:1: cannot get freq at ep 0x84
[  718.358436] usb 1-1.4.4.4: 3:1: cannot get freq at ep 0x84
What's going on here?

Murple
Posts: 21
Joined: Tue Feb 16, 2021 6:49 pm

Re: Audio activation causes webcam to freeze

Tue Feb 16, 2021 9:12 pm

I am going to say that it is either...

A) It is a power issue (I will test this by using different supplies and reducing power load on the usb bus. I currently use a USB hardrive so switching to SD card will substantially reduce power consumption)

B) it is a bug introduced by recent software updates. If this is the case we should see more reports of this issue as people update. I have only tried using a usb webcam in the past few days so I cannot comment if this problem occured before. The fact that I have this problem with numerous usb webcams suggests lots of people will encounter this soon enough if it is a new bug (my kernel is 5.10, and yours in 5.4. that's a shame)

C) we have faulty hardware, probably usb related. Interestingly we have different revisions (I have rev 1.2 4gb pi4)

I agree the lockups seem to happen when the usb microphone is activated (certainly in zoom) but I need to test more to see if this is a symptom or a cause. When I get back to my pi I will see if the microphone is detected independently from the camera in which case perhaps it can be blacklisted, then we can check if the camera is causing problems independent to the mic.

Almost forgot D) webcam itself could be be faulty. They are cheap so quality control may be an issue. I will test it on my Dell laptop.
Last edited by Murple on Tue Feb 16, 2021 9:25 pm, edited 3 times in total.

Murple
Posts: 21
Joined: Tue Feb 16, 2021 6:49 pm

Re: Audio activation causes webcam to freeze

Tue Feb 16, 2021 11:25 pm

Perhaps this is relevant

https://raspberrypi.stackexchange.com/q ... completely

Also, I my first post has yet to be approved so my last reply may seem out of place. My first post is just saying that I am having the same problem.

NicknDi
Posts: 61
Joined: Tue Jul 07, 2020 9:47 am

Re: Audio activation causes webcam to freeze

Wed Feb 17, 2021 1:37 pm

Murple wrote:
Tue Feb 16, 2021 11:25 pm
Perhaps this is relevant

https://raspberrypi.stackexchange.com/q ... completely

Also, I my first post has yet to be approved so my last reply may seem out of place. My first post is just saying that I am having the same problem.
Ah! The above explains why I didn't see your earlier post until after I'd posted my follow-up, otherwise I'd definitely have said how pleased I was to find someone else on the case!

That thread you've posted a link to is definitely worth going further with, which I intend to do when I get the chance. (We have only the one RPi4 in the house and it's my partner's main desktop pc.)

With regard to your earlier post, I think you nail it with your A, B C ... analysis.

I'm pretty convinced it's not a power issue, as it has occurred for us under so many different permutations, from USB booting from an SSD drive with a customised installation of Ubuntu Mate (the loboris image) to booting from a micro SD card with only keyboard, mouse and webcam attached and all three on a powered usb hub (and I've tried both USB 2 & 3 powered hubs).

I also think it's unlikely to be hardware related or there would be more people experiencing the problem.

I suspect it's either B or D, or possibly a combination of the two. There are quite a few people by now who have reported problems with using the mic on this webcam. How have you got on with trying it on your laptop? I did a test on a very old Sony laptop, but I couldn't be certain it was the webcam mic or the internal laptop mic that was active!! I can't get it to work properly on my linux desktop, but then if it's a kernel issue I would expect that. And there clearly have been/are kernel issues with some webcams: https://bugs.launchpad.net/ubuntu/+sour ... ug/1881757 & https://bugs.launchpad.net/ubuntu/+sour ... ug/1898214
The latter shows a user with exactly the same repeated "cannot get freq at ep 0x84" message that I'm getting. But I'm completely out of my depth in knowing how to interpret that.

Murple
Posts: 21
Joined: Tue Feb 16, 2021 6:49 pm

Re: Audio activation causes webcam to freeze

Wed Feb 17, 2021 5:57 pm

I've only been able to do some remote testing so far as I am not physically in front of the pi. Thankfully I left the webcam plugged in.

I've been recording video from the command line

Code: Select all

cvlc v4l2:///dev/video0:width=640:height=480 --sout="#transcode{vcodec=theo,vb=2000,fps=20,scale=1.0,acodec=vorb,ab=90,channels=1,samplerate=44100}:standard{access=file,mux=ogg,dst=output.ogg}"
This records some lovely smooth video

Code: Select all

cvlc v4l2:///dev/video0:width=640:height=480 :input-slave=pulse:// --sout="#transcode{vcodec=theo,vb=2000,fps=20,scale=1.0,acodec=vorb,ab=90,channels=1,samplerate=44100}:standard{access=file,mux=ogg,dst=output.ogg}"
This tries to record sound along side the video. The sound records fine (which is the first time I've gotten anything meaningful from the microphone) but the video is broken - it records a few choppy frames with some visual noise and then the image is frozen for the rest of the recording.

I reloaded the uvc webcam module to print out some information about bandwidth use

Code: Select all

sudo rmmod uvcvideo
sudo modprobe uvcvideo trace=1024
but I do not see any issues when the webcam is in use (with or without microphone)

Code: Select all

[74362.135092] usbcore: deregistering interface driver uvcvideo
[74373.039874] uvcvideo: Found UVC 1.00 device A4tech FHD 1080P PC Camera (09da:2695)
[74373.061563] input: A4tech FHD 1080P PC Camera: A4t as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.0/input/input11
[74373.065046] usbcore: registered new interface driver uvcvideo
[74373.065062] USB Video Class driver (1.1.1)
[79073.143391] uvcvideo: Device requested 3072 B/frame bandwidth.
[79073.143406] uvcvideo: Selecting alternate setting 6 (3072 B/frame bandwidth).
[79073.286496] uvcvideo: Allocated 5 URB buffers of 32x3072 bytes each.
[79165.897501] uvcvideo: Device requested 3072 B/frame bandwidth.
[79165.897518] uvcvideo: Selecting alternate setting 6 (3072 B/frame bandwidth).
[79166.054946] uvcvideo: Allocated 5 URB buffers of 32x3072 bytes each.
I think the "cannot get freq" errors you mentioned (that I have also seen) are coming from snd-usb-audio module, which I am assuming is loaded for the webcam microphone. These errors may not be related to our problem but I think I will look into this next.

I should be able to physically test the webcam on my laptop later tonight. If I get time I will also test the pi with just an SD and no other USB peripherals attached (other than the webcam of course)

Edit:
Adding "snd-usb-audio.enable=0" to cmdline.txt seems to stop the webcam from freezing up. The microphone is still visible to the system, but it is disabled so obviously no sound is recorded

edit again, after much messing around the microphone isn't working at all even with the options from cmdline.txt removed. this is getting annoying.
Last edited by Murple on Wed Feb 17, 2021 7:14 pm, edited 1 time in total.

NicknDi
Posts: 61
Joined: Tue Jul 07, 2020 9:47 am

Re: Audio activation causes webcam to freeze

Wed Feb 17, 2021 6:22 pm

That's very interesting - you're making a lot more progress than me, and without having access to the actual hardware! I just don't have the understanding at that level.

I have checked out the thread relating to a possible firmware update (the "answer" to the post you drew attention to) but I found that on the Ubuntu Mate installation we're using that update - 0138a1 - has already been incorporated. I've yet to check on the Raspbian install, but I suspect the same; that post dates back to the middle of last year. Also, if I've understood it correctly, you can't do the update recommended there on the hardware I have: "NB 2: This upgrade method has no effect on Pi 4 8GB boards, because the VLI EEPROM is a no-fit part. The VLI firmware has been rolled into the bootloader EEPROM."

I've had another go at using the webcam on the Sony vaio (Windows 7) and though the camera plays smoothly and there's no interference with the mouse, I can't get a squeak from the microphone. Device Manager identifies it and says it's working properly.... (oh how we all love Windows!!)
But onlinemictest.com sees it and shows a straight line waveform in the test area, but no movement in response to sound...

I can live without the microphone as we have separate, better quality, devices, but we need the camera to work smoothly on the RPi as it does on the laptop.

Good luck with your further investigations.

Edit: Just seen your edit - will try that.

Murple
Posts: 21
Joined: Tue Feb 16, 2021 6:49 pm

Re: Audio activation causes webcam to freeze

Wed Feb 17, 2021 7:56 pm

It is so frustrating, I don't understand how I got the microphone to work before and now I can't get anything from it no matter what I try!

You are right about the firmware, mine is up to date anyway and I think we can rule that out as I can't get the microphone to work on my dell laptop either. So I don't think it's a pi specific issue. It is just so strange how other people seemingly have it working. If anyone reading this has the webcam working on their setup please can you post the output of lsusb? I am curious if there are any differences in device ids (mine is 09da:2695 A4Tech Co., Ltd

I think I will just focus on getting the webcam to work on zoom without the microphone. I will let you know how I get on

Edit:

add the following to /etc/modprobe.d/raspi-blacklist.conf (sudo nano /etc/modprobe.d/raspi-blacklist.conf)

Code: Select all

blacklist snd_usb_audio
That will nerf the microphone (but also any other usb sound device, which means you can't just plug in a different usb microphone :( )

final edit!
I'm sure an alsa or pulse config can be created to ignore the offending microphone and use a different usb device, without having to completely disable the module. I just don't want to work it out right now, I'm too busy crying tears of frustration.

Murple
Posts: 21
Joined: Tue Feb 16, 2021 6:49 pm

Re: Audio activation causes webcam to freeze

Thu Feb 18, 2021 12:57 pm

Can you try this, I *may* have it working

(first remove the snd-usb-audio module from the blacklist, if you added it as per the previous post. These instructions are asuming everything is vanilla)

add the following to /boot/cmdline.txt

Code: Select all

snd-usb-audio.use_vmalloc=0 usbcore.autosuspend=-1
and comment out the following line in /etc/pulse/default.pa

Code: Select all

### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle
(put a hash in front so it reads "'#load-module module-suspend-on-idle")

Now reboot

Try Zoom

If this does work then it should be possible to create a udev rule that disables powersaving only for the webcam, rather than the entire usb stack.

Edit:
Nope I still get lockups on my pi4

This workaround does get the webccam+microphone working on my Dell laptop (running linux 5.10 kernel), as well as on my pi 400. The pi4 doesnt cope and freezes, the only difference on the pi4 is that the microphone is now more reliable with the above changes.

I think I will be sending the webcam back to pihut.com.

NicknDi
Posts: 61
Joined: Tue Jul 07, 2020 9:47 am

Re: Audio activation causes webcam to freeze

Thu Feb 18, 2021 1:36 pm

So close! I got excited when I saw your last post....before you'd added the edit at the end! And it hasn't worked on our RPi4 either.

I wrote to the PiHut this morning, drawing their attention to this thread. No reply as yet.

Murple
Posts: 21
Joined: Tue Feb 16, 2021 6:49 pm

Re: Audio activation causes webcam to freeze

Thu Feb 18, 2021 1:56 pm

So I can get a little bit closer to a usable state by running

Code: Select all

sudo setpci -s 01:00.0 0xD4.B=0x40
(you may need to apt-get install setpci if it isn't installed)

This disables power saving features that were added with newer VLI firmware updates.

I still get hanging, but significantly reduced.

Basically USB on the pi 4 is a steaming pile of poop. IMHO.

I suspect downgrading to very old VLI firmware may fix the webcam (but break many other USB3 features I use so not an option for me). I am not even sure if that is possible on your revision of the pi4.

I doubt this will be fixed in future firmware upgrades either

For more information see...

viewtopic.php?f=28&t=250990&start=100

viewtopic.php?t=256681

viewtopic.php?f=28&t=246771

https://github.com/raspberrypi/firmware/issues/1426

https://github.com/raspberrypi/firmware/issues/1282

(This last URL suggests running the setpci command early in the boot process, athough I haven't tested that. (edit: I have just looked again and all this is doing is making sure the setpci comand is run every boot. it is no different to running it manually). Also in case you were wondering about the slightly different command...B=0x40 disables all power saving features, B=0x41 disables some. As far as I understand. This is all beyond me really and I'm slightly annoyed that I am being made to learn stuff!)

Solution?

Use a pi 400 (not convenient for my use case)

Use the pi camera module with a usb microphone (not super convenient either, but I may go this route and use an extender cable to get the camera where it needs to be. This is an ugly and fragile solution as I have kids and they love tugging at wires)

Put up with the (now reduced) hanging. I will have to do some real life tests with zoom to see if this is even feasible.

Murple
Posts: 21
Joined: Tue Feb 16, 2021 6:49 pm

Re: Audio activation causes webcam to freeze

Thu Feb 18, 2021 2:11 pm

One nagging question however...

Why does it work on the pi 400 when the VLI firmware is the same version...

NicknDi
Posts: 61
Joined: Tue Jul 07, 2020 9:47 am

Re: Audio activation causes webcam to freeze

Thu Feb 18, 2021 3:52 pm

Incredibly helpful stuff - thank you so much for all you've found out.

I've just found that disabling the microphone on the webcam (https://www.mjt.me.uk/posts/blacklistin ... nes-linux/) makes no difference. I checked on another webcam too, which was no better.

I tend to agree about the USB implementation in the RPi4, and I'm wondering if it's specific to the 8GB board.

I'll follow up your links and suggestions in due course. Too fed up atm and need some fresh air!

The galling thing is that it was working a few months back, with the previous webcam (a logitech) and a custom Ubuntu Mate image - my wife was doing hangouts with our grandchildren - so I'm going to try to get back to that earlier version of the OS. I always had a suspicion that something happened after an update.

I've heard back from the PiHut, who have passed it on to their Product Manager. Interesting to see what they come up with.

Murple
Posts: 21
Joined: Tue Feb 16, 2021 6:49 pm

Re: Audio activation causes webcam to freeze

Thu Feb 18, 2021 8:26 pm

NicknDi wrote:
Thu Feb 18, 2021 3:52 pm

The galling thing is that it was working a few months back, with the previous webcam (a logitech) and a custom Ubuntu Mate image - my wife was doing hangouts with our grandchildren - so I'm going to try to get back to that earlier version of the OS. I always had a suspicion that something happened after an update.
So I suspect going back to an early OS version won't help as your firmware has already been updated. In the earlier Pi4 models the VLI firmware was separate from the bootloader firmware. The 8gb still have the firmware updates, but the VL805 firmware is "rolled in" with the bootloader firmware. So in theory if I was so inclined I could flash an earlier version of the VLI firmware to the eeprom (as I have an older Pi with a separate eeprom for the USB related firmware), but for the 8gb version the only way to do it would be to roll back all of the firmware prior to the VLI updates. Personally I wouldn't advise it as there have been significant bugs fixed and improvements made through firmware updates.

Perhaps it is possible for software fixes to land in the kernel but I wouldn't hold your breath. I am going to try using the mainline kernel (by installing Arch Linux ARM) and it may also be worth trying to 64 bit kernel. Both these options have drawbacks as I lose support for various things compared to the official 32bit pi kernel, and I doubt it will make a difference anyway.

This issue impacts on a number of usb devices (I have seen posts related to SDR dongles particularly) so I wouldn't say it is a niche problem. The pi foundation hasn't seemed to acknowledge any of these so I guess that means it isn't something we can expect a fix on. Especially as the VL805 firmware is not something the pi foundation have direct control over. It would be nice to know how this was solved (or at least mitigated) on the pi 400 as this would tell us if there is hope for a fix or not.

Edit:
I should also add I have now done more testing with zoom & using the setpci command above. I have tried in both the browser zoom, and also the x86 emulated client (which I only just found out about - neat!). So yeah it works a lot better, but eventually the whole thing falls over. I managed a couple of 10 minute calls but eventually the system hangs completely (I was able to recover to the desktop once, the other time I had to pull the power plug). So no, it's not enough of a fix.

Edit2:
Tried 64bit kernel/manjaro userspace. Same problem.

Murple
Posts: 21
Joined: Tue Feb 16, 2021 6:49 pm

Re: Audio activation causes webcam to freeze

Thu Feb 18, 2021 10:27 pm

So...

I just noticed something in another post that piqued my interest. A tiny glimmer of hope that I thought I would look into...

I set up a new SD card with BerryBoot as the bootloader... (https://www.berryterminal.com/doku.php/berryboot)

And so far it works! Zoom with video and audio and no freezing! I am running piOS 64bit, and I am just running apt-get full-upgrade to see if it breaks it again!

I don't think the 64bit is important, I think it is the different bootloader that is initialising the usb differently...

Edit: Well it definitely works better, but the webcam disconnects after a while. And now I am going to bed...

NicknDi
Posts: 61
Joined: Tue Jul 07, 2020 9:47 am

Re: Audio activation causes webcam to freeze

Fri Feb 19, 2021 8:53 am

Thanks for your last two posts. Berryboot looks promising, and worth exploring in its own right; I shall try it when I get a chance to use the RPi4 again. But in the long run, if the webcam still disconnects after a while, the issue is not resolved.

You're right of course about the firmware; when I talked about rolling back the OS I was actually thinking more about the firmware, doing the equivalent of a "factory reset" as it were - if, as you say, that's even possible.

I've just been re-reading the blurb about the A4Tech webcam on the PiHut site, in particular the customer reviews and the comments in response to the blog article they link to, which describes it as all so out-of-the-box easy. That was getting on for a year ago and even then one or two people were saying it wasn't working for them. (And I notice the comments are now closed.) This suggests to me that there is something other than the more recent firmware changes at play, the latter maybe having exacerbated an already flawed provision. Whatever the case, I'd have thought that given the popularity of the Pi4 and the explosion of video communication due to the pandemic, it would be crazy for the Pi Foundation not to give high priority to fixing this. (I am assuming here something you suggested previously, that as updates roll out increasing numbers of users will encounter this problem.) As far as I'm aware every other linux distro on the planet operates quite happily with a plethora of different webcams and all the available web-based video call platforms - they're not going to want to be seen as the lame duck. I await with interest a response from the PiHut Product Manager.

User avatar
sav25
Authorised Reseller
Authorised Reseller
Posts: 446
Joined: Thu Aug 30, 2012 7:18 pm
Location: Southend-on-Sea, Essex, UK

Re: Audio activation causes webcam to freeze

Fri Feb 19, 2021 3:26 pm

Hi Nick

Rich from The Pi Hut here (thanks for the link to this post). I'm just running some tests now to see if we can see the same issues here. We sell lots of these cameras and apart from a few cases, most seem to have no issues - so I'm hoping (in a weird way) that this is some kind of hardware fault with your specific unit rather than a problem with the camera/software overall. If that's the case we'll help with a return and replacement of course.

I'm using the same webcam model from our stock, one which I've been using for months for Zoom calls here in the office. I'll try it on a few different Pi RAM models and see if I experience any issues.

I'll also respond to your support ticket once we've figured this out for you :)

NicknDi
Posts: 61
Joined: Tue Jul 07, 2020 9:47 am

Re: Audio activation causes webcam to freeze

Fri Feb 19, 2021 3:34 pm

That's great news Rich; I look forward to learning how you get on. Many thanks for responding.
Last edited by NicknDi on Fri Feb 19, 2021 4:14 pm, edited 1 time in total.

Murple
Posts: 21
Joined: Tue Feb 16, 2021 6:49 pm

Re: Audio activation causes webcam to freeze

Fri Feb 19, 2021 4:02 pm

@Sav Thanks for looking into it, it's been driving me bananas trying to work out whats going on.

@Nick If it is the VL805 firmware it is still possible to have caused problems months ago, rather than just recently. The firmware is labelled "beta", "stable" and "critical", and the one installed is dependent on options set up in a config file. So the firmware was in the wild ages ago (e.g. if you wanted to try usb or network boot initially you had to use the beta firmware), and then after extensive testing it finally moves into the critical branch where it is deemed ready for all devices. Another factor is that some distros do not automitically update the firmware (you have to do in manually), but others like piOS do. So if you switch to piOS from something else you may find the firmware is updated without you realisiing. So there may have been a tiny number of people experiencing issues before, but this has increased over time. That said I also think it is possibe that this problem had always existed, and is now exascerabted like you suggest. I think Zoom also highlights the issue, as the webcam does work better with other software.

Or it really it is a random issue only affecting small numbers of people regardless. I kind hope this is the case, but if so I reckon it is an issue with the pi4 itself as I get the same behaviour with at least three different usb webcams. Maybe it's a good excuse for me to buy an 8gb pi 4 for testing lol. I'm sure my wife will agree with me...

User avatar
sav25
Authorised Reseller
Authorised Reseller
Posts: 446
Joined: Thu Aug 30, 2012 7:18 pm
Location: Southend-on-Sea, Essex, UK

Re: Audio activation causes webcam to freeze

Fri Feb 19, 2021 4:04 pm

So I've just tried this with an older 1GB Raspberry Pi 4 (I had one on my desk so was interested in how that would perform). The Pi has a newly flashed Pi OS 32-bit image on a Panasonic Class 10 card using the Raspberry Pi Imager, which has been updated with sudo apt-get update and sudo apt full-upgrade.

I'm also using an official power supply, with an official keyboard and mouse plugged in to the USB 2.0 ports, and the camera connected to the upper USB 3.0 port. No other hardware is attached as I want to make sure power issues aren't going to factor here.

On the 1GB board the mic and video worked but Chrome ended up in an 'aw snap' state so something went wrong there - I'll assume a lack of memory for now (something we may need to suggest on the product page)

I'm now testing a 4GB Pi 4 in the same way. Everything is currently working fine (video and mic) so we're leaving the meeting open to see if anything falls over. It's already been running a lot longer than the 1GB Pi lasted, so that would support the memory assumption a little.

If it falls over again I'll try Chrome Media Edition (some info on that here) as I've seen some examples of this helping with things like this.

If it continues to work as expected, I'll then test on a 2GB and 8 GB board.

I'll keep you posted.

NicknDi
Posts: 61
Joined: Tue Jul 07, 2020 9:47 am

Re: Audio activation causes webcam to freeze

Fri Feb 19, 2021 4:37 pm

@Sav Thanks for the update, Rich. Useful info re Chrome Media edition. Certainly worth looking into.

@Murple Yes, your comments on the firmware make perfect sense. I'd forgotten about the different iterations and now remember that I did change from one to another at some stage. I was an early adopter of the laboris Ubuntu images and that initially involved various firmware tweaks I think to get the usb booting working.
I've just tried Berryboot and it failed to load, with a "firmware not found" line included in the post loop, so I'm wondering if that's also due to my having an atypical firmware in play.
Funny you should be thinking of buying another Pi4 - I was on exactly the same page, as I could put the current one to use on a project that won't need a webcam, if the PiHut can supply me with a board guaranteed and tested to work!

User avatar
sav25
Authorised Reseller
Authorised Reseller
Posts: 446
Joined: Thu Aug 30, 2012 7:18 pm
Location: Southend-on-Sea, Essex, UK

Re: Audio activation causes webcam to freeze

Fri Feb 19, 2021 5:13 pm

That's just over an hour on the 4GB board completed (thanks to Zoom who are now providing longer meetings for free). I had video and audio (mic) connected/enabled the entire time and we even connected my phone to the meeting from the other side of the building to test the mic output. Everything working as expected.

I've now swapped the board for a new 2GB from stock and will do another hour on this one as well (it may be Friday night but the pubs aren't open anyway :lol: ).

If you'd like me to provide any info from these boards (versions, firmware etc) for comparison just let me know.

Rich

Murple
Posts: 21
Joined: Tue Feb 16, 2021 6:49 pm

Re: Audio activation causes webcam to freeze

Fri Feb 19, 2021 5:36 pm

Thanks Rich,

How interesting!

I'd like to see the firmware you are running (output of 'sudo rpi-eeprom-update').

Also can you provide the output for lsusb -v (I want to see if the device has the same ID as mine).

I'm going to send my camera back anyway. I don't know how practical it will be but if I give you the RMA number perhaps you can specifically test my camera as that will definitively tell us if it is my pi or the camera where the issue is.

Cheers

PS I really appreciate your input on this, it's a pretty rare level of customer service!

NicknDi
Posts: 61
Joined: Tue Jul 07, 2020 9:47 am

Re: Audio activation causes webcam to freeze

Fri Feb 19, 2021 5:42 pm

Thanks Rich. Good to know it's all going fine so far. Obviously it's the 8Gb board I'm most interested in hearing about, though @Murple has the 4GB I believe.

Is it possible, and if so how would I do it, to revert to the firmware that shipped out with the board? Maybe there's no way of knowing what that was, given what I read in another thread about all the different boards you have boxed up, with no knowing exactly which revision each one is.

I absolutely echo @Murple's PS - support second to none. Many thanks!

Return to “Troubleshooting”