guide slow and unresponsive

Bug #229949 reported by Zach
10
Affects Status Importance Assigned to Milestone
MythTV
Fix Released
Unknown
Mythbuntu
Fix Released
Low
Unassigned
mythtv (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

After upgrading from Mythbuntu 7.10 to 8.04, the on-screen guide has become slow and unresponsive. It registers the first 2 or 3 button presses immediately, but thereafter takes 20-30 sec to register button presses. This includes entering the channel number, scrolling up and down through the guide, or selecting a channel to watch.

Entering the channel directly from live tv (not in the guide) works fine.

I've tried setting the guide to one of the less cpu-intensive modes, but that hasn't helped. The system is an Athlon 64 X2 3600+ (1.9Ghz), 1GB RAM. It is a combined backend/frontend running 32-bit Mythbuntu 8.04.

Related branches

Revision history for this message
djbmister (db260179) wrote :

Have you tried applying the latest fixes?

http://www.mythbuntu.org/auto-builds

Solved some of my issues.

Send you your dmesg, mythbackend.log and mythfronted.log here

Revision history for this message
Zach (uid000) wrote :

weekly fixes hasn't solved this issue.

However, as a workaround, I did discover that enabling OpenGL rendering under Appearance settings seems to alleviate the problem. Before, X was taking up a lot of CPU when rendering the guide during LiveTV. Now it's only around 4%.

Revision history for this message
nemus (lance-buttars) wrote :
Download full text (8.1 KiB)

I am also having the same problem.

I tried both the mythfrontend -v all command and the opengl in appearances.

The OpenGL did not help at all.

Running mythfrontned -v all works, but only if your run it from a terminal shell.

I tried to create a launcher for mythfrontend using the mythfrontend -v all command, but the guide returned to its unusable slow state where it takes forever for it to respond to the keyboard.

here are my logs and dmesg...

dmesg

[ 51.472159] cx88[0]/2: subsystem: 7063:5500, board: pcHDTV HD5500 HDTV [card=47]
[ 51.472162] cx88[0]/2: cx2388x based DVB/ATSC card
[ 51.769441] loop: module loaded
[ 51.812806] lp0: using parport0 (interrupt-driven).
[ 51.861919] DVB: registering new adapter (cx88[0])
[ 51.867021] DVB: registering frontend 0 (LG Electronics LGDT3303 VSB/QAM Frontend)...
[ 51.946745] Adding 6072528k swap on /dev/sda5. Priority:-1 extents:1 across:6072528k
[ 52.336027] EXT3 FS on sda1, internal journal
[ 52.622830] kjournald starting. Commit interval 5 seconds
[ 52.627194] EXT3 FS on sdb1, internal journal
[ 52.627201] EXT3-fs: mounted filesystem with ordered data mode.
[ 53.175917] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 54.625135] RPC: Registered udp transport module.
[ 54.625140] RPC: Registered tcp transport module.
[ 55.354612] No dock devices found.
[ 58.926213] apm: BIOS version 1.2 Flags 0x03 (Driver version 1.16ac)
[ 58.926219] apm: disabled - APM is not SMP safe.
[ 59.100083] ppdev: user-space parallel port driver
[ 59.535108] audit(1211938498.974:2): type=1503 operation="inode_permission" requested_mask="a::" denied_mask="a::" name="/dev/tty" pid=5890 profile="/usr/sbin/cupsd" namespace="default"
[ 60.514793] eth0: no IPv6 routers present
[ 61.174615] Installing knfsd (copyright (C) 1996 <email address hidden>).
[ 61.289606] NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
[ 61.300717] NFSD: starting 90-second grace period
[ 63.795962] ivtv0: Loaded v4l-cx2341x-enc.fw firmware (376836 bytes)
[ 63.992231] ivtv0: Encoder revision: 0x02060039
[ 67.418694] Bluetooth: Core ver 2.11
[ 67.419461] NET: Registered protocol family 31
[ 67.419465] Bluetooth: HCI device and connection manager initialized
[ 67.419470] Bluetooth: HCI socket layer initialized
[ 67.509755] Bluetooth: L2CAP ver 2.9
[ 67.509761] Bluetooth: L2CAP socket layer initialized
[ 67.564914] Bluetooth: RFCOMM socket layer initialized
[ 67.564929] Bluetooth: RFCOMM TTY layer initialized
[ 67.564932] Bluetooth: RFCOMM ver 1.8
[ 1114.060034] mythfrontend.re[7393]: segfault at 00000000 eip 0830a8f8 esp a6b73fec error 6

