# Slow eudev on boot

## Tony0945

eudev is taking 27 seconds at boot up. it looks like everything is up in seven seconds except the TV card.

See the udevadm.log http://pastebin.com/9AesH9Ud

The relevant excerpt is  *Quote:*   

> UDEV  [5.883006] add      /devices/pci0000:00/0000:00:13.0/usb5/5-1/5-1:1.2/0003:046D:C52B.0003/0003:046D:C52B.0004 (hid)
> 
> UDEV  [5.883874] add      /devices/pci0000:00/0000:00:13.0/usb5/5-1/5-1:1.2/0003:046D:C52B.0003/0003:046D:C52B.0004/hidraw/hidraw1 (hidraw)
> 
> UDEV  [5.885120] add      /devices/pci0000:00/0000:00:13.0/usb5/5-1/5-1:1.2/0003:046D:C52B.0003/0003:046D:C52B.0004/input/input3 (input)
> ...

 

Can I speed this up with a custom rule or something? If I execute "/etc/init.d/udev restart" after logging in, it only takes seven seconds. What's happening in that 21 second interval?

Hoping a udev guru can help me here.  Kernel is gentoo-sources-3.17.4 and eudev version is 1.10-r2

----------

## Tony0945

Well, I found out what's happening in that interval. The TV card driver module 'cx18' is loading firmware. If I blacklist cx-18, eudev only takes 6 seconds. But then I have to unblacklist it and run /etc/init.d/udev over again, udevadm trigger doesn't work.

Why does firmware need to be loaded on every boot? It seems like it's really software not firmware else loading it once would suffice.

I tried making /etc/modprobe.d/blacklist.conf a symlink and swapping the symlink in /etc/init.d/local. That works in that it creates the devices but it also triggers a kernel oops.

Still looking for suggestions. Creation of the TV nodes could easier wait until after login or at least run in parallel to the later rc tasks.

----------

## Tony0945

Learned a bit more in the last month. For one thing 'firmware' is a misnomer. We are really talking about software that needs to be loaded into the card's onboard RAM at each boot. The ivtv driver tries to load this 'firmware` three times. When I changed that to once by patching the kernel driver code, boot time dropped to seven seconds.

Further investigation reveals that there are two cards in the system using the ivtv driver, Hauppauge PVR-150 analog TV card at PCI address 04:02.0 and a Hauppauge HVR-1600 dual analog/digital card at PCI address 04:03.0  it is the later chip that needs firmware v4l-cx2341x-enc.fw. It appears that the driver tries to load the firmware into the analog card and fails triggering the three retries.

So the problem is explained but the solution is not obvious. Do I need to modify the driver? Or should I shut off loading firmware in the driver and use a udev rule to load firmware based on card ID? If so, how do I do this?

relevant kernel options are:

CONFIG_PREVENT_FIRMWARE_BUILD=y

# CONFIG_FIRMWARE_IN_KERNEL is not set

CONFIG_EXTRA_FIRMWARE="v41-cx23418-enc.fw"

CONFIG_EXTRA_FIRMWARE_DIR="/lib64/firmware"

CONFIG_FW_LOADER=y

# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set

CONFIG_UEVENT_HELPER=y

CONFIG_UEVENT_HELPER_PATH="/sbin/udevadm"

----------

## Ant P.

 *Tony0945 wrote:*   

> relevant kernel options are:
> 
> CONFIG_PREVENT_FIRMWARE_BUILD=y
> 
> # CONFIG_FIRMWARE_IN_KERNEL is not set
> ...

 

Have you verified that file actually exists?

```
ls -l /lib64/firmware/v41-cx23418-enc.fw
```

----------

## Tony0945

 *Quote:*   

> Have you verified that file actually exists?
> 
> Code:	
> 
> ls -l /lib64/firmware/v41-cx23418-enc.fw

 

Yes, I placed it there myself.

----------

