# /dev/video is missing [SOLVED]

## mjbjr

Currently, I'm using kernel 4.1.12-gentoo.

I have no /dev/video.

When I plug in a new Logitech Webcam C930e the kernel sees the camera:

Nov 30 13:29:16 localhost kernel: usb 3-2: new high-speed USB device number 2 using xhci_hcd

Nov 30 13:29:17 localhost kernel: usb 3-2: New USB device found, idVendor=046d, idProduct=0843

Nov 30 13:29:17 localhost kernel: usb 3-2: New USB device strings: Mfr=0, Product=2, SerialNumber=1

Nov 30 13:29:17 localhost kernel: usb 3-2: Product: Logitech Webcam C930e

Nov 30 13:29:17 localhost kernel: usb 3-2: SerialNumber: 999CF1EE

Nov 30 13:29:17 localhost mtp-probe[22891]: checking bus 3, device 2: "/sys/devices/pci0000:00/0000:00:1c.1/0000:07:00.0/usb3/3-2"

Nov 30 13:29:17 localhost mtp-probe[22891]: bus: 3, device: 2 was not an MTP device

but /dev/video is NOT created (nor is /dev/camera), hence no software

works with the new camera.

My Macbook sees the camera fine and I used the camera with 'facetime'

after switching from the internal camera to the Logitech.

Using the Macbook, I upgraded the camera's firmware to version 8.0.914

and replugged into my gentoo box...

/dev/video is still M.I.A.

I've spent a number of hours looking around the net, but most posts in the

area of my troubles are years old.  There are many mentions of various

kernel uvc options and drivers, but uvc is not in the .config of my

current kernel (4.1.12) nor in the .config of a new kernel (4.4.26) which

I am currently in the process of configuring.

Also, there were a number of posts on the net saying the the C930e doesn't

work with linux, historically a common initial complaint new hardware

and linux, but one guy has had no problem using it with Zorin (ubuntu):

https://www.youtube.com/watch?v=TwqUJI8swDY

I assume that this is most likely a problem with my configuration of the

current kernel, but I haven't see anything on the net that points me

to something I have configured wrong.

Ideas?

Thanks for your help.

- Martin -Last edited by mjbjr on Sun Dec 04, 2016 2:52 am; edited 1 time in total

----------

## NeddySeagoon

mjbjr,

Google says its UVC.

That's Universal Video Class.  Add support in your kernel.

```
  ┌───────────────────────── USB Video Class (UVC) ─────────────────────────┐

  │ CONFIG_USB_VIDEO_CLASS:                                                 │  

  │                                                                         │  

  │ Support for the USB Video Class (UVC).  Currently only video            │  

  │ input devices, such as webcams, are supported.                          │  

  │                                                                         │  

  │ For more information see: <http://linux-uvc.berlios.de/>                │  

  │                                                                         │  

  │ Symbol: USB_VIDEO_CLASS [=n]                                            │  

  │ Type  : tristate                                                        │  

  │ Prompt: USB Video Class (UVC)                                           │  

  │   Location:                                                             │  

  │     -> Device Drivers                                                   │  

  │       -> Multimedia support (MEDIA_SUPPORT [=m])                        │  

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

  │   Defined at drivers/media/usb/uvc/Kconfig:1                            │  

  │   Depends on: USB [=y] && MEDIA_SUPPORT [=m] && \                       │  

  │ MEDIA_USB_SUPPORT [=y] && MEDIA_CAMERA_SUPPORT [=y] && \                │  

  │ VIDEO_V4L2 [=m]                                                         │  

  │   Selects: VIDEOBUF2_VMALLOC [=m]     
```

----------

## mjbjr

 *NeddySeagoon wrote:*   

> mjbjr,
> 
> Google says its UVC.
> 
> That's Universal Video Class.  Add support in your kernel.
> ...

 

Neddy,

I always use the '-i' for grep which ignores case (uvc UVC Uvc uVc, etc will return the same results if there are any).

For completion

localhost linux # grep -i uvc .config

localhost linux # grep -i UVC .config

localhost linux # grep USB_VIDEO_CLASS .config