mythfrontend.log had no inforrmation.

bdvdread: Using libdvdcss version 1.2.9 for DVD access

libdvdread: Attempting to retrieve all CSS keys
libdvdread: This can take a _long_ time, please be patient

libdvdread: Get key for /VIDEO_TS/VIDEO_TS.VOB at 0x00000137
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_01_0.VOB at 0x000014db
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_01_1.VOB at 0x00001765
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_02_0.VOB at 0x0038bf81
libd...

Read more...

Revision history for this message
Zach (uid000) wrote :

I was mistaken above--OpenGL didn't address the problem. As it turns out, turning on Compositing in the Window Manager Tweaks control panel did the trick. So I'm guessing this is offloading whatever work is being done to draw the guide to the video card, but not actually addressing the problem wherein it is taking too much work to actually draw the guide (and also render the live tv video ).

Revision history for this message
nemus (lance-buttars) wrote :

I still haven't found a solution to this problem!!!!!!!!

what I have tried :

Failed: mythfrontend -v all (fixes guide issue but makes mythtv live video play back choppy.)

Failed: Lower CPU requirements of Program to Low CPU

Failed: Optimizing the mysql server to allow for more connections and use more ram to store sql requests.

Failed: using mythbuntu weekly build updates. (still no sloutions to guide problem).

http://www.gossamer-threads.com/lists/mythtv/users/26202
https://bugs.launchpad.net/mythbuntu/+bug/229949

I am currently thinking about going back to mythtv .20

Revision history for this message
nemus (lance-buttars) wrote :

is there any news of this happening on other myth .21 distros?

also is there any plans to fix this problem?

Revision history for this message
Zach (uid000) wrote :

The problem has to do with how much cpu resources it takes to render the guide. If you look at top while in the guide you'll see that X is near 100%. I believe it has something to do with the live video window being displayed in the upper righthand corner.

Anyway, if desktop effects is an option for you (i.e., if you have video card that supports it), then turning on compositing in xfce mitigates the problem, making the guide more usable.

Note this isn't an actual solution, as whatever is causing all the overhead is still causing it. The extra work is just being pushed to the graphics card instead.

Revision history for this message
nemus (lance-buttars) wrote :

I do see that Xorg is at 97 percent.

How do you enable the compositing?

and is are other people having this problem?

I did an install of xfce then apt-get installed mythbuntu-control-centre then installed mythtv.

if you do a clean install of the CD do you have the same problem?

Revision history for this message
Nick Fox (nickj-fox) wrote : Re: [Bug 229949] Re: guide slow and unresponsive

I was having this issue as well until I switched my playback profile from
CPU+ to slim and have been problem free since.

-Nick

On Wed, Jul 2, 2008 at 7:45 PM, nemus <email address hidden> wrote:

> I do see that Xorg is at 97 percent.
>
> How do you enable the compositing?
>
> and is are other people having this problem?
>
> I did an install of xfce then apt-get installed mythbuntu-control-centre
> then installed mythtv.
>
> if you do a clean install of the CD do you have the same problem?
>
> --
> guide slow and unresponsive
> https://bugs.launchpad.net/bugs/229949
> You received this bug notification because you are a member of
> Mythbuntu, which is subscribed to Mythbuntu.
>

Revision history for this message
Cory Maccarrone (darkstar6262) wrote :

Do any of you have the bob deinterlacer enabled? If so, do you still see the problem when you disable it? I was getting similar effects with that deinterlacer, but any other one (and no deinterlacer) makes the guide responsive again. I'm on the latest mythtv in hardy.

- Cory

Revision history for this message
Nick Fox (nickj-fox) wrote :

That was my exact issue prior to changing it. what are your hardware specs?

-Nick

