# TV card stopped working after kernel upgrade[kind of SOLVED]

## dmoreno

After having upgraded from kernel 4.4.39 to 4.9.6, my TV card (a Hauppauge WinTV-HVR-4000) stopped working.

Log messages suggest that the card's firmware doesn't get loaded anymore.

These are some relevant log messages with the old kernel:

```
Feb 12 21:42:55 [kernel] cx88[0]: i2c init: enabling analog demod on HVR1300/3000/4000 tuner

Feb 12 21:42:55 [kernel] tda9887 8-0043: creating new instance

Feb 12 21:42:55 [kernel] tda9887 8-0043: tda988[5/6/7] found

Feb 12 21:42:55 [kernel] tuner 8-0043: Tuner 74 found with type(s) Radio TV.

Feb 12 21:42:55 [kernel] tuner 8-0061: Tuner -1 found with type(s) Radio TV.

Feb 12 21:42:55 [kernel] tveeprom 8-0050: Hauppauge model 69009, rev B2D3, serial# 4031877960

Feb 12 21:42:55 [kernel] tveeprom 8-0050: MAC address is 00:0d:fe:51:93:48

Feb 12 21:42:55 [kernel] tveeprom 8-0050: tuner model is Philips FMD1216MEX (idx 133, type 78)

Feb 12 21:42:55 [kernel] tveeprom 8-0050: TV standards PAL(B/G) PAL(I) SECAM(L/L') PAL(D/D1/K) ATSC/DVB Digital (eeprom 0xf4)

Feb 12 21:42:55 [kernel] tveeprom 8-0050: audio processor is CX882 (idx 33)

Feb 12 21:42:55 [kernel] tveeprom 8-0050: decoder processor is CX882 (idx 25)

Feb 12 21:42:55 [kernel] tveeprom 8-0050: has radio, has IR receiver, has no IR transmitter

Feb 12 21:42:55 [kernel] cx88[0]: hauppauge eeprom: model=69009

Feb 12 21:42:55 [kernel] tuner-simple 8-0061: creating new instance

Feb 12 21:42:55 [kernel] tuner-simple 8-0061: type set to 78 (Philips FMD1216MEX MK3 Hybrid Tuner)

Feb 12 21:42:55 [kernel] Registered IR keymap rc-hauppauge

Feb 12 21:42:55 [kernel] input: cx88 IR (Hauppauge WinTV-HVR400 as /devices/pci0000:00/0000:00:1e.0/0000:04:02.0/rc/rc0/input11

Feb 12 21:42:55 [kernel] rc0: cx88 IR (Hauppauge WinTV-HVR400 as /devices/pci0000:00/0000:00:1e.0/0000:04:02.0/rc/rc0

Feb 12 21:42:55 [kernel] cx88[0]/0: found at 0000:04:02.0, rev: 5, irq: 17, latency: 64, mmio: 0xf4000000

Feb 12 21:42:55 [kernel] wm8775 8-001b: chip found @ 0x36 (cx88[0])

Feb 12 21:42:55 [kernel] lirc_dev: IR Remote Control driver registered, major 250 

Feb 12 21:42:55 [kernel] rc rc0: lirc_dev: driver ir-lirc-codec (cx88xx) registered at minor = 0

Feb 12 21:42:55 [kernel] IR LIRC bridge handler initialized

Feb 12 21:42:55 [kernel] cx88[0]/0: registered device video0 [v4l2]

Feb 12 21:42:55 [kernel] cx88[0]/0: registered device vbi0

Feb 12 21:42:55 [kernel] cx88[0]/0: registered device radio0

Feb 12 21:42:55 [kernel] cx88[0]/2: cx2388x 8802 Driver Manager

Feb 12 21:42:55 [kernel] cx88[0]/2: found at 0000:04:02.2, rev: 5, irq: 17, latency: 64, mmio: 0xf6000000

Feb 12 21:42:55 [kernel] cx88[0]/1: CX88x/0: ALSA support for cx2388x boards

Feb 12 21:42:55 [kernel] cx88/2: cx2388x dvb driver version 1.0.0 loaded

Feb 12 21:42:55 [kernel] cx88/2: registering cx8802 driver, type: dvb access: shared

Feb 12 21:42:55 [kernel] cx88[0]/2: subsystem: 0070:6902, board: Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid [card=68]

Feb 12 21:42:55 [kernel] cx88[0]/2: cx2388x based DVB/ATSC card

Feb 12 21:42:55 [kernel] cx8802_alloc_frontends() allocating 2 frontend(s)

Feb 12 21:42:55 [kernel] tuner-simple 8-0061: attaching existing instance

Feb 12 21:42:55 [kernel] tuner-simple 8-0061: couldn't set type to 63. Using 78 (Philips FMD1216MEX MK3 Hybrid Tuner) instead

Feb 12 21:42:55 [kernel] cx88-mpeg driver manager 0000:04:02.2: DVB: registering adapter 0 frontend 0 (Conexant CX24116/CX24118)...

Feb 12 21:42:55 [kernel] cx88-mpeg driver manager 0000:04:02.2: DVB: registering adapter 0 frontend 1 (Conexant CX22702 DVB-T)...

[...]

Feb 12 21:44:09 [kernel] cx24116_firmware_ondemand: Waiting for firmware upload (dvb-fe-cx24116.fw)...

Feb 12 21:44:09 [kernel] cx24116_firmware_ondemand: Waiting for firmware upload(2)...

Feb 12 21:44:14 [kernel] cx24116_load_firmware: FW version 1.23.86.1

Feb 12 21:44:14 [kernel] cx24116_firmware_ondemand: Firmware upload complete

Feb 12 21:44:15 [kernel] cx24116_firmware_ondemand: Waiting for firmware upload (dvb-fe-cx24116.fw)...

Feb 12 21:44:15 [kernel] cx24116_firmware_ondemand: Waiting for firmware upload(2)...

Feb 12 21:44:20 [kernel] cx24116_load_firmware: FW version 1.23.86.1

Feb 12 21:44:20 [kernel] cx24116_firmware_ondemand: Firmware upload complete

```

