nouveau fails to support XV acceleration ION

Bug #525273 reported by David Nielsen
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Nouveau Xorg driver
Fix Released
Medium
linux-backports-modules-2.6.32 (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: xserver-xorg-video-nouveau

Using nouveau I get very choppy playback in fullscreen. This appears to be because XV acceleration is not available (though according to Fedora the driver is supposed to support this).

Test using gstreamer-properties and set to X Window System (X11/XShm/Xv) rather than autodetect then test, it will complain that it is unable to initialize XV output.

I used approximately this approach to test:
http://fedoraproject.org/wiki/QA:Testcase_nouveau_xvideo

ProblemType: Bug
Architecture: amd64
Date: Sun Feb 21 13:07:19 2010
DistroRelease: Ubuntu 10.04
DkmsStatus:

InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
MachineType: Acer Aspire R3610
Package: xserver-xorg-video-nouveau 1:0.0.15+git20100219+9b4118d-0ubuntu1
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-14-generic root=UUID=dacf8a63-86ca-4de3-9ebe-75a4c0693e36 ro quiet splash
ProcEnviron:
 LANG=da_DK.utf8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-14.20-generic
RelatedPackageVersions:
 xserver-xorg 1:7.5+1ubuntu6
 libgl1-mesa-glx 7.7-3ubuntu1
 libdrm2 2.4.18-1ubuntu2
 xserver-xorg-video-intel 2:2.9.1-1ubuntu5
SourcePackage: xserver-xorg-video-nouveau
Uname: Linux 2.6.32-14-generic x86_64
dmi.bios.date: 08/10/2009
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: P01-A2
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: FMCP7A-ION
dmi.board.vendor: Acer
dmi.chassis.type: 3
dmi.chassis.vendor: Acer
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrP01-A2:bd08/10/2009:svnAcer:pnAspireR3610:pvr:rvnAcer:rnFMCP7A-ION:rvr:cvnAcer:ct3:cvr:
dmi.product.name: Aspire R3610
dmi.sys.vendor: Acer
system:
 distro: Ubuntu
 architecture: x86_64kernel: 2.6.32-14-generic

Revision history for this message
In , Brian Tarricone (kelnos) wrote :

Created an attachment (id=32793)
nouveau-related dmesg output

Revision history for this message
In , Brian Tarricone (kelnos) wrote :

Created an attachment (id=32794)
pretty minimal xorg.conf

Revision history for this message
In , Maarten Maathuis (madman2003) wrote :

It's known, the problem is these cards are all onboard. So that makes it harder
to test. The same problem applies to 8200 and 8300 and g102m (the last one is
iirc). They are either NVAA or NVAC. Ben Skeggs is probably the person with the
biggest chance of getting this running, but he doesn't have one.

Revision history for this message
In , Phelps (phelps) wrote :

I'm seeing what might be the same problem with an NV4E (a GeForce 6150 which is built into my ASUS M2NPV-VM motherboard) running in a 64-bit environment. I have a work-around, but it doesn't make any sense to me.

I've managed to track my issue down to the TTM interface changes:

    77bce8e drm/nouveau: fix for ttm interface changes, and
    ad49f50 drm/ttm/radeon: add dma32 support.

If I force the last argument to ttm_bo_device_init to false then the GPU channel is successfully created and 2D acceleration works. I'm currently using the following patch:

diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c
index 8f3a12f..10d1663 100644
--- a/drivers/gpu/drm/nouveau/nouveau_mem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_mem.c
@@ -590,7 +590,7 @@ nouveau_mem_init(struct drm_device *dev)
        ret = ttm_bo_device_init(&dev_priv->ttm.bdev,
                                 dev_priv->ttm.bo_global_ref.ref.object,
                                 &nouveau_bo_driver, DRM_FILE_PAGE_OFFSET,
- dma_bits <= 32 ? true : false);
+ /* dma_bits <= 32 ? true : */ false);
        if (ret) {
                NV_ERROR(dev, "Error initialising bo driver: %d\n", ret);
                return ret;

The bit that I find most confusing is that I can't just force dma_bits to be 40 (or 64, for that matter) -- it apparently must be 32.

To summarize, this only works for me if: dma_bits=32 and TTM_PAGE_FLAG_DMA32 is not in bdev's flags.

I hope this means something to someone...

Thanks,
-Ted

Revision history for this message
In , Brian Tarricone (kelnos) wrote :

Maarten: Is there any more information or help I can provide? Or any hardware I can donate? Unfortunately donating a $1500 Mac laptop isn't something I'm comfortable doing, but if someone could find a cheap (<= $450?) laptop with the same or similar NVAC chipset, I might be able to justify buying one for Ben to test on. If he thinks remote testing will do, I'd be happy to hang out in #nouveau on the weekend and help (unfortunately during the week isn't possible for me).