On 7/5/08, Cory Maccarrone <email address hidden> wrote:
> Do any of you have the bob deinterlacer enabled? If so, do you still
> see the problem when you disable it? I was getting similar effects with
> that deinterlacer, but any other one (and no deinterlacer) makes the
> guide responsive again. I'm on the latest mythtv in hardy.
>
> - Cory
>
> --
> guide slow and unresponsive
> https://bugs.launchpad.net/bugs/229949
> You received this bug notification because you are a member of
> Mythbuntu, which is subscribed to Mythbuntu.
>

Revision history for this message
Cory Maccarrone (darkstar6262) wrote :

Intel Celeron D 3.0gHz on a PC Chips P23G board w/ 1gb RAM
GeForce 6200 AGP driving a DVI-to-HDMI output at 1920x1080@60Hz
BTTV 848 video capture card

I've got my video settings doing Standard XV (although XvMC and libmpeg2 don't make any difference), using OpenGL for vertical sync, non-realtime enabled. Frontend/backend are on the same machine, doing software MPEG4 encoding with uncompressed audio.

- Cory

Revision history for this message
Nick Fox (nickj-fox) wrote :

Yea, usig BOB is just overdriving your CPU (deinterlace is CPU intensive
anyhow). Its not an issue with BOB but more being an underpowered system,
Mine is very similar.

-Nick

On Sat, Jul 5, 2008 at 9:03 PM, Cory Maccarrone <email address hidden>
wrote:

> Intel Celeron D 3.0gHz on a PC Chips P23G board w/ 1gb RAM
> GeForce 6200 AGP driving a DVI-to-HDMI output at 1920x1080@60Hz
> BTTV 848 video capture card
>
> I've got my video settings doing Standard XV (although XvMC and libmpeg2
> don't make any difference), using OpenGL for vertical sync, non-realtime
> enabled. Frontend/backend are on the same machine, doing software MPEG4
> encoding with uncompressed audio.
>
> - Cory
>
> --
> guide slow and unresponsive
> https://bugs.launchpad.net/bugs/229949
> You received this bug notification because you are a member of
> Mythbuntu, which is subscribed to Mythbuntu.
>

Revision history for this message
Cory Maccarrone (darkstar6262) wrote :

That hadn't been my experience. Actually, with my configuration, I find bob deinterlacing to be less CPU intensive than any other deinterlace filter. Under normal TV, my CPU is at ~60% load, and in previous releases where this was working, the load wouldn't go up much when in the guide. Also, I don't have this issue with other deinterlacers that consume more CPU, so I believe it has more to do with recent changes that were introduced into the deinterlacer.

I didn't start seeing this problem until I upgraded my machine to hardy with 0.21.0. Previously I was using an SVN revision of the 0.20 line with Feisty and bob deinterlacing was working perfectly, even in the guide. Something in 0.21 broke it.

Anyone else have these experiences?

Revision history for this message
Zach (uid000) wrote :

I can confirm this is a regression from Mythbuntu 7.10. This definitely was not a problem for me until the upgrade. Now it is a problem on all systems.
All systems in use are fairly recent dual-core systems. I'm using whatever the default playback configuration is on Mythbuntu 8.04.

Revision history for this message
Nick Fox (nickj-fox) wrote :

Its not a regression, with all the additions to MythTV 0.21 it requires more
CPU. The guide is more CPU hungry than previously I agree that it became an
issue with slower hardware in 0.21, however, I would not call it a
regression, or bug. This is the natural progression of software such as
MythTV. Eventually your old hardware will no longer support the software at
its highest settings.

-Nick

On Sun, Jul 6, 2008 at 11:50 AM, Zach <email address hidden> wrote:

> I can confirm this is a regression from Mythbuntu 7.10. This definitely
> was not a problem for me until the upgrade. Now it is a problem on all
> systems.
> All systems in use are fairly recent dual-core systems. I'm using whatever
> the default playback configuration is on Mythbuntu 8.04.
>
> --
> guide slow and unresponsive
> https://bugs.launchpad.net/bugs/229949
> You received this bug notification because you are a member of
> Mythbuntu, which is subscribed to Mythbuntu.
>

Revision history for this message
Cory Maccarrone (darkstar6262) wrote :