While the corresponding log messages with kernel 4.9.6 are:

```
Feb 12 13:16:05 [kernel] cx88[0]: i2c init: enabling analog demod on HVR1300/3000/4000 tuner

Feb 12 13:16:05 [kernel] TUNER: Unable to find symbol tda829x_probe()

Feb 12 13:16:05 [kernel] DVB: Unable to find symbol tda9887_attach()

Feb 12 13:16:05 [kernel] tuner 8-0043: Tuner 4 found with type(s) Radio TV.

Feb 12 13:16:05 [kernel] tuner 8-0061: Tuner -1 found with type(s).

Feb 12 13:16:05 [kernel] tveeprom 8-0050: Hauppauge model 69009, rev B2D3, serial# 4031877960

Feb 12 13:16:05 [kernel] tveeprom 8-0050: MAC address is 00:0d:fe:51:93:48

Feb 12 13:16:05 [kernel] tveeprom 8-0050: tuner model is Philips FMD1216MEX (idx 133, type 78)

Feb 12 13:16:05 [kernel] tveeprom 8-0050: TV standards PAL(B/G) PAL(I) SECAM(L/L') PAL(D/D1/K) ATSC/DVB Digital (eeprom 0xf4)

Feb 12 13:16:05 [kernel] tveeprom 8-0050: audio processor is CX882 (idx 33)

Feb 12 13:16:05 [kernel] tveeprom 8-0050: decoder processor is CX882 (idx 25)

Feb 12 13:16:05 [kernel] tveeprom 8-0050: has radio, has IR receiver, has no IR transmitter

Feb 12 13:16:05 [kernel] cx88[0]: hauppauge eeprom: model=69009

Feb 12 13:16:05 [kernel] Registered IR keymap rc-hauppauge

Feb 12 13:16:05 [kernel] input: cx88 IR (Hauppauge WinTV-HVR400 as /devices/pci0000:00/0000:00:1e.0/0000:04:02.2/rc/rc0/input11

Feb 12 13:16:05 [kernel] rc rc0: cx88 IR (Hauppauge WinTV-HVR400 as /devices/pci0000:00/0000:00:1e.0/0000:04:02.2/rc/rc0

Feb 12 13:16:05 [kernel] cx88[0]/2: cx2388x 8802 Driver Manager

Feb 12 13:16:05 [kernel] cx88[0]/2: found at 0000:04:02.2, rev: 5, irq: 17, latency: 64, mmio: 0xf6000000

Feb 12 13:16:05 [kernel] cx88[0]/1: CX88x/0: ALSA support for cx2388x boards

Feb 12 13:16:05 [kernel] cx88[0]/0: found at 0000:04:02.0, rev: 5, irq: 17, latency: 64, mmio: 0xf4000000

Feb 12 13:16:05 [kernel] lirc_dev: IR Remote Control driver registered, major 249

Feb 12 13:16:05 [kernel] rc rc0: lirc_dev: driver ir-lirc-codec (cx88xx) registered at minor = 0

Feb 12 13:16:05 [kernel] IR LIRC bridge handler initialized

Feb 12 13:16:05 [kernel] wm8775 8-001b: chip found @ 0x36 (cx88[0])

Feb 12 13:16:05 [kernel] cx88/2: cx2388x dvb driver version 1.0.0 loaded

Feb 12 13:16:05 [kernel] cx88/2: registering cx8802 driver, type: dvb access: shared

Feb 12 13:16:05 [kernel] cx88[0]/2: subsystem: 0070:6902, board: Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid [card=68]

Feb 12 13:16:05 [kernel] cx88[0]/2: cx2388x based DVB/ATSC card

Feb 12 13:16:05 [kernel] cx8802_alloc_frontends() allocating 2 frontend(s)

Feb 12 13:16:05 [kernel] DVB: Unable to find symbol cx24116_attach()

Feb 12 13:16:05 [kernel] DVB: Unable to find symbol cx22702_attach()

Feb 12 13:16:05 [kernel] cx88[0]/2: frontend initialization failed

Feb 12 13:16:05 [kernel] cx88[0]/2: dvb_register failed (err = -22)

Feb 12 13:16:05 [kernel] cx88[0]/2: cx8802 probe failed, err = -22

Feb 12 13:16:05 [kernel] cx88[0]/0: registered device video0 [v4l2]

Feb 12 13:16:05 [kernel] cx88[0]/0: registered device vbi0

Feb 12 13:16:05 [kernel] cx88[0]/0: registered device radio0

Feb 12 13:16:05 [kernel] tuner 8-0043: tuner has no way to set radio frequency

Feb 12 13:16:05 [kernel] tuner 8-0061: tuner type not set

```

