# ivtv firmware not loading [Unsolved]

## jonfr

I got the firmware for ivtv v0.4.2 in this folders. I did go after the guide in this topic. However it didn't work.

```
/usr/lib/hotplug/firmware
```

```
/lib/firmware
```

Here are files that are in both folders. It is exacly the same.

```
jonfr@jupiter /usr/lib/hotplug/firmware $ ls

ivtv-fw-enc.bin     v4l-cx2341x-enc.fw         v4l-cx2341x-init.mpg

v4l-cx2341x-dec.fw  v4l-cx2341x-init-mpeg.bin  v4l-cx25840.fw

```

Here is the error msg that i get.

```
Linux video capture interface: v1.00

ivtv:  ==================== START INIT IVTV ====================

ivtv:  version 0.4.2 (tagged release) loading

ivtv:  Linux version: 2.6.15.1 K7 gcc-3.4

ivtv:  In case of problems please include the debug info between

ivtv:  the START INIT IVTV and END INIT IVTV lines, along with

ivtv:  any module options, when mailing the ivtv-users mailinglist.

ivtv0: Autodetected WinTV PVR 150 card (cx23416 based)

ACPI: PCI Interrupt 0000:00:06.0[A] -> Link [LNKB] -> GSI 10 (level, low) -> IRQ 10

ivtv0: Unreasonably low latency timer, setting to 64 (was 32)

ivtv0: i2c attach to card #0 ok [client=tveeprom, addr=50]

tveeprom 0-0050: The eeprom says no radio is present, but the tuner type

tveeprom 0-0050: indicates otherwise. I will assume that radio is present.

tveeprom 0-0050: Hauppauge model 26559, rev C260, serial# 2993808

tveeprom 0-0050: tuner model is LG S001D MK3 (idx 60, type 38)

tveeprom 0-0050: TV standards PAL(B/G) PAL(I) SECAM(L/L') PAL(D/K) (eeprom 0x74)

tveeprom 0-0050: audio processor is CX25843 (idx 37)

tveeprom 0-0050: decoder processor is CX25843 (idx 30)

tveeprom 0-0050: has radio, has no IR remote

tuner 0-0061: chip found @ 0xc2 (ivtv i2c driver #0)

ivtv0: i2c attach to card #0 ok [client=(tuner unset), addr=61]

cx25840 0-0044: cx25843-23 found @ 0x88 (ivtv i2c driver #0)

cx25840 0-0044: unable to open firmware v4l-cx25840.fw

ivtv0: i2c attach to card #0 ok [client=cx25840, addr=44]

wm8775 0-001b: chip found @ 0x36 (ivtv i2c driver #0)

ivtv0: i2c attach to card #0 ok [client=wm8775, addr=1b]

tda9887 0-0043: chip found @ 0x86 (ivtv i2c driver #0)

ivtv0: i2c attach to card #0 ok [client=tda9887, addr=43]

ivtv0: unable to open firmware v4l-cx2341x-enc.fw

ivtv0: did you put the firmware in the hotplug firmware directory?

ivtv0 warning: failed loading encoder firmware

ivtv0 warning: Error loading firmware -3!

ivtv0: Error -3 initializing firmware.

ivtv0: Error -12 on initialization

ivtv: probe of 0000:00:06.0 failed with error -12

ivtv:  ====================  END INIT IVTV  ====================

```

I am using kernel 2.6.15.1.

Thanks in advance.

----------

## Primozic

Do you have "Hotplug firmware loading support" built into your kernel or loaded as a module?

```
interceptor ~ # grep FW_LOADER /usr/src/linux/.config

CONFIG_FW_LOADER=m
```

It's under Device Drivers -- Generic Driver Options.  The module name is "firmware_class".

I believe future versions of ivtv are moving to Hotplug exclusively.  I'm surprised the ebuild doesn't check for that.

----------

## jonfr

 *Primozic wrote:*   

