Bug 26793

Summary: webcam video driver present but does not recognize webcam since 5.5.4
Product: Mageia Reporter: Frank Griffin <ftg>
Component: RPM PackagesAssignee: Kernel and Drivers maintainers <kernel>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: Normal CC: davidwhodgins, pterjan
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: kernel CVE:
Status comment:
Attachments: harddrake2 screenshot

Description Frank Griffin 2020-06-14 19:09:45 CEST
The attached screenshot shows that harddrake2 recognizes my webcam and claims that the module for it is ‎uvcvideo.  However:

[root@ftglap tgz]# lsmod | grep uvcvideo
[root@ftglap tgz]# modprobe uvcvideo 
modprobe: FATAL: Module uvcvideo not found in directory /lib/modules/5.7.1-desktop-1.mga8
[root@ftglap tgz]# 

But:

[root@ftglap modules]# find . -name 'uvcvideo*'
./5.5.3-desktop-1.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.5.8-desktop-1.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.6.15-desktop-1.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.5.7-desktop-1.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.5.15-desktop-3.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.7.2-desktop-1.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.6.12-desktop-1.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.6.11-desktop-1.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.6.6-desktop-1.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.6.3-desktop-2.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.5.14-desktop-1.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.6.4-desktop-1.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.6.7-desktop-3.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.5.4-desktop-1.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.5.9-desktop-1.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.5.8-desktop-2.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.5.5-desktop-1.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.6.14-desktop-2.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.5.5-desktop-2.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.7.1-desktop-1.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.6.5-desktop-1.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.5.13-desktop-1.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.6.10-desktop-2.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.6.8-desktop-1.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.5.10-desktop-1.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.5.6-desktop-2.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.6.14-desktop-1.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.5.5-desktop-3.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.5.15-desktop-1.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.4.17-desktop-1.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.5.11-desktop-1.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
./5.5.6-desktop-1.mga8/kernel/drivers/media/usb/uvc/uvcvideo.ko.xz
[root@ftglap modules]#
Comment 1 Frank Griffin 2020-06-14 19:11:17 CEST
Created attachment 11701 [details]
harddrake2 screenshot
Comment 2 Frank Griffin 2020-06-14 19:25:29 CEST
The same symptom and error occurs with 5.7.2.
Comment 3 Lewis Smith 2020-06-14 21:28:38 CEST
Thanks for the report.
Can you say whether this happens with kernels before 5.7.1, or started then?

Assigning this to the kernel team.

Assignee: bugsquad => kernel

Comment 4 Frank Griffin 2020-06-14 23:24:56 CEST
I'll test with the oldest kernal I have.
Comment 5 Frank Griffin 2020-06-15 20:19:52 CEST
This is nuts.  I went back to 5.4.17, and with most of the older kernels not only does modprobe find the uvcvideo but modprobe is unnecessary because uvcvideo is automatically loaded.

When I skip from 5.5.15 to 5.6.8, the modprobe works but uvcvideo is not being automatically loaded, and that's the case for the later kernels.

The nuts part is that now modprobe works on both 5.7.1 and 5.7.2.  So I'll change the bug title to "uvcvideo is not automatically loaded for the detected webcam".  I have the kernels between 5.5.15 and 5.6.8, so if you want a more precise test of when autoloading stopped, I could do that.  But I suspect it started with 5.6.

Summary: webcam video driver present but can't be found for 5.7.1 => webcam video driver present but is not automatically loaded since 5.6.x

Comment 6 Pascal Terjan 2020-06-15 20:37:59 CEST
The driver didn't change https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/drivers/media/usb/uvc so something else is going on...

That modprobe was not finding the module is even more strange, like if something had run depmod...

Do you have any dkms modules installed that could have corrupted things?

CC: (none) => pterjan

Comment 7 Frank Griffin 2020-06-15 21:09:28 CEST
The only odd thing about the modprobe scenario was that in the original case I was running 5.7.1 but 5.7.2 has been installed.  After a reboot, 5.7.2 got the error.

I've had the same dkms stuff installed since forever - nvidia and VBox.

Another odd thing is that on the older kernels which did preload uvcvideo, lsusb showed the webcam.  On the later kernels, even after modprobe had loaded uvcvideo, lsusb did not show the webcam.
Comment 8 Pascal Terjan 2020-06-15 21:20:11 CEST
modprobe usbvideo works even if no device is detected, so the problem is that your camera is no longer visible, and it sounds like a larger usb problem.

Do you have other usb devices? Do they work?
Comment 9 Frank Griffin 2020-06-15 21:41:52 CEST
I get several (4) of these at the start of boot:

Jun 15 14:03:17 localhost kernel: usb usb1-port6: Cannot enable. Maybe the USB cable is bad?

followed by:

Jun 15 14:03:17 localhost kernel: usb usb1-port6: attempt power cycle

But as shown in the screenshot, harddrake2 identifies the device, as did the older kernels.  That said, googling the first message above gives results most of which claim hardware difficulties.
Comment 10 Pascal Terjan 2020-06-15 21:49:07 CEST
Does harddrake always see it? It should list sames devices as lsusb as both use the same raw list from the kernel.

I am wondering if something changed and made your USB unstable and the devices not always present.

Can you post the output of lsusb?
Comment 11 Frank Griffin 2020-06-15 22:01:49 CEST
[root@ftglap dkms]# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 8087:0a2b Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[root@ftglap dkms]# 

But I'm pretty sure this is hardware because now harddrake2 isn't showing the webcam either.  I'll check with another USB device to see if it's specific to the webcam.
Comment 12 Frank Griffin 2020-06-22 18:24:56 CEST
I take that back.  I rebooted 5.4.17, and harddrake2 recognizes the webcam (as well as loading the driver).

I'll try each successive kernel until I find the breakage.
Comment 13 Frank Griffin 2020-06-22 19:11:48 CEST
5.4.17 and 5.5.3 both recognize the webcam.  5.5.4 does not.

Summary: webcam video driver present but is not automatically loaded since 5.6.x => webcam video driver present but does not recognize webcam since 5.5.4

Comment 14 Pascal Terjan 2020-06-22 19:58:50 CEST
There doesn't seem to be any related change in 5.5.4 upstream, and our package didn't have any other change...

https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.5.4
Comment 15 Frank Griffin 2020-06-22 22:01:38 CEST
OK, just because the older kernels find the webcam doesn't prove that it works :-)

I'll reboot 5.4.17 and see if something like cheese works.
Comment 16 Frank Griffin 2020-06-22 22:34:47 CEST
I give up.  Now 5.4.17 doesn't see the webcam either.

Status: NEW => RESOLVED
Resolution: (none) => INVALID

Comment 17 Dave Hodgins 2020-06-23 03:16:47 CEST
Sounds like the usb connector is not making good consistent contact, or there
is a broken wire somewhere in the cable such the the broken ends sometimes
make a good enough contact for detection, but other times doesn't.

I've see that happen with a usb extension cable.

CC: (none) => davidwhodgins