Ted: interesting... are you running a 64bit system? If so, does that mean TTM is trying to use > 32bit DMA? Perhaps something in the hardware doesn't support > 32bit DMA, and that fact isn't being detected properly.

Revision history for this message
In , Phelps (phelps) wrote :

Brian: Yes, I am using a 64-bit system.

TTM_PAGE_FLAG_DMA32 is used only by ttm_tt_alloc_page(), where it causes alloc_page() to be called with the __GFP_DMA32 flag set. This is supposed to cause it to return only pages in the first 4GB of RAM, so I'm baffled as to why it's breaking anything.

FWIW, I only have 4GB of RAM in the machine, so in theory all of it could be safe for 32-bit DMA.

I note that you're also using an x86-64 CPU, and I'd be curious to know if the patch in comment #4 helps you. If not, I should open a new bug report.

Thanks,
-Ted

Revision history for this message
In , Brian Tarricone (kelnos) wrote :

Nope, unfortunately your patch doesn't help. Same error in the log.

Revision history for this message
In , Maarten Maathuis (madman2003) wrote :

4GB of RAM means you go over 32 bits memory space (your gpu and other hardware
also needs memory space). Why it breaks in this strange way i do not know.

Brian Tarricone: I think the cheapest would be to dig up a NVAA/NVAC based
motherboard (they seem to exist in socket AM2+ variety only), combined with an
AMD Athlon II X2, some ram, a case, small harddrive and a dvd writer/player.
But it might be worthwhile to find out what is keeping Ben Skeggs from having
such hardware, i will add him to the CC list.

Revision history for this message
In , Maarten Maathuis (madman2003) wrote :

Ted Phelps: you should open a seperate bug report

Revision history for this message
In , Phelps (phelps) wrote :

Brian: Thanks for testing.
Maarten: I've submitted bug #26201 to track this. Thanks for having a look.

-Ted

Revision history for this message
In , Brian Tarricone (kelnos) wrote :

Ok, I did some printf()ing, and found out at least part of what's failing. Hopefully this is useful. Call stack looks something like this (with some of
the actual args passed:

libdrm.so:drmCommandWrite(fd, DRM_NOUVEAU_GEM_CPU_PREP, ...)
libdrm_nouveau.so:nouveau_bo_wait(bo, 0x8, 0, 0)
libdrm_nouveau.so:nouveau_bo_map_range(bo, 0, 65536, 0x0c)
libdrm_nouveau.so:nouveau_bo_map()
libdrm_nouveau.so:nouveau_channel_alloc()
nouveau_drv.so:NVInitDma()
[etc.]

And drmCommandWrite() returns -EBUSY.

I poked around in the drm kernel module, but that's where things get a little
weird. I found nouveau_gem_ioctl_cpu_prep(), and added a printk() at the top,
but I never see any output in dmesg. So then I added some in drm_drv.c:drm_ioctl(), but even *that* doesn't seem to be called. Not sure what's going on there. I'm probably misunderstanding something.

Revision history for this message
In , Anssi Hannula (anssi-hannula) wrote :