The config files of both kernels are analogous.

Any idea of what the problem can be?

Thank you very much.Last edited by dmoreno on Sun Feb 26, 2017 6:20 pm; edited 1 time in total

----------

## Tony0945

 *dmoreno wrote:*   

> The config files of both kernels are analogous.

 

Analogous? Can you pastebin both the old and new configs? Have you built firmware into the kernel?

I don't have that card, I have a HVR-1600, but getting the right firmware was difficult.

EDIT:  Some good firmware info here https://www.linuxtv.org/wiki/index.php/Hauppauge_WinTV-HVR-4000

I suspect some upgrade (linux-firmware?) has given you the wrong firmware.

----------

## dmoreno

 *Tony0945 wrote:*   

>  *dmoreno wrote:*   The config files of both kernels are analogous. 
> 
> Analogous? 

 

Indeed. These are the config options related to the tuner card:

-- linux-4.4.39

# CONFIG_FIRMWARE_IN_KERNEL is not set

CONFIG_EXTRA_FIRMWARE=""

# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set

CONFIG_FIRMWARE_EDID=y

CONFIG_FIRMWARE_MEMMAP=y

# CONFIG_TEST_FIRMWARE is not set

CONFIG_VIDEO_CX88=m

CONFIG_VIDEO_CX88_ALSA=m

CONFIG_VIDEO_CX88_DVB=m

CONFIG_VIDEO_CX88_ENABLE_VP3054=y

CONFIG_VIDEO_CX88_VP3054=m

CONFIG_VIDEO_CX88_MPEG=m

CONFIG_DVB_CX24116=m

CONFIG_DVB_CX22702=m

-- linux-4.9.6

CONFIG_FIRMWARE_IN_KERNEL=y

CONFIG_EXTRA_FIRMWARE=""

# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set

CONFIG_FIRMWARE_EDID=y

CONFIG_FIRMWARE_MEMMAP=y

# CONFIG_TEST_FIRMWARE is not set

CONFIG_VIDEO_CX88=m

