I have for a couple of weeks had a fight getting xvmc n my via s8000e working again. Today I found the cause to be the kernel version newer than tuxonice-sources-2.6.25-r4 I have tried my old r3 version which works. My r4 and r5 doesn't work. I can see at r4 there was an update to genpatches. When using one of the failing versions I get this error when trying using via xvmc with mythtv: ViaXvMC: Could not allocate timestamp blit area. 2008-06-20 11:25:39.231 VideoOutputXv Error: Unable to create XvMC Context, status(11): BadAlloc 2008-06-20 11:25:39.233 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. The exact same configuration works on earlier versions of the kernel(and I am also using the same kernel configuration file) Reproducible: Always Steps to Reproduce: 1.Boot affected kernel 2.start mythtv and tail mythtv logs 3.Watch tv. See the log Actual Results: ViaXvMC: Could not allocate timestamp blit area. 2008-06-20 11:25:39.231 VideoOutputXv Error: Unable to create XvMC Context, status(11): BadAlloc 2008-06-20 11:25:39.233 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. Expected Results: Not these errors: ViaXvMC: Could not allocate timestamp blit area. 2008-06-20 11:25:39.231 VideoOutputXv Error: Unable to create XvMC Context, status(11): BadAlloc
Does this also happen on gentoo-sources and/or vanilla-sources?
Ok. I will try compiling from gentoo and vanilla and report back
gentoo-sources-2.6.25-r4 & r5 works fine and doesn't break xvmc At the moment I am compiling the newest available vanilla-source (version scheme seems to be different from gentoo and tuxonice sources) Any vanilla version you would prefer. Is there one matching tuxonice without the various patches?
(In reply to comment #3) > gentoo-sources-2.6.25-r4 & r5 works fine and doesn't break xvmc > > At the moment I am compiling the newest available vanilla-source (version > scheme seems to be different from gentoo and tuxonice sources) > > Any vanilla version you would prefer. Is there one matching tuxonice without > the various patches? My main point is to determine if this is >any-sources-2.6.24-r4 related or specific to TuxOnIce, if this is TuxOnIce (the one single patch besides gentoo-patches) fault - then please report this upstream also.
( pressed Enter too soon ) As every version you mentioned uses same version of TuxOnIce it seems to be related to either gentoo-patches or changes in stable kernel (2.6.24.x).
I don't know if you missed the first line in my last post :-) with gentoo-sources-2.6.25-r4 & r5 via xvmc works fine. The problem seems to be tuxonice related, but to be sure I will try the newest vanilla-sources available
(In reply to comment #6) > I don't know if you missed the first line in my last post :-) > > with gentoo-sources-2.6.25-r4 & r5 via xvmc works fine. The problem seems to be > tuxonice related No, I have not missed it - see my comment #5 - it's the same TuxOnIce version.
Ok. vanilla-sources 2.5.25.5 also has the bug
(In reply to comment #8) > Ok. vanilla-sources 2.5.25.5 also has the bug >
Ok. I did a lot of testing. I must have made a mistake in some of the versions I have reported working in earlier comments. So here is a summary of tests I have done today: gentoo-sources-2.6.25-r3 working gentoo-sources-2.6.25-r5 NOT working gentoo-sources 2.6.25-r4 NOT working vanilla-sources-2.6.25.5 NOT working vanilla-sources-2.6.26-rc6 NOT working vanilla-sources-2.6.25.3 NOT working vanilla-sources-2.6.25 NOT working vanilla-sources-2.6.25.1 NOT working tuxonice-sources-2.6.25-r5 NOT working tuxonice-sources-2.6.25-r4 NOT working tuxonice-sources-2.6.25-r3 working I know it may seem strange that I cannot get any of the vanilla-sources working, but then again I don't know which vanilla version tuxonice/gentoo sources 2.6.25-r3 is based on
Ok. Found out what is causing this bug. It seems to either be using the SLUB memory allocator or CONFIG_RESOURCES_64BIT set in kernel config..I will just compile one last kernel then I can tell.
Ok. Did some last test. I can get the bug to show consitently when using a kernel where I use the SLUB memory allocator instead of SLAB.
Do you see anything interesting in dmesg after the error occurs? Which video driver are you using?
Ohh.I have just revisited this bug(got a private mail regarding it). I see that my last answer isn't in the report. I don't see anything in dmesg when this happens
And I am using the via openchrome driver. I have also tried the xorg driver and unichrome driver. All behave the same
I'm not running Gentoo, but I've seen this same problem in both Slackware 12.0 and Ubuntu 8.04 so I believe this problem to be distribution independent. Before I found this bug report I did some testing on my own to try to find the problem. Here's what I did. When I was running Slackware 12.0 I would see this problem whenever trying to upgrade my kernel to 2.6.24.x or 2.6.25-rcX. I didn't spend any time looking into the problem back then. When I installed Ubuntu 8.04 the problem showed itself again. I found an old 2.6.20 kernel where the problem didn't show. I then used git bisect and got to this: c153f45f9b7e30289157bba3ff5682291df16caa is first bad commit commit c153f45f9b7e30289157bba3ff5682291df16caa Author: Eric Anholt <eric@anholt.net> Date: Mon Sep 3 12:06:45 2007 +1000 drm: Replace DRM_IOCTL_ARGS with (dev, data, file_priv) and remove DRM_DEVICE. The data is now in kernel space, copied in/out as appropriate according to t This results in DRM_COPY_{TO,FROM}_USER going away, and error paths to deal with those failures. This also means that XFree86 4.2.0 support for i810 DR is lost. Signed-off-by: Dave Airlie <airlied@linux.ie> I e-mailed Dave Airlie and Eric Anholt and asked about this. Dave responded with: > If you look for the userspace code is possibly using drmCommandNone when > it should be using drmCommandWriteRead or something like that.. > > Dave. I've grepped through mythtv and openchrome driver/XvMC libraries, but have not found any explicit calls to drmCommandNone. Yesterday I found this bug report and read that Hasse could get around the problem by switching from SLUB to SLAB so I checked the kernel configuration I'd used in my tests. I had been using SLUB since it was introduced. I also recompiled some failing kernels with SLAB instead of SLUB and indeed, the problem disappeared. I cannot reproduce the problem when using SLAB. However, SLUB seems to work well for me in kernels before the c153f45f9b7e3028.. commit. So, to me it looks like the c153f4.. commit breaks XvMC if using SLUB. In my most recent tests I've been using an up-to-date Ubuntu 8.04 with MythTV 0.21, openchrome Xorg driver from SVN (revision 584) and vanilla Linux kernels of various versions. Let me know if any more information is wanted. The only error I find in logs which seems relevant to this is, as Hasse already has posted: ViaXvMC: Could not allocate timestamp blit area. 2008-07-29 19:30:11.098 VideoOutputXv Error: Unable to create XvMC Context, status(11): BadAlloc
I have demonstrated this bug in both Mythbuntu 8.04 and 8.10 on a Via Epia SP8000e, which uses the Via C3 Eden (fanless) processor: It is impossible to get XvMC working with MythTV on these distributions, and the symptoms are as described in this bug report.
Created attachment 173349 [details, diff] debug patch Please apply this patch to x11-drivers/xf86-video-openchrome (I assume that's what you are using). It should cause more messages to be printed above: ViaXvMC: Could not allocate timestamp blit area. It will help us diagnose why the allocation is failing.
Created attachment 173392 [details, diff] Modified patch I applied the patch from comment 18, but had to change some more because I'm using a Unichrome Pro (CN400). I'm attaching my modified debug patch. With my patch I see this: updateLowLevelBuf failure: ret=-12, size=423940, mem->size=423940 updateLowLevelBuf failed with code -1 ViaXvMC: Could not allocate timestamp blit area. This is with Ubuntu 8.10, Ubuntu kernel 2.6.27-7-generic and openchrome from SVN (revision 686).
Created attachment 173424 [details, diff] kernel debug patch OK, digging further, please apply this patch to the kernel (version 2.6.27 if possible) and examine the dmesg output after reproducing this error
Output from drmdebug.patch: [ 196.063397] sman_alloc tmp failed [ 196.063450] Video memory allocation failed, type=0 size=222599230 openchrome outputs the same information as in comment 19. This is with ubuntu's 2.6.27 kernel.
Created attachment 173540 [details, diff] xf86-video-openchrome fix Ah! Think I found the bug. Please apply this patch to xf86-video-openchrome and see if things are any better.
That patch seems to fix the problem and make XvMC work again. Thanks for looking into this Daniel! (I'm now sometimes seeing mythtv freezing when starting video, but that's probably a different problem because I don't see any memory allocation errors.)
Thanks for testing. Over to the X11 maintainers then. I submitted the patch upstream here: http://wiki.openchrome.org/pipermail/openchrome-devel/2008-November/000140.html
I also confirm that the ioctlfix.patch works with Mythbuntu 8.10 on a Via Epia SP8000e.
The patch was accepted upstream: http://www.openchrome.org/trac/changeset/694
I think upstream should be pinged to make proper releases, it's been a long time since their last one. In any case, feel free to make the modifications/patches, no-one in the X team has via/openchrome hardware. Thanks
Does x11-drivers/xf86-video-openchrome-0.2.904 include all the fixes? It's up for stabilisation soon (bug #292702).
yep
This bug is fixed. New version including all these fixes is in stable...