(In reply to comment #8)
> Brian Tarricone: I think the cheapest would be to dig up a NVAA/NVAC based
> motherboard (they seem to exist in socket AM2+ variety only), combined with an
> AMD Athlon II X2, some ram, a case, small harddrive and a dvd writer/player.

I have an NVAC on a Socket 755 Gigabyte GA-E7AUM-DS2H, x86_64. After reading this I made a quick test and confirmed that it is hit by this bug as well.
There is one used one for sell at amazon.com (out of stock for new ones):
http://www.amazon.com/gp/offer-listing/B001RUI3P6/ref=dp_olp_used?ie=UTF8&condition=used

Revision history for this message
In , Ingmar Vanhassel (ingmar) wrote :

For those not on #nouveau @ freenode: Ben Skeggs got access to this hardware over ssh, and found the bug, so a patch may appear soon.

Revision history for this message
In , Brian Tarricone (kelnos) wrote :

Ok, with today's commits (presumably 1ac45d0f945734fe9dcd6f006b0c626da6d7334f is the one that matters, since the other two seem unrelated), EXA setup is "fixed," but X comes up with a mostly black screen with random red, blue, and green pixels every now and then, and big white bands and partial-bands across the screen. Machine appears hard-locked (forgot to ssh-test, though, so might have just been input-locked).

Revision history for this message
In , Brian Tarricone (kelnos) wrote :

Actually now that I think about it, I doubt it's hard-locked -- otherwise I doubt Xorg.0.log would have made it to disk after the lockup. Kernel's probably still alive, to some extent.

Revision history for this message
In , Brian Tarricone (kelnos) wrote :

Verified with a bisect that 1ac45d0f945734fe9dcd6f006b0c626da6d7334f causes the lockup.

I also tried setting the module param vram_notify=1 and vram_notify=0, but still the same problem either way.

Revision history for this message
In , nfm (korn85) wrote :

No worry I'm getting the same thing with ION, looks like X dies somewhere along:

X: nouveau_pushbuf.c:271: nouveau_pushbuf_flush: Assertion `!nouveau_pushbuf_space(chan, min)' failed.

So it looks like more vram magic is needed. I guess we will need to catch darktama once again and let him ssh into the machine :P

see ya,
#nouveau irc nick: hax0r1

Revision history for this message
In , Maarten Maathuis (madman2003) wrote :

I don't think he has even attempted to fix it yet. He said it wasn't trivial. He's on vacation for the next week, so be patient.

Revision history for this message
David Nielsen (davidnielsen-deactivatedaccount) wrote :

Binary package hint: xserver-xorg-video-nouveau

Using nouveau I get very choppy playback in fullscreen. This appears to be because XV acceleration is not available (though according to Fedora the driver is supposed to support this).

Test using gstreamer-properties and set to X Window System (X11/XShm/Xv) rather than autodetect then test, it will complain that it is unable to initialize XV output.

I used approximately this approach to test:
http://fedoraproject.org/wiki/QA:Testcase_nouveau_xvideo

ProblemType: Bug
Architecture: amd64
Date: Sun Feb 21 13:07:19 2010
DistroRelease: Ubuntu 10.04
DkmsStatus:

InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
MachineType: Acer Aspire R3610
Package: xserver-xorg-video-nouveau 1:0.0.15+git20100219+9b4118d-0ubuntu1
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-14-generic root=UUID=dacf8a63-86ca-4de3-9ebe-75a4c0693e36 ro quiet splash
ProcEnviron:
 LANG=da_DK.utf8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-14.20-generic
RelatedPackageVersions:
 xserver-xorg 1:7.5+1ubuntu6
 libgl1-mesa-glx 7.7-3ubuntu1
 libdrm2 2.4.18-1ubuntu2
 xserver-xorg-video-intel 2:2.9.1-1ubuntu5
SourcePackage: xserver-xorg-video-nouveau
Uname: Linux 2.6.32-14-generic x86_64
dmi.bios.date: 08/10/2009
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: P01-A2
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: FMCP7A-ION
dmi.board.vendor: Acer
dmi.chassis.type: 3
dmi.chassis.vendor: Acer
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrP01-A2:bd08/10/2009:svnAcer:pnAspireR3610:pvr:rvnAcer:rnFMCP7A-ION:rvr:cvnAcer:ct3:cvr:
dmi.product.name: Aspire R3610
dmi.sys.vendor: Acer
system:
 distro: Ubuntu
 architecture: x86_64kernel: 2.6.32-14-generic

Revision history for this message
David Nielsen (davidnielsen-deactivatedaccount) wrote :
Revision history for this message
In , Skeggsb (skeggsb) wrote :

NVAC should be fixed in latest nouveau git. It worked on the macbook I got access to at least :)

Revision history for this message
Chris Halse Rogers (raof) wrote : Re: [Bug 525273] Re: nouveau fails to support XV acceleration ION

 status triaged
 importance medium

Right. This is because you don't have the nouveau-firmware package
installed; without it, there is no acceleration on nv5x+ cards (ie:
GeForce 8 or newer).

This package is in multiverse, as it contains firmware extracted from
watching the binary driver initialise the card. As it's in multiverse,
I don't think we can't pull it into the default install. The X team
will need to work out precisely how to handle this.

Changed in xserver-xorg-video-nouveau (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
In , Brian Tarricone (kelnos) wrote :

Great, works fine here!

Revision history for this message
David Nielsen (davidnielsen-deactivatedaccount) wrote :

I installed the firmware package, rebooted and the issue presists. Still no xv output and choppy playback in fullscreen.

Revision history for this message
Anders Aagaard (aagaande) wrote :

Seing the same thing on different hardware (GTX260M), works on a fedora liveusb, but not on ubuntu lucid.

Xorg.0.log has this:
(EE) NOUVEAU(0): Error creating GPU channel: -19
(EE) NOUVEAU(0): Error initialising acceleration. Falling back to NoAccel

Revision history for this message
David Nielsen (davidnielsen-deactivatedaccount) wrote :

Roughly the same error:

(EE) NOUVEAU(0): Error creating GPU channel: -16
(EE) NOUVEAU(0): Error initialising acceleration. Falling back to NoAccel

Changed in xserver-xorg-video-nouveau (Ubuntu):
status: Triaged → New
status: New → Confirmed
Revision history for this message
Chris Halse Rogers (raof) wrote : Re: [Bug 525273] Re: nouveau fails to support XV acceleration ION

dmesg output would also be interesting.

I think perhaps that you haven't re-built the initramfs for your kernel,
and as nouveau starts early it's looking for the firmware there, not
finding it, and not looking for it again.

Could you attach dmesg to this bug, and then try again after running
“sudo update-initramfs -u” and rebooting?

Revision history for this message
David Nielsen (davidnielsen-deactivatedaccount) wrote :

No change what so ever after performing the requested action. Still no xv acceleration.

Revision history for this message
Chris Halse Rogers (raof) wrote :

Now we've eliminated the obvious failure causes, it looks like this is an upstream bug, with a patch. Changing package to l-b-m, as that's where the kernel module lives.

affects: xserver-xorg-video-nouveau (Ubuntu) → linux-backports-modules-2.6.32 (Ubuntu)
Revision history for this message
Chris Halse Rogers (raof) wrote :
Changed in nouveau:
status: Unknown → Fix Released
Revision history for this message
David Nielsen (davidnielsen-deactivatedaccount) wrote :

any hope we can get an update with those patches included to confirm the fix?

Revision history for this message
Anders Aagaard (aagaande) wrote :

With latest updates on lucid xvinfo now works for me.

Revision history for this message
Chris Halse Rogers (raof) wrote :

The packages in the xorg-edgers PPA should contain the fixes for ION support. Testing with those would be useful.

Revision history for this message
David Nielsen (davidnielsen-deactivatedaccount) wrote :

XV works as presented in the xorg-edgers ppa. Thank you.

Revision history for this message
Andy Whitcroft (apw) wrote :

Should be fixed by the update to 2.6.33.

linux-backports-modules-2.6.32 (2.6.32-14.4) lucid; urgency=low

  [ Andy Whitcroft ]

  * UPDATE_NOUVEAU -- add support for dropping patches on top
  * update Nouveau to v2.6.33

  [ Christopher James Halse Rogers ]

  * fix legacy paths in UPDATE_NOUVEAU
  * pull in ctxprog voodoo from Nouveau upstream
    - LP: #528190
  * update Nouveau package description to mention lbm-nouveau metapackage
  * update VCS-Git field to point to lucid lbm

  [ Upstream Kernel Changes ]

  * drm/nv50: Implement ctxprog/state generation.
  * drm/nv50: Remove redundant/incorrect ctxvals initialisation.
 -- Andy Whitcroft < <email address hidden>> Fri, 26 Feb 2010 19:06:43 +0000

Changed in linux-backports-modules-2.6.32 (Ubuntu):
status: Confirmed → Fix Released
Changed in nouveau:
importance: Unknown → Medium
Changed in nouveau:
importance: Medium → Unknown
Changed in nouveau:
importance: Unknown → Medium
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.