CONFIG_VIDEO_CX88_ALSA=m

CONFIG_VIDEO_CX88_DVB=m

CONFIG_VIDEO_CX88_ENABLE_VP3054=y

CONFIG_VIDEO_CX88_VP3054=m

CONFIG_VIDEO_CX88_MPEG=m

CONFIG_DVB_CX24116=m

CONFIG_DVB_CX22702=m

 *Tony0945 wrote:*   

> Can you pastebin both the old and new configs? Have you built firmware into the kernel?
> 
> I don't have that card, I have a HVR-1600, but getting the right firmware was difficult.
> 
> EDIT:  Some good firmware info here https://www.linuxtv.org/wiki/index.php/Hauppauge_WinTV-HVR-4000
> ...

 

The full config files can be found at http://pastebin.com/fzXSj43u

Please be aware that the kernel 4.9 has been firstly tested without the "firmware in kernel" option and then changed, just to try a different way.

As for the firmware version, it hasn't been changed in a while. And it's working perfectly right now, as long as I boot the old kernel version.

----------

## Tony0945

Two thoughts:

1. Did you run make oldconfig when you went from 4.4 to 4.9

2. Can you try 4.8 to localise when the problem was introduced?

----------

## Tony0945

 *Quote:*   

> Feb 12 13:16:05 [kernel] DVB: Unable to find symbol cx24116_attach()
> 
> Feb 12 13:16:05 [kernel] DVB: Unable to find symbol cx22702_attach() 

 

```
3 linux-4.9.5-gentoo # grep -ri cx24116_attach .

./drivers/media/pci/dm1105/dm1105.c:                    cx24116_attach, &serit_sp2633_config,

./drivers/media/pci/cx88/cx88-dvb.c:            fe0->dvb.frontend = dvb_attach(cx24116_attach,

./drivers/media/pci/cx88/cx88-dvb.c:            fe0->dvb.frontend = dvb_attach(cx24116_attach,

./drivers/media/pci/cx88/cx88-dvb.c:            fe0->dvb.frontend = dvb_attach(cx24116_attach,

./drivers/media/pci/cx88/cx88-dvb.c:            fe0->dvb.frontend = dvb_attach(cx24116_attach,

./drivers/media/pci/cx23885/cx23885-dvb.c:              fe0->dvb.frontend = dvb_attach(cx24116_attach,

./drivers/media/pci/cx23885/cx23885-dvb.c:              fe0->dvb.frontend = dvb_attach(cx24116_attach,

./drivers/media/usb/dvb-usb-v2/anysee.c:                adap->fe[0] = dvb_attach(cx24116_attach, &anysee_cx24116_config,

./drivers/media/usb/dvb-usb/dw2102.c:           d->fe_adap[0].fe = dvb_attach(cx24116_attach, &dw2104_config,

./drivers/media/dvb-frontends/cx24116.c:struct dvb_frontend *cx24116_attach(const struct cx24116_config *config,

./drivers/media/dvb-frontends/cx24116.c:EXPORT_SYMBOL(cx24116_attach);

./drivers/media/dvb-frontends/cx24116.h:extern struct dvb_frontend *cx24116_attach(

./drivers/media/dvb-frontends/cx24116.h:static inline struct dvb_frontend *cx24116_attach(

```

 

```
linux-4.9.5-gentoo # grep -ri cx22702_attach .

./drivers/media/pci/cx88/cx88-dvb.c:            fe0->dvb.frontend = dvb_attach(cx22702_attach,

./drivers/media/pci/cx88/cx88-dvb.c:            fe0->dvb.frontend = dvb_attach(cx22702_attach,

./drivers/media/pci/cx88/cx88-dvb.c:            fe0->dvb.frontend = dvb_attach(cx22702_attach,

./drivers/media/pci/cx88/cx88-dvb.c:            fe0->dvb.frontend = dvb_attach(cx22702_attach,

./drivers/media/pci/cx88/cx88-dvb.c:            fe1->dvb.frontend = dvb_attach(cx22702_attach,

./drivers/media/pci/cx88/cx88-dvb.c:            fe1->dvb.frontend = dvb_attach(cx22702_attach,

./drivers/media/usb/dvb-usb/cxusb.c:    adap->fe_adap[0].fe = dvb_attach(cx22702_attach, &cxusb_cx22702_config,

./drivers/media/dvb-frontends/cx22702.c:struct dvb_frontend *cx22702_attach(const struct cx22702_config *config,

./drivers/media/dvb-frontends/cx22702.c:EXPORT_SYMBOL(cx22702_attach);

./drivers/media/dvb-frontends/cx22702.h:extern struct dvb_frontend *cx22702_attach(

./drivers/media/dvb-frontends/cx22702.h:static inline struct dvb_frontend *cx22702_attach(

```

 The symbols were there in 4.9.5, try it with your 4.9.6 did you use make oldconfig?  BTW, repeated the grep's with 4.9.8, same result.

