Hauppauge WinTV PVR2 (USB-2.0, 29032 Rev D158 NTSC/NTSC-J):

    The current developement of the pvrusb2 driver for the V4L interface of kernel-2.6 can be found on Mike Isely's web page.

    The pvrusb2 driver is now in the kernel as of >=kerne-2.6.18.

    Official documentation is on Mike Isely's web page.  Please use his site for setup instructions because only provide some tips below!

    There is also a pvrusb2 mailing list for support.  Live support can also be found on the following irc address: [irc.freenode.net  #pvrusb2].
As far as my history with my pvrusb2 device, I bought mine from CompUSA on approx 2004.11.10.  I encountered several nightmare scenarios trying to install this device on winxp, but it's getting easier as Hauppauge now appears to be releasing just three zip files nowadays.  Using this device with Linux is much easier and much more stable!

Firmware Installation

Gentoo Users - First Preferred Method:

  # emerge media-tv/pvr-firmware

(I have yet to troubleshoot, but I think lirc might be failing with pvr-firmware.  When /etc/init.d/lircd is started, it should create a /dev/lirc/0.  I'm only getting this when rebooting after loading the Windows XP firmwares or possibly my older firmwares listed below?  Please let me know if you can verify this.  20070214)

Gentoo Users - Second Method:

 	# echo "PORTDIR_OVERLAY=/usr/local/portage" >> /etc/make.conf

# mkdir /usr/local/portage/app-misc/pvrusb2-firmware
# cd /usr/local/portage/app-misc/pvrusb2-firmware

# wget http://bugs.gentoo.org/attachment.cgi?id=98689
(Make sure you have the latest ebuild available!)
(http://bugs.gentoo.org/show_bug.cgi?id=78570)

# mv attachment.cgi\?id\=98689 pvrusb2-firmware-0.2.ebuild

# ebuild pvrusb2-firmware-0.2.ebuild digest
# emerge pvrusb2-firmware

All other users:

    1. You can grab the firmwares already extracted from pvrusb2_inf_24117.zip.
    2. Untar and copy the contents to your system firmware folder (For Gentoo /lib/firmware)
    3. Modprobe pvrusb2 or reset your pvrusb2 device if you're driver is statically built into the kernel.
    4. Check to to see if the pvrusb2 driver loaded the firmwares and created a /dev/v4l/video0 device file.
    5. If you have problems:

# insmod /lib/modules/2.6.18Y/kernel/drivers/media/video/pvrusb2/pvrusb2.ko debug=10

And check /var/log/messages to see if pvrusb2 is complaining about firmware file missing.

For most at this point, things should just work! :-)

Xawtv-4 for playback

Grab a cvs version of xawtv-4 or xawtv-4 (if it's available).

It might be wise to use “./configure –prefix=$HOME” and starting xawtv and it's related binaries by using something like “$ /home/foo/bin/xawtv”. Doing this would be wise if you already have a stable version of xawtv already installed or you don't want to make a mess out of /.

Run “/home/foo/scantv” to scan for channels.

All configuration files have migrated to ~/.tv and ~/.xawtv rc file is no longer used.

Once done, run /home/foo/bin/xawtv and enjoy.

Mythtv for playback

I use Mythtv and Mike as well.

Mythtv works by designating the pvrusb2 device as a "PVR-250/350 MPEG2" when setting up your device with /usr/bin/mythtv-setup.

If you don't see "PVR-250/350 MPEG2" as an option for mythtv-setup device field, make sure you've compiled Mythtv with proper options for it's configure script.  (I think it's something like --enable-ivtv?)

Setting up Lirc with the Pvrusb2 IR remote

  1. Install Lirc package and make sure you have kernel support for  I2C enabled.
  2. Modprobe the lirc_dev & lirc_i2c drivers.
  3. Copy over my config files into your /etc or modify yours appropriately. (*Note, my lirc config files are slightly modified from Mike Isely's!  I sort of started from scratch after having some problems with the default /etc/lirc* files.  Also, make sure you modify /etc/lircrc to show your bin file locations.) 
  4. Start lircd (/etc/init.d/lircd).
Some troubleshooting methods: 
If all you are using is Mythtv with your remote IR device, copy your /etc/lircrc file over to the ~/.mythtv/ folder and starting mythfrontend should do the rest.  Mythtv is now coded with Lirc support.

***Please see my notes concerning lirc problems noted at the bottom of the page dated 20070214***
Lirc or IR support tricky and to make things worse, I have rarely watched TV in the past months.

Test Streaming

Sometimes, you just want to test the video0 device file.  You can either use cat or mplayer.  The output is a standard MPEG2 file.

A simple test resulting in a playable MPEG2 file.

$ cat /dev/v4l/video0 > test.mpg

Here is the conantation for getting live playback using mplayer:

$ mkfifo test.mpg
$ cat /dev/v4l/video0 > test.mpg | mplayer test.mpg

Or, for radio support added to the >=kernel-2.6.19:

$ mkfifo /tmp/radio.mpg && cat /dev/v4l/radio0 > /tmp/radio.mpg | mplayer /tmp/radio.mpg

My Notes

(2005.01.11) I have experimented with several deinterlace filters and it would appear they cause too much cpu overhead on a 1Ghz P3 while watching live tv.

(2005.07.14) Latest news on the pvrusb2 driver can be found at http://www.isely.net/pvrusb2/pvrusb2.html .  Mike has taken over and made allot of fixes and modifications.  The /sys/class/pvrusb2 interface works really well! I'm meadling with trying to get everything working here on my Gentoo box with hopes of updating the Portage ebuild as soon as I'm successful.  FYI: I have a pvrusb2 device with a "type 58 tuner" returning "type = 4" value so I had to deactivate the kernel's tuner.ko & tveeprom.ko code (these modules are hidden under the bt848.ko code).  So deactiving the bt848.ko code in the kernel to prevent the tuner.ko & tveeprom from automagically being built and colliding with the tuner modules of this pvrusb2 driver.  If you have a "type 58 tuner", don't fret, try using the kernel tuner.ko & tveeprom.ko code (by activating the bt848.ko code) as these modules are maintained at the kernel level and should work fine for you.  If you have this problem, file a bug report with the pvrusb2 maintainer. 


(2005.07.15) If you get a "mpeg: select: timeout (3 sec)" with a snapshot xawtv then try "mv ~/.tv/stations .tv/stations.old".  Assuming you used "./configure --prefix=$HOME" then do, "~/bin/scantv" (along with the proper switches for scantv if the correct values are not being used).  If you still get this error, trying changing the channels.  Also, check to make sure scantv has written new channels found within the ~/.tv/stations file.  A very common solution to this problem, try removing the first few channels within the .tv/stations listing. Xawtv starts by always choosing the first station within .tv/stations. If the first station is not properly tuned, this time-out error may occur. I think I've found a solution to a very rare “no sound” issue. Try reloading the pvrusb2 after powering off /on the device.

(2005.08.01) I think I've found a solution to a very rare “no sound” issue. Try reloading the pvrusb2 after powering off /on the device. Lirc is working here!

(2005.08.03) For Mythtv, I recommend using Datadirect for aquiring the channels instead of using the channels found with xawtv's scantv.  It's a free service and the instructions are found in section 5.3 of Mythtv's Documentation.

(2005.08.07)  I did have Mythtv playing live tv just fine until the past day on my Gentoo box.  I'm now getting jerky video.  Until I track it down, doing "echo 1 > /sys/class/pvrusb2/sn-7435104/ctl_interlace/cur_val".  (And if you have yet to figure out, using libmpeg2 for playback can significantly reduce cpu usage.)

(2005.08.08) Noticed Mythtv requires quite a bit of cpu.  However, if you're noticing Mythtv use >99% on a ~1Ghz pentium3 cpu, you might want to try recompiling sys-libs/glibc (and ensuring you have included some cflag optimizations such as "-march=pentium3 -O3 -pipe -fomit-frame-pointer".  This seems to be the second report of compiling glibc w/o any optimizations caused Mythtv to use more cpu then one would expect.  Another idea, echo 1 > /sys/class/pvrusb2/sn-7435104/ctl_interlace/cur_val.  (These are some ideas if you have already tried every other config setting within Mythtv's menus.)

(2006.10.04)  I have updated this page and deleted allot of out-dated literature.  I've made several references to Mike Isely's web page being the primary means for documentation.  The only things I'm concerned with documenting are firmware extractions and pointers.

(2007.02.14)  I have yet to troubleshoot, but I think lirc might be failing with pvr-firmware.  When /etc/init.d/lircd is started, it should create a /dev/lirc/0.  I'm only getting this when rebooting after loading the Windows XP firmwares or possibly my older firmwares listed below?  Please let me know if you can verify this.