localhost linux # grep CONFIG_USB_VIDEO_CLASS .config

localhost linux # grep -i CONFIG_USB_VIDEO_CLASS .config

those results are for the new kernel (4.4.26) I'm configuring.

- Martin -

----------

## mjbjr

viewing another thread here, I was reminded of MAKEDEV,

so, I thought that I would give it a shot...

I emerge makedev

cd /dev

MAKEDEV video

it created a bunch of video device files /dev/video0 .. /dev/video63

it created a /dev/video directory containing

(weird, a net search for em8300 shows it to be aSigma Designs, Inc.

REALmagic Hollywood Plus DVD Decoder (rev 02), which I don't have)

crw------- 1 root root 10, 204 Dec  1 16:41 em8300

crw------- 1 root root 10, 206 Dec  1 16:41 em8300_ma

crw------- 1 root root 10, 205 Dec  1 16:41 em8300_mv

crw------- 1 root root 10, 207 Dec  1 16:41 em8300_sp

it created /dev/video1394 directory containing

crw------- 1 root root 171, 16 Dec  1 16:41 0

crw------- 1 root root 171, 17 Dec  1 16:41 1

crw------- 1 root root 171, 18 Dec  1 16:41 2

crw------- 1 root root 171, 19 Dec  1 16:41 3

no change with my problem, but I thought it was worth a shot.

.

----------

## Jaglover

You have to turn it on in kernel config, then it will show up in grep.

----------

## mjbjr

 *Jaglover wrote:*   

> You have to turn it on in kernel config, then it will show up in grep.

 

huh...

linux # grep -i rcu .config

# RCU Subsystem

CONFIG_TREE_RCU=y

# CONFIG_RCU_EXPERT is not set

CONFIG_SRCU=y

# CONFIG_TASKS_RCU is not set

CONFIG_RCU_STALL_COMMON=y

# CONFIG_TREE_RCU_TRACE is not set

# CONFIG_RCU_EXPEDITE_BOOT is not set

# RCU Debugging

# CONFIG_PROVE_RCU is not set

# CONFIG_SPARSE_RCU_POINTER is not set

# CONFIG_RCU_TORTURE_TEST is not set

CONFIG_RCU_CPU_STALL_TIMEOUT=21

# CONFIG_RCU_TRACE is not set

# CONFIG_RCU_EQS_DEBUG is not set

----------

## mjbjr

A reboot didn't solve anything, but it did cause all the 'MAKEDEV video' /dev/video

files and directory from a post above to disappear.

----------

## Jaglover

Out of curiosity, why don't you enable the UVC driver in the kernel config?

----------

## mjbjr

 *Jaglover wrote:*   

> Out of curiosity, why don't you enable the UVC driver in the kernel config?

 

Using the "screen shot" above from Neddy I found it and it is now set.

(4.4.26 - future kernel)

# grep -i USB_VIDEO_CLASS /usr/src/linux-4.4.26-gentoo/.config 

CONFIG_USB_VIDEO_CLASS=y

CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y

It looks as though I got mixed up about which kernel .config I was grepping.

(4.1.12 - current kernel)

# grep -i USB_VIDEO_CLASS /usr/src/linux-4.1.12-gentoo/.config

#

 ^ ^ ^ ^ ^ ^ ^ grep returns nothing

So, it looks like CONFIG_USB_VIDEO_CLASS just didn't exist in the 4.1.12 kernel.

Thanks

----------

## NeddySeagoon

mjbjr,

Maybe I should have highlighted the

```
 Depends on: USB [=y] && MEDIA_SUPPORT [=m] && \                       │ 

  │ MEDIA_USB_SUPPORT [=y] && MEDIA_CAMERA_SUPPORT [=y] && \                │ 

  │ VIDEO_V4L2 [=m]     
```

The CONFIG_USB_VIDEO_CLASS option will be hidden unless that Depends on: evaluates to true.  You really don't want to see all the options in the kernel .config so they are dynamically managed by the configuration tool so you don't need to.  If you want to see and search options that you can't select, press 'z' in menuconfig.

The MAKEDEV script filled up your /dev with statically created entries for lots of things you don't have.  Its harmless. /dev is in tmpfs now so they will all fall out at reboot.

Further, having a /dev entry for something does not imply that there is any kernel code to support that /dev entry, unless its created by devtmpfs in the kernel.

I still have a em8300, which I got second hand nearly 20 years ago :)  I used to use it in a K6-2 to play DVDs.

