[mythtvnz] Second USB DVB-T tuner causes high load

Dylan Hall dylan at deedums.com
Sun Oct 11 09:33:11 BST 2009


On Sat, 2009-10-10 at 15:41 +1300, Dylan Hall wrote:

> On Fri, 2009-10-09 at 12:53 +1300, Steven Ellis wrote: 
> 
> > On Thu, October 8, 2009 9:36 pm, Dylan Hall wrote:
> > > I have a very odd problem, I have purchased two of the ASUS usb tuners
> > > mentioned below in Stephen's post. I got the first, and was so impressed
> > > I decided to get a second. This is where the problem starts...
> > >
> > > When I connect the second tuner the load average on the machine jumps to
> > > 1 even when all the daemons etc have been shut down and the machine is
> > > as idle as it's possible to get a linux box.
> > >
> > > I have VirtualBox running on the machine hosting a copy of ubuntu 9.04
> > > server. With 1 tuner connected it's all good. Connect the second tuner
> > > and the ping times to this virtual machine jump from <1ms to 20-60ms
> > > (varying all over the place).
> > >
> > > Despite the problems above, the second tuner appears to work fine.
> > >
> > > The server is a Core 2 Duo E6600 2.4Ghz, 6GB Ram, running ubuntu 9.04
> > > server 32 bit, kernel version 2.6.28-15-server-52.
> > >
> > > I'm using the 32bit version of ubuntu because I'm testing SageTV for
> > > linux which only ships with 32bit binaries. I have PAE enabled to get
> > > access to the full 6GB of ram.
> > >
> > > I'm unsure how to progress from here.
> > >
> > > Any ideas anyone? seen something similar?
> > >
> > > Should I log a bug with the ununtu people or try and track down the devs
> > > for the DVB driver and log a bug with them?
> > >
> > 
> > First take a look at /proc/interrupts to see if there is a big jump over
> > time on any of the devices.
> > 
> > Next check what else is on the same USB controller, and keep an eye on
> > sharing USB 1.1 and USB 2 devices on the same controller.
> > 
> > I've used multiple USB DVB-T tuners on the same machine with no issue, but
> > they haven't been the same make/model.
> 
> 
> 
> First off, thanks everyone for your suggestions and thoughts.
> 
> Executive summary: I've modified the kernel module to not poll the
> non-existent IR receiver and this has sorted the issue.
> 
> The details (this will be fairly lengthy, but hopefully useful for
> anyone else with the same issue):
> 
> 2 x "ASUS My Cinema U3100 Mini DVBT Tuner".
> The two tuners are on different USB buses.
> There are no other processes doing anything significant in top.
> Using Munin to graph interrupt load the only change when adding the
> tuners is the regular IR receiver polling (10 or 20 interrupts per
> second).
> 
> Attached is a graph from Munin showing the load on the system, nothing
> like a nice picture to demonstrate the issue :)
> 
> The first thing was noticing that a single tuner also was causing
> issues, in summary:
> 
> 1 Tuner - Load jumps by around 0.5, intermittent high ping times to
> VirtualBox virtual machine.
> 2 Tuners - Load jumps by around 1.0, almost continuous high ping times
> to VirtualBox virtual machine.
> 
> dmesg when inserting tuner includes "dvb-usb: schedule remote query
> interval to 50 msecs.".  This bugs me as there isn't an IR receiver on
> this model of tuner.
> 
> Found the following instructions for building your own support for the
> tuners before there was native support in the kernel:
> 
> http://www.mythtv.org/wiki/Asus_My_Cinema_U3100_mini
> 
> Section 2.2 got me interested, it talks about disabling the IR
> polling.
> 
> The following are the steps I followed (from memory so may be some
> typos):
> 
> aptitude install linux-source
> cd /usr/src
> tar xjvf linux-source-2.6.28.tar.bz2
> cd linux-source-2.6.28
> 
> modify drivers/media/dvb/dvb-usb/dvb-usb-remote.c as per section 2.2
> above
> 
> cp /boot/config-2.6.28-15-server .config
> make oldconfig
> make
> 
> cp
> drivers/media/dvb/dvb-usb/dvb-usb.ko /lib/modules/2.6.28-15-server/kernel/drivers/media/dvb/dvb-usb/
> 
> 
> The last step above is a nasty hack, I should really build a whole
> kernel as a .deb and let the package management system handle it. I
> note that the replacement module is much larger than the old one, I
> wonder if it has debugging symbols or something like that turned on
> still.
> 
> Rebooted machine and all good now :)
> 
> My current theory is that the IR receiver polling is locking/blocking
> while it tries to poll non-existent hardware. This is causing the
> load-average measuring system to see a process waiting a whole bunch,
> hence the high load. I also think this is preventing VirtualBox from
> being able to pass interrupts from the host machine into the guest
> (network interrupts for example) in a timely fashion causing the poor
> ping times.
> 
> Next step is to try a newer kernel (2.6.31.3 I think) to see if the
> problem still exists. If it does then to track down the maintains for
> the dvb-usb code and raise a bug. The hack above isn't really ideal as
> it disables IR receivers on all USB tuners, not just those missing the
> hardware.
> 
> Lastly I'd like to know why this causes my system grief, but not
> others...
> 
> Dylan
> 
> 


Found a better way to fix this. If I'd read the code more closely I'd
have noticed there is a option you can pass the module to disable the IR
receiver.

Create /etc/modprobe.d/local.conf

# disable remote control polling for usb dvb sticks
options dvb-usb disable_rc_polling=1


Dylan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ourshack.com/pipermail/mythtvnz/attachments/20091011/5f0d2d55/attachment.htm 


More information about the mythtvnz mailing list