> Do you have "Hotplug firmware loading support" built into your kernel or loaded as a module?
> 
> ```
> interceptor ~ # grep FW_LOADER /usr/src/linux/.config
> 
> ...

 

I do have it as a module. 

```
<M> Hotplug firmware loading support
```

I will try to have it build in rather then module.

----------

## Primozic

Hopefully that works out for you.  If not, I'm not sure what else to tell you.

I do know that there is nothing in my /usr/lib/hotplug/firmware directory, and four files in my /lib/firmware directory (even though I only need two of them).

```
interceptor ~ # ls -l /lib/firmware/

total 692

-rw-r--r--  1 root root 262144 Jan 21 22:05 v4l-cx2341x-dec.fw

-rw-r--r--  1 root root 262144 Jan 21 22:05 v4l-cx2341x-enc.fw

-rw-r--r--  1 root root 155648 Jan 21 22:05 v4l-cx2341x-init.mpg

-rw-r--r--  1 root root  14264 Jan 21 22:05 v4l-cx25840.fw

```

I'm using a Hauppauge WinTV-PVR-150 with ivtv 0.4.2 and kernel 2.6.15.1, and everything loads correctly.

----------

## jonfr

I still got the same error.

```
Linux video capture interface: v1.00

ivtv:  ==================== START INIT IVTV ====================

ivtv:  version 0.4.2 (tagged release) loading

ivtv:  Linux version: 2.6.15.1 K7 gcc-3.4

ivtv:  In case of problems please include the debug info between

ivtv:  the START INIT IVTV and END INIT IVTV lines, along with

ivtv:  any module options, when mailing the ivtv-users mailinglist.

ivtv0: Autodetected WinTV PVR 150 card (cx23416 based)

ACPI: PCI Interrupt 0000:00:06.0[A] -> Link [LNKB] -> GSI 10 (level, low) -> IRQ 10

ivtv0: Unreasonably low latency timer, setting to 64 (was 32)

ivtv0: i2c attach to card #0 ok [client=tveeprom, addr=50]

tveeprom 0-0050: The eeprom says no radio is present, but the tuner type

tveeprom 0-0050: indicates otherwise. I will assume that radio is present.

tveeprom 0-0050: Hauppauge model 26559, rev C260, serial# 2993808

tveeprom 0-0050: tuner model is LG S001D MK3 (idx 60, type 38)

