View Full Version : Problem :: VIA XvMC / MythTV 0.21 / Upgrade to Ubuntu 8.04
little_sam
May 7th, 2008, 06:52 PM
I have recently done a dist upgrade to Ubuntu 8.04 and since this I have been having problems with MythTV.
Previously I had no problems using the internal myth viewer to play back using the VIA XvMC extension, but it appears that this no longer works, and hence myth is reverting to a different decode method, which my CPU can't cope with. (get prebuffering pauses and audio buffer underruns).
I have tried /etc/X11/XvMCConfig being:
/usr/lib/libXvMC.so.1
/usr/lib/libviaXvMC.so.1
libXvMC.so.1
with no luck on any of them.
System Details:
EPIA SP13000 with VIA CN400 decoder chip
Myth Version: 0.21.0+fixes17145-0ubuntu0+mythbuntu2
MythFrontend Log:
2008-05-07 23:21:23.059 TV: Attempting to change from None to WatchingPreRecorded
2008-05-07 23:21:23.192 DPMS Deactivated
ViaXvMC: Could not allocate timestamp blit area.
2008-05-07 23:21:25.624 VideoOutputXv Error: Unable to create XvMC Context, status(11): BadAlloc
2008-05-07 23:21:25.627 VideoOutputXv Error: Could not open XvMC port...
You may wish to verify that your DISPLAY
environment variable does not use an external
network connection.
You may also wish to verify that
/etc/X11/XvMCConfig contains the correct
vendor's XvMC library.
2008-05-07 23:21:25.630 AFD: Opened codec 0x90dde90, id(MPEG2VIDEO) type(Video)
2008-05-07 23:21:25.632 AFD: codec MP3 has 2 channels
2008-05-07 23:21:25.634 AFD: Opened codec 0x90de210, id(MP3) type(Audio)
2008-05-07 23:21:25.635 AFD: codec MP3 has 1 channels
2008-05-07 23:21:25.637 AFD: Opened codec 0x90de590, id(MP3) type(Audio)
2008-05-07 23:21:25.637 AFD: Opened codec 0x90de910, id(DVB_SUBTITLE) type(Subtitle)
2008-05-07 23:21:25.712 Opening audio device 'default'. ch 2(2) sr 48000
2008-05-07 23:21:25.716 Opening ALSA audio device 'default'.
2008-05-07 23:21:26.866 VideoOutputXv: Desired video renderer 'xvmc-blit' not available.
codec 'MPEG2' makes 'xv-blit,xshm,opengl,xlib,' available, using 'xv-blit' instead.
2008-05-07 23:21:26.894 VideoOutputXv: XVideo Adaptor Name: 'XV_SWOV'
2008-05-07 23:21:27.392 OSD Theme Dimensions W: 640 H: 480
2008-05-07 23:21:31.567 TV: Changing from None to WatchingPreRecorded
2008-05-07 23:21:31.599 Realtime priority would require SUID as root.
2008-05-07 23:21:31.616 FilterManager: failed to load filter 'none', no such filter exists
2008-05-07 23:21:31.617 Couldn't load deinterlace filter none
2008-05-07 23:21:31.980 Video timing method: DRM
2008-05-07 23:21:34.834 NVP: prebuffering pause
2008-05-07 23:21:40.548 NVP: prebuffering pause
2008-05-07 23:21:42.064 NVP: prebuffering pause
Xorg.0.log:
(II) VIA(0): [Xv] Using PCI DMA for Xv image transfer.
(II) VIA(0): Benchmarking video copy. Less is better.
(--) VIA(0): Timed libc YUV420 copy... 2905414. Throughput: 108.9 MiB/s.
(--) VIA(0): Timed kernel YUV420 copy... 2868473. Throughput: 110.3 MiB/s.
(--) VIA(0): Timed SSE YUV420 copy... 1859647. Throughput: 170.2 MiB/s.
(--) VIA(0): Timed MMX YUV420 copy... 3166870. Throughput: 99.9 MiB/s.
(--) VIA(0): Ditch 3DNow! YUV420 copy... Not supported by CPU.
(--) VIA(0): Timed MMX2 YUV420 copy... 2224402. Throughput: 142.3 MiB/s.
(--) VIA(0): Using SSE YUV42X copy for video.
(II) VIA(0): [XvMC] Registering viaXvMCPro.
(II) VIA(0): [XvMC] Initialized XvMC extension.
(WW) VIA(0): Option "XvmcUsesTextures" is not used
(WW) VIA(0): Option "NvAGP" is not used
Any help would be greatly appreciated - I'm not really sure where to go from here.
cheers
sam
dantheperson
May 14th, 2008, 05:40 PM
I've got exactly the same problem on a SP8000.
one thing i've tried is switching from the via driver to the openchrome driver
Driver "openchrome"
and
libchromeXvMCPro.so.1
same result
dantheperson
May 14th, 2008, 07:43 PM
Well,
I've got it working using openchrome. I'm not sure it was the driver change that fixed it though, as i still get the same error as you after a restart with openchrome.
What i have to do is view a movie using xine -V xxmc, then quit xine, then myth will work again.
2008-05-15 00:39:28.036 VideoOutputXv: XvMC Adaptor Name: 'XV_SWOV'
Unable to create XvMC Surface.
Althought it says unable to create surface, the "ViaXvMC: Could not allocate timestamp blit area." error is gone and it doesn't fall back to a different renderer, and from the CPU usage i can tell it is working.
dantheperson
May 15th, 2008, 06:11 PM
Well, anothers day usage has shown XvMC to be totally unreliable. Sometime it works sometimes it doesn't.
Further more getting kernel crashes like May 15 00:40:01 rebirth kernel: [ 819.439293] ------------[ cut here ]------------
May 15 00:40:01 rebirth kernel: [ 819.439320] kernel BUG at /build/buildd/linux-2.6.24/mm/vmalloc.c:349!
May 15 00:40:01 rebirth kernel: [ 819.439332] invalid opcode: 0000 [#1] SMP
May 15 00:40:01 rebirth kernel: [ 819.439343] Modules linked in: via drm rfcomm l2cap bluetooth apm ppdev cpufreq_conservative cpufreq_stats cpufreq_ondemand freq_table cpufreq_userspace cpufreq_powersave iptable_filter ip_tables x_tables jfs nls_iso8859_1 nls_cp437 vfat fat aes_i586 ipv6 dm_crypt dm_mod sbp2 lp snd_via82xx gameport snd_ac97_codec ac97_bus snd_pcm_oss snd_mixer_oss snd_pcm snd_page_alloc snd_mpu401_uart snd_seq_dummy evdev snd_seq_oss dvb_pll parport_pc parport snd_seq_midi snd_rawmidi mt352 usbhid snd_seq_midi_event hid snd_seq cx88_dvb cx88_vp3054_i2c videobuf_dvb dvb_core af_packet snd_timer snd_seq_device snd cx8802 cx8800 pcspkr cx88xx ir_common i2c_algo_bit tveeprom videodev v4l1_compat compat_ioctl32 v4l2_common soundcore videobuf_dma_sg videobuf_core btcx_risc i2c_viapro i2c_core shpchp pci_hotplug via_agp agpgart usb_storage ext3 jbd mbcache libusual sr_mod sg cdrom sd_mod ata_generic pata_via sata_via pata_acpi via_rhine mii ehci_hcd uhci_hcd libata ohci1394 scsi_mod usbcore ieee1394
May 15 00:40:01 rebirth kernel: bcon tileblit font bitblit softcursor fuse
May 15 00:40:01 rebirth kernel: [ 819.439599]
May 15 00:40:01 rebirth kernel: [ 819.439611] Pid: 6955, comm: mythbackend Not tainted (2.6.24-16-generic #1)
May 15 00:40:01 rebirth kernel: [ 819.439625] EIP: 0060:[__vunmap+0xc7/0xf0] EFLAGS: 00010246 CPU: 0
May 15 00:40:01 rebirth kernel: [ 819.439663] EIP is at __vunmap+0xc7/0xf0
May 15 00:40:01 rebirth kernel: [ 819.439672] EAX: 00000000 EBX: 00000000 ECX: 00000002 EDX: 00000610
May 15 00:40:01 rebirth kernel: [ 819.439685] ESI: cdfa3b60 EDI: 00000001 EBP: daa2e458 ESP: cd8e5f2c
May 15 00:40:01 rebirth kernel: [ 819.439697] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
May 15 00:40:01 rebirth kernel: [ 819.439711] Process mythbackend (pid: 6955, ti=cd8e4000 task=daa245a0 task.ti=cd8e4000)
May 15 00:40:01 rebirth kernel: [ 819.439722] Stack: ddae7284 dda83ac7 ddbecb04 daa2e414 ddbecb04 daa2e414 de352000 dda81fa3
May 15 00:40:01 rebirth kernel: [ 819.439749] 00000000 db7ee140 ddbecb78 00000008 db7ee140 db2f1660 db8503d0 c018e2b7
May 15 00:40:01 rebirth kernel: [ 819.439774] 00000000 00000000 db2f1660 da05ef80 db8503d0 db7ee140 ce942480 00000000
May 15 00:40:01 rebirth kernel: [ 819.439798] Call Trace:
May 15 00:40:01 rebirth kernel: [ 819.439819] [<dda83ac7>] dvbdmx_release_ts_feed+0x77/0xa0 [dvb_core]
May 15 00:40:01 rebirth kernel: [ 819.439954] [<dda81fa3>] dvb_demux_release+0x93/0x160 [dvb_core]
May 15 00:40:01 rebirth kernel: [ 819.440041] [__fput+0xa7/0x190] __fput+0xa7/0x190
May 15 00:40:01 rebirth kernel: [ 819.440114] [filp_close+0x49/0x80] filp_close+0x49/0x80
May 15 00:40:01 rebirth kernel: [ 819.440171] [sys_close+0x6e/0xd0] sys_close+0x6e/0xd0
May 15 00:40:01 rebirth kernel: [ 819.440205] [sysenter_past_esp+0x6b/0xa9] sysenter_past_esp+0x6b/0xa9
May 15 00:40:01 rebirth kernel: [ 819.440328] =======================
May 15 00:40:01 rebirth kernel: [ 819.440334] Code: c8 3a c0 c7 04 24 ed da 39 c0 e8 95 d7 fa ff 83 c4 10 5b 5e 5f e9 1a 71 f8 ff 8b 46 10 e8 a2 99 00 00 eb aa 83 c4 10 5b 5e 5f c3 <0f> 0b eb fe 89 5c 24 04 c7 04 24 88 c9 3a c0 e8 65 d7 fa ff c7
May 15 00:40:01 rebirth kernel: [ 819.440437] EIP: [__vunmap+0xc7/0xf0] __vunmap+0xc7/0xf0 SS:ESP 0068:cd8e5f2c
May 15 00:40:01 rebirth kernel: [ 819.440474] ---[ end trace d027e00f039d5019 ]---
Usually either mythfrontend or mythbackend are the process that experience the failure. The processes are then unkillable and a reboot is required.
So i went back to the 2.6.20-16-generic kernel that is still on the system from before i upgraded from feisty to hardy. Still running hardy and myth 0.21 from hardy, but with the feisty kernel.
Now it works 100%, even better than i remember, 7% CPU usage playing back on this 800Mhz ancient CPU. Excellent.
robho
May 18th, 2008, 06:38 PM
dantheperson,
what driver works for you? Do both via and openchrome work? Do you need /etc/X11/XvMCConfig to get xvmc going?
I'm using the same hardware as little_sam (SP13000, CN400) and can't quite get XVMC to work.
I had xvmc working nicely in another linux distribution, but when I tried mythbuntu it stopped working. I tried using my old configuration with mythbuntu, but it didn't change anything.
dantheperson
May 22nd, 2008, 10:08 AM
Both via and openchrome worked unreliably under the 8.04 kernel.
After going back to the feisty kernel it has worked 100% with openchrome. I haven't tried via since downgrading the kernel.
Mine is the SP8000, no fan, less mhz, otherwise identical
Changing XvMCConfig didn't seem to have any effect, but i haven't exhaustively proven that. After a couple of weeks of no TV, once it started working, i've left it untouched.
The xvmc library name is different between via and openchrome packages, something like libviaXvMCPro.so.1 vs libchromeXvMcPro.so.1
robho
June 21st, 2008, 04:32 AM
Thanks! I got xvmc going with an older kernel too. I'll see if I can narrow this problem down and file a bug somewhere.
xvmc seems to work both in mythtv and xine with the old kernel so I believe the problem is not with mythtv, but probably with the kernel or something interfacing with the kernel.
little_sam
June 21st, 2008, 05:29 AM
I have also managed to get xvmc working in 2 earlier kernels, but not 2.6.24-16. My problem is that this breaks something else :(
Good luck with the bug finding - if I can do anything let me know
robho
July 10th, 2008, 06:14 PM
Just a little update..
It seems like the commit c153f45f9b7e30289157bba3ff5682291df16caa to the Linux kernel introduces XVMC problems. This is between 2.6.23 and 2.6.24 so all 2.6.23 kernels are OK, but nothing newer.
I still haven't figured out if this is an xorg driver problem triggered by the kernel change or if it's the kernel change that's bad.
I will try to figure that out, but it might take some time.
If someone has some insight into XvMC, the openchrome/via driver and the kernel DRI interface I'd appreciate any input/comments.
theophile
July 11th, 2008, 02:40 PM
Does anyone know if this kernel patch affects nVidia XvMC or only VIA?
andyfromtucson
November 5th, 2008, 08:21 AM
I just recently upgraded a Via Epia SP8000e to Mythbuntu 8.04 and I also cannot get XvMC to work. I think I have configured everything right in Playback Profiles to use XvMC (I created a new profile with just one entry and specified using VIA XvMC as the decoder), and it appears the Mythbuntu 8.04 automatically used the Openchrome driver, but still CPU usage is 70-90% when I watch a recorded program when it should be around 20%.
Has anyone found a solution besides using a kernel earlier than 2.6.24? I have no idea about how to go about switching to an earlier kernel, and I am afraid 8.04 will break if I go back to an earlier kernel.
I did a lot of googling on this issue and the only other place I could find where it was discussed in depth is here:
http://bugs.gentoo.org/show_bug.cgi?id=228473
But there is no apparent resolution posted there.
I also tried upgrading to Mythbuntu 8.10 but in one quick test after rebooting XvMC still doesn't appear to be working.
robho
November 9th, 2008, 02:23 PM
I can get xvmc working with recent kernels if I switch from SLUB memory allocator to SLAB. This requires a recompile of the kernel since all kernels (except for the rt-kernel (but it crashes for me)) are using SLUB.
I'd still like to get this sorted out though, but I don't really know where to turn. This is clearly not a ubuntu-only bug since it has been seen in gentoo and slackware too. So filing a bug with the ubuntu guys don't seem quite right.
Right now the gentoo bug mentioned above is probably the best place to discuss the problem. If people with this xvmc problem would submit their configuration and findings to that bug it would probably help to get this issue resolved and give it some attention.
andyfromtucson
November 10th, 2008, 09:17 AM
I finally gave up on trying to get VIA XvMC to work with Mythbuntu 8.04 and 8.10 and found the ISO for Mythbuntu 7.10 and installed it.
VIA XvMC works with Mythbuntu 7.10 for me, but be careful to deselect the backports repository before you do any package updates. The backports repository is enabled by default in Mythbuntu 7.10 and it contains the Gutsy backport of MythTV 0.21 which breaks XvMC.
I filed a comment on the Gentoo bug report as suggested by Robho.
andyfromtucson
November 28th, 2008, 01:50 PM
There is now a patch available to the Openchrome driver that fixes this problem:
http://bugs.gentoo.org/show_bug.cgi?id=228473
Its the one called ioctlfix.patch. Robho was kind enough to send me instructions on how to apply the patch to Mythbuntu 8.10. I first downloaded the patch file from the bug report to my home directory, and then ran the following commands all in my home directory, and then rebooted.
sudo apt-get build-dep xserver-xorg-video-openchrome
sudo apt-get install build-essential
wget http://archive.ubuntu.com/ubuntu/pool/main/x/xserver-xorg-video-openchrome/xserver-xorg-video-openchrome_0.2.903.orig.tar.gz
wget http://archive.ubuntu.com/ubuntu/pool/main/x/xserver-xorg-video-openchrome/xserver-xorg-video-openchrome_0.2.903-0ubuntu3.diff.gz
tar xf xserver-xorg-video-openchrome_0.2.903.orig.tar.gz
zcat xserver-xorg-video-openchrome_0.2.903-0ubuntu3.diff.gz | patch -p0
patch -p0 < ioctlfix.patch
cd xf86-video-openchrome-0.2.903
./configure --prefix=/usr
make
sudo make install
After applying this patch and rebooting I was able to successfully play a recording using XvMC on Mythbuntu 8.10 on my Via Epia SP8000e.
vBulletin® v3.7.4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.