I really don't believe the problem is CPU resources. Using top on my box, I see the CPU stay around 60-70% usage at all times -- it never spikes above that, even in the guide during the pauses. This was the case even in 0.20 for me -- 0.21 seems no more resource hungry than 0.21.

I believe there is a regression between MythTV 0.20 and 0.21 wherein the guide and the video player (more specifically the deinterlacer) are competing for CPU time, and the deinterlacer is winning big time. Or something, I haven't looked that far yet.

In any case, I've attached a patch to the latest mythtv sources that addresses this issue. It doesn't correct the problem -- merely works around it. Basically it disables all deinterlace filters when entering the guide, and re-enables it when leaving. For me, it makes the guide usable again with the bob deinterlacer with practically no loss in video quality (you might see artifacts in the preview window, but my experience seems to suggest that with it that small, most effects won't be noticeable). For reference, CPU usage for me with and without this patch stays around 60 to 70% -- the only difference is that without the patch, the guide is very slow to respond.

Can you all rebuild your libmythtv.so files from source using the patch and tell me if it works for you? Here's quick instructions for rebuilding your libraries (as root):

$ apt-get source mythfrontend
$ cd mythtv-0.21.0+fixes16838
$ patch -p0 < ../guide-deinterlace.patch
$ dpkg-buildpackage
...
$ dpkg -i ../libmyth-0.21-0_0.21.0+fixes16838-0ubuntu3_i386.deb

Restart mythbackend and mythfrontend and you should be good to go. I can provide pre-built .deb packages for those that need them (ia32 only, as I don't have a 64-bit machine to build for).

Revision history for this message
Zach (uid000) wrote :

The three machines I have running a frontend are:
Intel Pentium E2160 1.8ghz (essentially a Core 2 duo)
AMD Athlon 64 X2 3600+ 1.9ghz
AMD Athlon 64 X2 4000+ 2.1ghz

All three of these are fairly modern and capable CPUs. This is definitely more than the guide being "more cpu hungry" or an "issue with slower hardware."

As far as cpu utilization is concerned, perhaps its possible that Cory and I have slightly different circumstances. When I run top, X goes to 99% when I'm in the guide, so for me it definitely is an issue of CPU resources. I haven't had a chance to mess around with the deinterlacing to see if that's the culprit. I'll report back when I do.

I can also give cory's patch a try if it is deinterlacing is the problem.

Thomas Mashos (tgm4883)
Changed in mythbuntu:
importance: Undecided → Critical
status: New → Confirmed
importance: Critical → Low
Revision history for this message
nemus (lance-buttars) wrote :

Is there any news on if or when this issue will be addressed its very annoying to deal with, and I am not in the mood too much to compile mythtv from source.

Revision history for this message
Thomas Mashos (tgm4883) wrote :

Have you tried using a less intense guide?

Revision history for this message
Cory Maccarrone (darkstar6262) wrote :

I have tried many configurations of the guide -- less columns/rows, different shading methods, different themes. The result is the same universally -- with Bob deinterlacing enabled, the guide is almost unresponsive, but without it, it works beautifully.

I have been using the patch I posted above now for the past month, and when deinterlacing is disabled prior to running the guide (which is what the patch does), the guide becomes extremely responsive again, even more so than it used to before this was a problem in the first place.

My recommendation would be to fix the problem by doing just this, as it not only corrects the issue, it improves the overall responsiveness of the guide itself over and above how it was before the bob deinterlacer started causing problems. The problem with the filter should also be figured out (I haven't been able to make any headway in this), but at least disabling all deinterlacing while in the guide seems to work very well.

And again, nothing short of this has help the situation while using Bob. Only switching to other deinterlacers / turing deinterlacing off entirely has made any difference without the patch, and using something other than Bob isn't really an option for me, as it is the highest quality and lowest CPU impact of all deinterlacers on my machine.

Revision history for this message
Cory Maccarrone (darkstar6262) wrote :

I've just uploaded a .deb of libmyth with the patch I posted above. Just run dpkg -i on it and give it a whirl:

http://darkstar6262.googlepages.com/libmyth-0.21-0_0.21.0fixes16838-0ubu.deb

(The original name was libmyth-0.21-0_0.21.0+fixes16838-0ubuntu3_i386.deb, google truncated the filename.) This was built on an i686 running Ubuntu Hardy 8.04.1, latest.

Revision history for this message
Thomas Mashos (tgm4883) wrote :

We can try and add this patch to mythtv, although we would rather it come from upstream. Is there an upstream bug report regarding this issue?

Revision history for this message
Zach (uid000) wrote :

Hi,

I originally posted the bug to Mythbuntu because I though the project would coordinate with upstream (this is generally the case with bugs I submit for Ubuntu proper). Is this not the case? Would it be best if I submit future bugs to upstream?

There are a few other bugs I've submitted that have seen no activity. If desired, I can submit them upstream as well.

Thanks

Revision history for this message
Thomas Mashos (tgm4883) wrote :

Submitting here is fine, I was just wondering if there was already an upstream bug as if it's broke there too we'd like to fix it there as well.

Revision history for this message
Cory Maccarrone (darkstar6262) wrote :

It looks like there's a defect registered with mythtv covering this:

http://svn.mythtv.org/trac/ticket/3986

It hasn't seen much activity lately (the last post on there was from me). I started posting here as it was a much faster response.

Revision history for this message
laga (laga) wrote :

I've got a workaround in my tree (backported from fixes).

I'll upload a new build to my PPA soon which includes this fix. I'll keep you posted.

Revision history for this message
laga (laga) wrote :

I've just uploaded mythtv 0.21.0+fixes18259-0ubuntu0+mythbuntu1 to my PPA: https://launchpad.net/~laga/+archive

It'll take a while for these packages to build. Look at the package to see if it's successfully built.

Please let me know if that fixes your problem.

(And of course I meant to say that the workaround has been backported from trunk in my previous post. My bad)

Changed in mythtv:
status: Unknown → Fix Released
Revision history for this message
Mario Limonciello (superm1) wrote :

this is currently in the bzr tree as revno 128 and will get uploaded in the next mythtv upload once someone verifies those packages on laga's ppa work.

Changed in mythtv:
status: New → Fix Committed
Changed in mythbuntu:
status: Confirmed → Fix Committed
Revision history for this message
laga (laga) wrote :

For the record: someone in the forums verified it's working.

Revision history for this message
Zach (uid000) wrote :

is this in -fixes yet?

Revision history for this message
laga (laga) wrote :

It will be uploaded to intrepid tonight.

It's not in the upstream release-0-21-fixes branch yet, but I've posted my patch to the upstream ticket.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mythtv - 0.21.0+fixes18379-0ubuntu1

---------------
mythtv (0.21.0+fixes18379-0ubuntu1) intrepid; urgency=low

  * Sync against release-0-21-fixes branch:
    - Fix inconsistent text in theme xml file (LP: #242000)
  * Correct arguments for mythfrontend launching. (LP: #212604)
  * Backport fix for slow guide (LP: #229949)
  * debian/patches:
    - 26_h264_ffmpeg_merge.dpatch: drop patch as it's been committed upstream

 -- Michael Haas <email address hidden> Wed, 24 Sep 2008 00:57:01 +0200

Changed in mythtv:
status: Fix Committed → Fix Released
Changed in mythbuntu:
status: Fix Committed → Fix Released
Changed in mythtv:
status: Fix Released → New
Changed in mythtv:
status: New → Fix Released
Revision history for this message
Professor P (the-p) wrote :

I had the same problem, and muddil through it to get my system up and running.

Zach's original answer was in the right area. "OpenGL rendering under Appearance settings . . . "

I changed my setting to Qt and Qt style to Light 3rd revision, and now she just flies.

I hope this help. And people, thanks for all of the support.

Revision history for this message
Professor P (the-p) wrote :

Play with the setting for rendering. Oh yeah, don't forget to restart the front end each time.

Revision history for this message
Jack Deslippe (jdeslip) wrote :

I am having the same problem with my hauppauge hvr 1600 in mythbuntu 0.21 weekly-builds box (mythbuntu 8.10). The problem exists even after I change to Slim or set it to a new profile with absolutely no deinterlacer at all.

Any advice?

Revision history for this message
Nick Fox (nickj-fox) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.