The code is in the source but not making it into the object. that's got to be a configuration problem.

----------

## dmoreno

Yes, I used "make oldconfig".

Additionally, I've looked for the missing symbols in /proc/kallsyms and this is what I've found:

```

ffffffff8145ab70 T tda829x_probe

[...]

ffffffff8145cc50 T tda9887_attach

[...]

ffffffffa07fdcd0 t cx24116_attach   [cx24116]

[...]

```

It seems that they're all present except cx22702_attach().

----------

## Tony0945

This will take digging through the code to determine why the file that defines the missing symbol isn't included in the build.

Start with drivers/media/usb/dvb-usb/dw2102.c and see if there are any clues. Then grep for dw2102.c and look for conditional code.

Remember when people said linux was easy because you have the source code? HA HA HA HA HA HA!

EDIT: Wrong file S/B cx24116.c

----------

## Tony0945

After screwing around in the code, I couldn't find anything. I built my kernel (4.10.0) with your config's and, like you, did not find cx22702_attach in /proc/kallsysms. However:

```
X3 ~ # modprobe -v cx22702

insmod /lib/modules/4.10.0-gentootest/kernel/drivers/media/dvb-frontends/cx22702.ko

X3 ~ # grep cx22702_attach /var/log/messages

X3 ~ # grep cx22702 /var/log/messages

X3 ~ # grep cx22702_attach /proc/kallsyms

ffffffffa03b78a0 T cx22702_attach       [cx22702]

```

 And I don't even have the hardware. So try the modprobe then look to see why the module isn't being loaded automatically.

Also try this:

```
X3 ~ # updatedb && locate cx22702|grep lib

/lib64/modules/4.10.0-gentootest/kernel/drivers/media/dvb-frontends/cx22702.ko

```

Also look in /etc/conf.d/modules, assuming the module is being built.

----------

## dmoreno

I finally got my TV card working by disabling the following kernel option:

```
# CONFIG_TRIM_UNUSED_KSYMS is not set
```

Apparently the symbol cx22702_attach() is identified as unused and is consequently trimmed.

I guess the ideal solution would involve finding out why the symbol is wrongly identified as unused, but for now, this workaround will do.

I hope this may be of help to others.

Thanks, Tony0945, for all your help.

----------

## Tony0945

Ah! I never had it set:

```
X3 ~ # zcat /proc/config.gz |grep TRIM_UNUSED_KSYMS

# CONFIG_TRIM_UNUSED_KSYMS is not set
```

```
 CONFIG_TRIM_UNUSED_KSYMS:                                                                                                                                                             │

  │                                                                                                                                                                                       │

  │ The kernel and some modules make many symbols available for                                                                                                                           │

  │ other modules to use via EXPORT_SYMBOL() and variants. Depending                                                                                                                      │

  │ on the set of modules being selected in your kernel configuration,                                                                                                                    │

  │ many of those exported symbols might never be used.                                                                                                                                   │

  │                                                                                                                                                                                       │

  │ This option allows for unused exported symbols to be dropped from                                                                                                                     │

  │ the build. In turn, this provides the compiler more opportunities                                                                                                                     │

  │ (especially when using LTO) for optimizing the code and reducing                                                                                                                      │

  │ binary size.  This might have some security advantages as well.                                                                                                                       │

  │                                                                                                                                                                                       │

  │ If unsure, or if you need to build out-of-tree modules, say N
```

I do use out of tree modules (r8168) but honestly, I probably took the suggested N sometime in the deep past.

A pleasure to help, especially on a LinuxTV problem.  Don't forget to append [SOLVED] to the thread title.

----------