mknod allows you to make single /dev entries but like I say, it won't help.  The missing /dev entry is a symptom, not a cause. 

Its been around since kernel 2.6.26

----------

## Tony0945

 *mjbjr wrote:*   

> It looks as though I got mixed up about which kernel .config I was grepping.

 

Acquaint yourself with kernel option CONFIG_IKCONFIG_PROC 

With it enabled you never have to wonder again what's in the running kernel.

----------

## mjbjr

Neddy,

Thanks for taking the time to help...

 *NeddySeagoon wrote:*   

> mjbjr,
> 
> The CONFIG_USB_VIDEO_CLASS option will be hidden unless that Depends on: evaluates to true.
> 
> 

 

Just to be clear, you are saying that doing a grep of .config may not evaluate all lines of kernel config options?

If that is true, is it also true of

linux # zgrep -i CONFIG_USB_VIDEO_CLASS /proc/config.gz

linux # 

- Martin -

----------

## Jaglover

The .config is created when you run make config (menuconfig, nconfig, gconfig, xconfig, whatnot). It will not contain all possible options, just the ones that are needed to build your kernel. But I think I hinted it before ... I'm having deja vu.

----------

## NeddySeagoon

mjbjr,

It will not, not may not.  

Lets look at that Depends On again

```
 Depends on: USB [=y] && MEDIA_SUPPORT [=m] && \                       │

  │ MEDIA_USB_SUPPORT [=y] && MEDIA_CAMERA_SUPPORT [=y] && \                │

  │ VIDEO_V4L2 [=m] 
```

If USB is off, all the kernel CONFIG symbols that depend on USB will be hidden.

Its harmless to test, since the hidden settings will be preserved.

Also play with the show all symbols toggle 'z'. 

Just like if PCI, is off all the things that depend on PCI are hidden.

The Depends on, hiding things makes kernel configuration simpler.

```

  │ │    [ ] PCI support                                           │ │  

  │ │    - - PCI Express Port Bus support                          │ │  

  │ │    - -   PCI Express Hotplug driver                          │ │  

  │ │    - -   Root Port Advanced Error Reporting support          │ │  

  │ │    - -     PCI Express ECRC settings control                 │ │  

  │ │    - -     PCIe AER error injector support                   │ │  

  │ │    - -   PCI Express ASPM control                            │ │  

  │ │    - -     Debug PCI Express ASPM                            │ │  

  │ │            Default ASPM policy                               │ │  

  │ │    - -       BIOS default                                    │ │  

  │ │    - -       Powersave                                       │ │  

  │ │    - -       Performance                                     │ │  

  │ │    - -   PCIe Downstream Port Containment support            │ │  

  │ │    - -   PCIe Precision Time Measurement support             │ │  

  │ │    - - Message Signaled Interrupts (MSI and MSI-X)           │ │  

  │ │    - - PCI Debugging                                         │ │  

  │ │    - - Enable PCI resource re-allocation detection           │ │  

  │ │    - - PCI Stub driver                                       │ │  

  │ │    - - Xen PCI Frontend                                      │ │ 
```

The 

```
- - 
```

symbol means forced off. In this case because PCI Support is off.  That list would normally be hidden too but I used 'z' for this screenshot.

For completness, that's from an ARM64 kernel, but its the same source for all.

----------

## mjbjr

First, thanks to all who helped me with this...

The key to my problem was that I didn't realize that that grepping the kernel .config file

didn't evaluate all of the kernel config values.  If a section of the kernel config is 'off',

not selected, that section will be hidden from the grep evaluation, and that made me

think that a kernel option didn't exist.

You have to use one of the common kernel building tools (menuconfig) to be able to

do thorough searching of all the kernel configs.

----------

