# Webcam not working

## alogim

Good morning,

after installing Gento on my HP EliteBook 850 G5 I am trying to make work what still does not.

One of these things is the built-in webcam. I know there should be two webcams, one is called HD HP Camera, the other one is called something like HP IR camera.

I booted from both an Ubuntu and Xubuntu live and the webcam was successfully recognized there and it was working (for example with Google Hangouts). I saw the used module/driver was called uvcvideo, so I looked it up in the kernel, and enabled the following:

```

    Device Drivers --->  

      [*] USB support --->                                              

        [M] USB Gadget Support --->                                       

          [M] USB Gadget functions configurable through configfs

            [*] USB Webcam function

```

I also enabled 

```

 Device Drivers --->  

      [M] Multimedia support --->                                              

        [*] Media USB Adapters --->

          *** Webcam devices ***

          [M] USB Video Class (UVC)

          [*]   UVC input events device support

```

In dmesg I see the following related to uvcvideo:

```

[    4.543542] uvcvideo: Found UVC 1.50 device HP HD Camera (05c8:0808)

[    4.544570] uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported. Enabling workaround.

[    4.545145] uvcvideo: Failed to query (129) UVC probe control : -75 (exp. 34).

[    4.545146] uvcvideo: Failed to initialize the device (-5).

[    4.546004] uvcvideo: Unknown video format 00000032-0002-0010-8000-00aa00389b71

[    4.546009] uvcvideo: Found UVC 1.50 device HP HD Camera (05c8:0808)

[    4.547057] uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported. Enabling workaround.

[    4.547927] uvcvideo: Failed to query (129) UVC probe control : -75 (exp. 34).

[    4.547928] uvcvideo: Failed to initialize the device (-5).

[    4.547952] usbcore: registered new interface driver uvcvideo

```

Trying to rmmod uvcvideo and lsmod it triggers the same exact error. 

/dev/video* does not exist at all.

Searching on the Internet I found out that Dell laptops are also faulty in this sense and Dell released a firmware downgrade to 1.0.0 so that that is used instead of 1.5.0. Unfortunately, Dell webcams are different from the one I have. I also tried plugging it a USB webcam and it is immediately recognized as Sonix something, whose drivers are indeed compiled into the kernel. The problem is that there is no entry for HP webcam listed under

```
 

  -> Device Drivers

    -> Multimedia support (MEDIA_SUPPORT [=m])       

      -> Media USB Adapters (MEDIA_USB_SUPPORT [=y])

        -> GSPCA based webcams (USB_GSPCA [=m])

```

Thanks in advance for any help you will provide.

EDIT: I just installed this patch and now the output of dmesg is as follows:

```
[    4.685570] uvcvideo: Found UVC 1.50 device HP HD Camera (05c8:0808)

[    4.690119] uvcvideo: Unknown video format 00000032-0002-0010-8000-00aa00389b71

[    4.690124] uvcvideo: Found UVC 1.50 device HP HD Camera (05c8:0808)

[    4.694066] uvcvideo: Unable to create debugfs 1-4 directory.

[    4.694228] usbcore: registered new interface driver uvcvideo

```

 Additionally, tow entries are now available under /dev/, /dev/video0 and /dev/video1

EDIT 2: it looks like it is working now. There is still that message about an unknown video format though. I found another patch and I will proceed to apply it.

----------

## NeddySeagoon

alogim,

Try a testing gentoo-sources.

That functionality is in the 4.18.x kernel.

----------

## alogim

 *NeddySeagoon wrote:*   

> alogim,
> 
> Try a testing gentoo-sources.
> 
> That functionality is in the 4.18.x kernel.

 

Thank you for your response. I installed sys-kernel/gentoo-sources-4.18.7 and indeed that kernel is already patched. However, while the webcam worked correctly, I still got that message warning about unknown video format. 

```
uvcvideo: Unknown video format 00000032-0002-0010-8000-00aa00389b71
```

To fix it, I had to apply this patch to the kernel, I hope it is built-in in the next release.

```
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c

index 2469b49b2b30..3691d87ef869 100644

--- a/drivers/media/usb/uvc/uvc_driver.c

+++ b/drivers/media/usb/uvc/uvc_driver.c

@@ -99,6 +99,11 @@ static struct uvc_format_desc uvc_fmts[] = {

       .guid      = UVC_GUID_FORMAT_D3DFMT_L8,

       .fcc       = V4L2_PIX_FMT_GREY,

    },

+   {

+      .name      = "IR 8-bit (L8_IR)",

+      .guid      = UVC_GUID_FORMAT_KSMEDIA_L8_IR,

+      .fcc       = V4L2_PIX_FMT_GREY,

+   },

    {

       .name      = "Greyscale 10-bit (Y10 )",

       .guid      = UVC_GUID_FORMAT_Y10,
```

```
diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h

index be5cf179228b..6b955e0dd956 100644

--- a/drivers/media/usb/uvc/uvcvideo.h

+++ b/drivers/media/usb/uvc/uvcvideo.h

@@ -157,6 +157,9 @@

 #define UVC_GUID_FORMAT_D3DFMT_L8 \

    {0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, \

     0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}

+#define UVC_GUID_FORMAT_KSMEDIA_L8_IR \

+   {0x32, 0x00, 0x00, 0x00, 0x02, 0x00, 0x10, 0x00, \

+    0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}

 
```

Everything works as it should, however I still get this error in dmesg | grep uvc:

```
uvcvideo: Unable to create debugfs 1-4 directory.
```

Any idea why?

----------

## NeddySeagoon

alogim,

I think that 

```
 uvcvideo: Unable to create debugfs 1-4 directory.
```

is trying to make an entry in debugfs.

Its enabled in the kernel with 

```
CONFIG_DEBUG_FS=y
```

----------

## alogim

 *NeddySeagoon wrote:*   

> alogim,
> 
> I think that 
> 
> ```
> ...

 

That is what I thought as well, however I have that option enabled in the kernel I am currently using.

----------