tveeprom 0-0050: TV standards PAL(B/G) PAL(I) SECAM(L/L') PAL(D/K) (eeprom 0x74)

tveeprom 0-0050: audio processor is CX25843 (idx 37)

tveeprom 0-0050: decoder processor is CX25843 (idx 30)

tveeprom 0-0050: has radio, has no IR remote

tuner 0-0061: chip found @ 0xc2 (ivtv i2c driver #0)

ivtv0: i2c attach to card #0 ok [client=(tuner unset), addr=61]

cx25840 0-0044: cx25843-23 found @ 0x88 (ivtv i2c driver #0)

cx25840 0-0044: unable to open firmware v4l-cx25840.fw

ivtv0: i2c attach to card #0 ok [client=cx25840, addr=44]

wm8775 0-001b: chip found @ 0x36 (ivtv i2c driver #0)

ivtv0: i2c attach to card #0 ok [client=wm8775, addr=1b]

tda9887 0-0043: chip found @ 0x86 (ivtv i2c driver #0)

ivtv0: i2c attach to card #0 ok [client=tda9887, addr=43]

ivtv0: unable to open firmware v4l-cx2341x-enc.fw

ivtv0: did you put the firmware in the hotplug firmware directory?

ivtv0 warning: failed loading encoder firmware

ivtv0 warning: Error loading firmware -3!

ivtv0: Error -3 initializing firmware.

ivtv0: Error -12 on initialization

ivtv: probe of 0000:00:06.0 failed with error -12

ivtv:  ====================  END INIT IVTV  ====================

```

Maybe i am dealing with wrong files. Since i see that your files are smaller.

```
ls -l /lib/firmware/

total 980

-rw-r--r--  1 root root 376836 Dec 17 16:22 ivtv-fw-enc.bin

-rw-r--r--  1 root root 262144 Jan 23 03:53 v4l-cx2341x-dec.fw

-rw-r--r--  1 root root  14264 Dec 17 16:24 v4l-cx2341x-enc.fw

-rw-r--r--  1 root root 155648 Nov 12 12:36 v4l-cx2341x-init-mpeg.bin

-rw-r--r--  1 root root 155648 Dec 29 13:06 v4l-cx2341x-init.mpg

-r--r--r--  1 root root  14264 Jan  7  2005 v4l-cx25840.fw

```

----------

## samo

Hi,

did you check the file /etc/hotplug/firmware.agent?

```
# directory of the firmware files

FIRMWARE_DIR=/lib/firmware
```

I've also a problem with ivtv-0.4.2. The firmware is loaded correctly, but I see only noise:

```
ivtv:  ==================== START INIT IVTV ====================

ivtv:  version 0.4.2 (tagged release) loading

ivtv:  Linux version: 2.6.15-gentoo-r1 preempt K7 gcc-3.3

ivtv:  In case of problems please include the debug info between

ivtv:  the START INIT IVTV and END INIT IVTV lines, along with

ivtv:  any module options, when mailing the ivtv-users mailinglist.

ivtv0: Autodetected WinTV PVR 150 card (cx23416 based)

ACPI: PCI Interrupt Link [APC4] enabled at IRQ 19

ACPI: PCI Interrupt 0000:01:07.0[A] -> Link [APC4] -> GSI 19 (level, high) -> IRQ 18

ivtv0: Unreasonably low latency timer, setting to 64 (was 32)

ivtv0: i2c attach to card #0 ok [client=tveeprom, addr=50]

tveeprom 0-0050: Hauppauge model 26034, rev C197, serial# 7933006

tveeprom 0-0050: tuner model is TCL 2002MB_3H (idx 97, type 55)

tveeprom 0-0050: TV standards PAL(B/G) PAL(D/K) (eeprom 0x44)

tveeprom 0-0050: audio processor is CX25842 (idx 36)

tveeprom 0-0050: decoder processor is CX25842 (idx 29)

tveeprom 0-0050: has no radio, has IR remote

tuner 0-0061: chip found @ 0xc2 (ivtv i2c driver #0)

ivtv0: i2c attach to card #0 ok [client=(tuner unset), addr=61]

cx25840 0-0044: cx25842-23 found @ 0x88 (ivtv i2c driver #0)

cx25840 0-0044: loaded v4l-cx25840.fw firmware (14264 bytes)

ivtv0: i2c attach to card #0 ok [client=cx25840, addr=44]

wm8775 0-001b: chip found @ 0x36 (ivtv i2c driver #0)

ivtv0: i2c attach to card #0 ok [client=wm8775, addr=1b]

ivtv0: loaded v4l-cx2341x-enc.fw firmware (262144 bytes)

ivtv0: Encoder revision: 0x02050032

ivtv0: Allocate DMA encoder MPEG stream: 128 x 32768 buffers (4096KB total)

ivtv0: Allocate DMA encoder YUV stream: 161 x 12960 buffers (2048KB total)

ivtv0: Allocate DMA encoder VBI stream: 80 x 26208 buffers (2048KB total)

ivtv0: Allocate DMA encoder PCM audio stream: 455 x 4608 buffers (2048KB total)

tuner 0-0061: type set to 55 (TCL 2002MB)

ivtv0: Initialized WinTV PVR 150, card #0

ivtv:  ====================  END INIT IVTV  ====================
```

----------

## jonfr

The dir of the firmware agent is FIRMWARE_DIR=/lib/firmware, so that is not the problem. Maybe someone can send me there rom files, in case i am using the wrong one.

----------

## samo

I've some questions.

This guide recommends to use the modules tveeprom, tuner etc. not from the kernel but from the ivtv package, but the ebuild doesn't not copy this files. Why?

I deleted the entries ivtv and lirc_i2c from /etc/modules.autoload.d/kernel-2.6. But /etc/modprobe.conf looks as follows:

```
alias char-major-81-0 ivtv

alias char-major-81-1 ivtv

alias char-major-61-* lirc_i2c
```

Why there are two ivtv entries? I've only one card.

----------

## gladbach

im having the same issues.  but, i do not have a etc/hotplug directory, but rather an /etc/hotplug.d/ directory, and certainly no firmware.agent file in said directory?

----------

## gladbach

well, turned out, that hotplug was not installed in portage, so i emerged hotplug and looks like everything has loaded fine so far.

----------

## samo

I solved the problem with the second card entry in /etc/modprobe.conf, but it doesn't solve the main problem. The screen shows still only noise.

----------

## danyer

 *samo wrote:*   

> ... The screen shows still only noise.

 

What screen?

mplayer /dev/video0

or

mythtv

----------

## samo

Both mplayer /dev/video0 and mythtv

----------

## danyer

Hmm,

could it be because Composite, TV and S-Video changed places starting with ivtv 0.4.1?

http://dl.ivtvdriver.org/ivtv/stable/ChangeLog

I had a problem with MythTV, but not with mplayer, but maybe you have a script which sets up the video entry on PVR card...

----------

## samo

I think it has something to do with the kernel options and the loaded kernel modules. After booting lsmod looks like this:

```
Module                  Size  Used by

snd_pcm_oss            42272  0

snd_mixer_oss          14272  1 snd_pcm_oss

snd_seq_oss            27776  0

snd_seq_midi_event      5696  1 snd_seq_oss

snd_seq                43472  4 snd_seq_oss,snd_seq_midi_event

snd_seq_device          6604  2 snd_seq_oss,snd_seq

tda9887                14096  0

wm8775                  4620  0

cx25840                21328  0

tuner                  38564  0

tveeprom               12880  0

ivtv                  191892  0

firmware_class          7552  2 cx25840,ivtv

i2c_algo_bit            8008  1 ivtv

videodev                7040  1 ivtv

skge                   30928  0

generic                 4164  0 [permanent]

snd_intel8x0           25756  0

snd_ac97_codec         80032  1 snd_intel8x0

snd_ac97_bus            1920  1 snd_ac97_codec

snd_pcm                69768  3 snd_pcm_oss,snd_intel8x0,snd_ac97_codec

snd_timer              18884  2 snd_seq,snd_pcm

snd                    41380  9 snd_pcm_oss,snd_mixer_oss,snd_seq_oss,snd_seq,snd_seq_device,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer

soundcore               7136  1 snd

snd_page_alloc          7944  2 snd_intel8x0,snd_pcm

forcedeth              18500  0

i2c_nforce2             5376  0

i2c_core               15760  8 tda9887,wm8775,cx25840,tuner,tveeprom,ivtv,i2c_algo_bit,i2c_nforce2

nvidia_agp              5724  1

agpgart                26568  1 nvidia_agp

rtc                     9844  0

vfat                    9664  0

fat                    40668  1 vfat

ide_cd                 34436  0

cdrom                  33824  1 ide_cd

unix                   21040  200
```

But after I started mplayer /dev/video0 it looks like this:

```
Module                  Size  Used by

bttv                  147856  0

video_buf              16004  1 bttv

v4l2_common             4800  1 bttv

btcx_risc               3784  1 bttv

lirc_i2c                8260  0

lirc_dev               12004  1 lirc_i2c

usblp                  10112  0

snd_pcm_oss            42272  0

snd_mixer_oss          14272  1 snd_pcm_oss

snd_seq_oss            27776  0

snd_seq_midi_event      5696  1 snd_seq_oss

snd_seq                43472  4 snd_seq_oss,snd_seq_midi_event

snd_seq_device          6604  2 snd_seq_oss,snd_seq

tda9887                14096  0

wm8775                  4620  0

cx25840                21328  0

tuner                  38564  0

tveeprom               12880  1 bttv

ivtv                  191892  0

firmware_class          7552  3 bttv,cx25840,ivtv

i2c_algo_bit            8008  2 bttv,ivtv

videodev                7040  2 bttv,ivtv

skge                   30928  0

generic                 4164  0 [permanent]

snd_intel8x0           25756  0

snd_ac97_codec         80032  1 snd_intel8x0

snd_ac97_bus            1920  1 snd_ac97_codec

snd_pcm                69768  3 snd_pcm_oss,snd_intel8x0,snd_ac97_codec

snd_timer              18884  2 snd_seq,snd_pcm

snd                    41380  9 snd_pcm_oss,snd_mixer_oss,snd_seq_oss,snd_seq,snd_seq_device,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer

soundcore               7136  1 snd

snd_page_alloc          7944  2 snd_intel8x0,snd_pcm

forcedeth              18500  0

i2c_nforce2             5376  0

i2c_core               15760  10 bttv,lirc_i2c,tda9887,wm8775,cx25840,tuner,tveeprom,ivtv,i2c_algo_bit,i2c_nforce2

nvidia_agp              5724  1

agpgart                26568  1 nvidia_agp

rtc                     9844  0

vfat                    9664  0

fat                    40668  1 vfat

ide_cd                 34436  0

cdrom                  33824  1 ide_cd

unix                   21040  251
```

Why bttv is loaded? Why there are 3 firmware_class modules? Is this normal?

I have this kernel options: *Quote:*   

> #
> 
> # Multimedia devices
> 
> #
> ...

 Last edited by samo on Thu Jan 26, 2006 6:14 am; edited 1 time in total

----------

## jonfr

I did downgrade to kernel 2.6.13.4 and to ivtv version 0.4.0, i was unable to get it working with the new kernel and the new version of ivtv. Why it didn't work with kernel 2.6.15.1 and ivtv 0.4.2 is unkown to me.

----------

## samo

ivtv-0.4.0 is also running with kenel 2.6.14-gentoo-r5.

----------

## jhow

make sure you have tuned a channel in

eg. ivtv-tune -taustralia -c28

----------

## Comstocki

Has anyone found a solution to Jonfr's problem?  I have a 150MCE and I've followed all the guides and I can't get ivtv-0.4.2 to load the firmware.

----------

## corp186

Just so you know, ivtv is handled differently under 2.6.15 and above. In your kernel config you need to go to Device Drivers -> Multimedia Devices -> Video for Linux and make sure you have "Add support for additional audio chipsets" and "Add support for additional video chipsets" enabled. Your kernel will build all of the chipset drivers, and the ivtv ebuild will create just the ivtv module.

At least, I think this is how it's supposed to work cause I downgraded due to something else after I figured that out but before I could test it.

----------

## ndbruin

I got exactly the same problem. I followed the guide and put all the files in the directories they should be.

So the hauppage files in /lib/modules and in /lib/firmware the links to these files.

Yesterday I tried everything and also saw this unsolved topic.

After searching on other forums I noticed a very interesting post.

 :Embarassed:  Shame on me, this was a very old post and I don't know if it is accurate anymore   :Embarassed: 

Somebody found out that if you do:

```
cat /proc/sys/kernel/hotplug
```

you get back

```
/sbin/udevsend
```

To fix this the guy took these steps:

1) emerge the udev source, I grabbed the latest, udev-079.

```
ACCEPT_KEYWORDS="~x86" ebuild $(equery w udev) clean unpack
```

this created a directory in /var/tmp/portage with the src that I could compile manually.

2) compile

```
make && make install
```

3) compile and copy the extra hotplug binary

```
make EXTRAS=extras/run_directory

cp extras/run_directory/udev_run_hotplugd /sbin
```

4) add a line to the end /etc/udev/rules.d/50-udev.rules

```
echo "ENV{UDEVD_EVENT}==\"1\", RUN+=\"/sbin/udev_run_hotplugd\"" >> /etc/udev/rules.d/50-udev.rules
```

I tried it myself and it still gives me /sbin/udevsend back, but I am not giving up. I if notice new things I will post it here.

Hopefully these steps work for other people instantly.

----------

## ndbruin

Well, it finally worked for me!

It seemed that even with the steps I provided above it didn't work.

So I tried a little trick, I did this:

```
echo /sbin/hotplug /proc/sys/kernel/hotplug
```

after this I checked it with:

```
cat /proc/sys/kernel/hotplug
```

and the output was:

```
/sbin/hotplug
```

After this I did

```
modprobe ivtv
```

And finally the firmware loaded correctly!

So it seems that something doesn't work in the combination of hotplug and udev

----------

## duhblow7

I'm having the same problem.  ivtv modules loaded when installed from a stage3 with an older version of udev just last night.  i emerge world and now the firmware won't load.

i've followed the same guides and have all the recommended kernel options.  one thing i noticed was the udev guide (http://www.gentoo.org/doc/en/udev-guide.xml) shows i should have the kernel option:

```
General setup --->

  [*] Support for hot-pluggable devices
```

when i check my kernel config i get am not able to modularize or build this into the kernel:

```
--- Support for hot-pluggable devices
```

here is some info:

```
fortress linux # cat /etc/hotplug/firmware.agent | grep FIRMWARE_DIR=

FIRMWARE_DIR=/lib/firmware

fortress linux # ls -la /lib/firmware/

total 1216

drwxr-xr-x   2 root root    155 Feb 22 17:00 .

drwxr-xr-x  10 root root   8192 Feb 21 17:55 ..

-rw-rw-rw-   1 root root 262144 Feb 22 13:35 ivtv-fw-enc.bin

-rw-rw-rw-   1 root root 262144 Feb 22 13:35 v4l-cx2341x-dec.fw

-rw-rw-rw-   1 root root 155648 Feb 22 17:00 v4l-cx2341x-enc.fw

-rw-rw-rw-   1 root root 376836 Feb 22 13:35 v4l-cx2341x-enc.fw.old

-rw-rw-rw-   1 root root 155648 Feb 22 13:35 v4l-cx2341x-init.mpg

-rw-rw-rw-   1 root root  14264 Feb 22 13:35 v4l-cx25840.fw

fortress linux # lsmod

Module                  Size  Used by

nvidia               4090512  0

tda9887                16528  0

wm8775                  6284  0

cx25840                28560  0

tuner                  24864  0

tveeprom               14252  0

ivtv                  224276  0

videodev                9728  1 ivtv

i2c_algo_bit            9992  1 ivtv

i2c_dev                 9984  0

i2c_core               22544  8 tda9887,wm8775,cx25840,tuner,tveeprom,ivtv,i2c_algo_bit,i2c_dev

via_rhine              23940  0
```

applicable dmesg:

```
ivtv0: This is the second unit of a PVR500

ivtv0: Correcting tveeprom data: no radio present on second unit

ivtv0: unable to open firmware v4l-cx2341x-enc.fw

ivtv0: did you put the firmware in the hotplug firmware directory?

ivtv0 warning: failed loading encoder firmware

ivtv0 warning: Error loading firmware -3!

ivtv0: Error -3 initializing firmware.

ivtv0: Error -12 on initialization

ivtv: probe of 0000:02:09.0 failed with error -12

ivtv:  ====================  END INIT IVTV  ====================
```

i have this too, but what does this mean?  i read somewhere that this is correct with the version of udev i have installed.  how is this wrong?

```
fortress linux # cat /proc/sys/kernel/hotplug

/sbin/udevsend
```

hotplug-base was installed as a dep with udev but since then i've installed hotplug and coldplug, with coldplug starting at boot and hotplug not on any runlevel

i'm running  2.6.14-gentoo-r5, avoiding 2.6.15 because ivtvdriver.org warns of problems. since i'm not running 2.6.15 i don't have "Add support for additional audio chipsets" and "Add support for additional video chipsets" enabled.  i followed the workaround provided by ndbruin with no success.  i have since removed his changes.  i tried unmasking newer versions of udev in package.keywords and currently have tried udev-084 and udev-079.  i have the PVR-500 with the samsung chipset which wasn't supported until a few days ago with the ivtv-0.4.3 which is not yet in portage.  i built it manually and obtained the firmware per the ivtvdriver.org guide and had it working 100% before i upgraded udev from the current x86 stage3 tarball last night.

any help?

anybody?

----------

## Arrta

Researching this lead me to the fact that the hotplug line for udev has changed.

If you do not allow portage to update the config on its own you will have to modify the hotplug line in the permissions file or merge the changes.

I have 2 systems, one is running udev-079-r1 and uses

ENV{UDEVD_EVENT}=="1", RUN+="/sbin/udev_run_hotplugd"

like was said above.

The other is running udev-087 and uses

ENV{UDEVD_EVENT}=="1", RUN+="/sbin/udev_run_hotplugd $env{SUBSYSTEM}"

Not sure which version implemented the change but without the $env{SUBSYSTEM} my firmware does not load.

ndbruin and duhblow7 I believe this information will resolve your issues.

----------

