no 3D with radeon driver, AIGLX error: Calling driver entry point failed

Bug #1002562 reported by Dirk Möbius
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
xserver-xorg-driver-ati
Fix Released
High
xserver-xorg-video-ati (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Can't get 3D hardware rendering to work with the free radeon driver. Always falls back to software rendering.

System is a Dell Precision 6500 with a ATI FirePro M7740 (ie. RV740).

$ grep AIGLX /var/log/Xorg.0.log
[ 29.022] (==) AIGLX enabled
[ 29.175] (EE) AIGLX error: Calling driver entry point failed
[ 29.175] (EE) AIGLX: reverting to software rendering
[ 29.175] (II) AIGLX: Screen 0 is not DRI capable
[ 29.178] (II) AIGLX: Loaded and initialized swrast

KMS is enabled:

$ dmesg | grep -i drm
[ 11.647974] [drm] Initialized drm 1.1.0 20060810
[ 11.656323] [drm] radeon defaulting to kernel modesetting.
[ 11.656326] [drm] radeon kernel modesetting enabled.
[ 11.656627] [drm] initializing kernel modesetting (RV740 0x1002:0x94A3 0x1028:0x12EF).
[ 11.656660] [drm] register mmio base: 0xF6DF0000
[ 11.656663] [drm] register mmio size: 65536
[ 11.656823] [drm] Detected VRAM RAM=1024M, BAR=256M
[ 11.656825] [drm] RAM width 128bits DDR
[ 11.657661] [drm] radeon: 1024M of VRAM memory ready
[ 11.657664] [drm] radeon: 512M of GTT memory ready.
[ 11.657681] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[ 11.657684] [drm] Driver supports precise vblank timestamp query.
[ 11.657779] [drm] radeon: irq initialized.
[ 11.657785] [drm] GART: num cpu pages 131072, num gpu pages 131072
[ 11.658792] [drm] Loading RV730 Microcode
[ 11.678944] [drm] PCIE GART of 512M enabled (table at 0x0000000000040000).
[ 11.725326] [drm] ring test succeeded in 1 usecs
[ 11.725483] [drm] radeon: ib pool ready.
[ 11.725570] [drm] ib test succeeded in 0 usecs
[ 11.726263] [drm] Radeon Display Connectors
...

[ 11.726315] [drm] Internal thermal controller without fan control
[ 11.726348] [drm] radeon: power management initialized
[ 12.759604] [drm] fb mappable at 0xE0142000
[ 12.759606] [drm] vram apper at 0xE0000000
[ 12.759607] [drm] size 9216000
[ 12.759608] [drm] fb depth is 24
[ 12.759609] [drm] pitch is 7680
[ 12.759721] fbcon: radeondrmfb (fb0) is primary device
[ 14.667142] fb0: radeondrmfb frame buffer device
[ 14.667143] drm: registered panic notifier
[ 14.667153] [drm] Initialized radeon 2.12.0 20080528 for 0000:01:00.0 on minor 0

Here are the kernel options from /boot/grub/grub.cfg:

menuentry 'Ubuntu, with Linux 3.2.0-24-generic' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        gfxmode $linux_gfx_mode
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='(hd1,msdos1)'
        search --no-floppy --fs-uuid --set=root fe17e18a-84a3-45d1-aab6-205883c62e00
        linux /vmlinuz-3.2.0-24-generic root=UUID=c7931a12-6433-4247-b552-6b71f15ba832 ro quiet
        initrd /initrd.img-3.2.0-24-generic
}

And here's the complete xorg.conf:

Section "Device"
        Identifier "radeon"
        Driver "radeon"
EndSection

The proprietary ATI driver is NOT installed on this system.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: xserver-xorg-video-radeon 1:6.14.99~git20111219.aacbd629-0ubuntu2
ProcVersionSignature: Ubuntu 3.2.0-24.38-generic 3.2.16
Uname: Linux 3.2.0-24-generic x86_64
NonfreeKernelModules: wl
.tmp.unity.support.test.1:

ApportVersion: 2.0.1-0ubuntu7
Architecture: amd64
CompizPlugins: [core,composite,opengl,decor,place,compiztoolbox,gnomecompat,resize,mousepoll,snap,grid,imgpng,commands,regex,wall,vpswitch,session,move,unitymtgrabhandles,animation,expo,workarounds,thumbnail,ezoom,fade,scale,unityshell]
CompositorRunning: None
Date: Tue May 22 00:31:44 2012
DistUpgraded: Fresh install
DistroCodename: precise
DistroVariant: ubuntu
DkmsStatus:
 bcmwl, 5.100.82.38+bdcom, 3.2.0-24-generic, x86_64: installed
 vboxhost, 4.1.14, 3.2.0-24-generic, x86_64: installed
EcryptfsInUse: Yes
ExtraDebuggingInterest: Yes, whatever it takes to get this fixed in Ubuntu
GraphicsCard:
 Advanced Micro Devices [AMD] nee ATI M97 GL [ATI FirePro M7740] [1002:94a3] (prog-if 00 [VGA controller])
   Subsystem: Dell Device [1028:12ef]
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
MachineType: Dell Inc. Precision M6500
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-3.2.0-24-generic root=UUID=c7931a12-6433-4247-b552-6b71f15ba832 ro quiet
Renderer: Software
SourcePackage: xserver-xorg-video-ati
UpgradeStatus: No upgrade log present (probably fresh install)
XorgConf:
 Section "Device"
  Identifier "radeon"
  Driver "radeon"
 EndSection
dmi.bios.date: 09/25/2011
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A07
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA07:bd09/25/2011:svnDellInc.:pnPrecisionM6500:pvr:rvnDellInc.:rn:rvr:cvnDellInc.:ct8:cvr:
dmi.product.name: Precision M6500
dmi.sys.vendor: Dell Inc.
version.compiz: compiz 1:0.9.7.8-0ubuntu1
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.32-1ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 8.0.2-0ubuntu3
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 8.0.2-0ubuntu3
version.xserver-xorg-core: xserver-xorg-core 2:1.11.4-0ubuntu10.1
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.7.0-0ubuntu1
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.99~git20111219.aacbd629-0ubuntu2
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.17.0-1ubuntu4
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:0.0.16+git20111201+b5534a1-1build2

Revision history for this message
In , Marcaureleii (marcaureleii) wrote :

Created attachment 54048
dmesg

Dear,

I try to get native 3D acceleration with my graphic card. I have a Dell Precision M6500 with Radeon FirePro M7740. The chipset (rv740) is rather well supported but I can't obtain native 3D acceleration. I have Linux Fedora 16, libmesa 7.11.1.

I don't understand where is the problem...

I attach my dmesg and LIBGL_DEBUG=verbose glxinfo. This last one indicates : "libGL error: failed to create dri screen"

Please help me.

Thanks a lot

Revision history for this message
In , Marcaureleii (marcaureleii) wrote :

Created attachment 54049
libgl verbose glxinfo

Revision history for this message
In , agd5f (agd5f) wrote :

Looks like you attached the wrong glxinfo output. Please attach your xorg log as well.

Revision history for this message
In , Marcaureleii (marcaureleii) wrote :

Created attachment 54077
libgl verbose glxinfo

Here is the correct output of LIBGL_DEBUG=verbose glxinfo

Revision history for this message
In , Marcaureleii (marcaureleii) wrote :

Created attachment 54078
xorg log

And here is my xorg log. Thanks for your interest and sorry for the bad glxinfo log.

Revision history for this message
In , Michel Dänzer (michel-daenzer) wrote :

Looks like /usr/lib64/dri/r600_dri.so's dri2CreateNewScreen() hook fails, but it's not clear why. Maybe you can try running glxinfo in gdb, setting a breakpoint at dri2CreateNewScreen and tracing where the failure is coming from.

Revision history for this message
In , Airlied-freedesktop (airlied-freedesktop) wrote :

check mesa is built with radeon drm support.

Revision history for this message
In , Marcaureleii (marcaureleii) wrote :

Dear,

I use default version of mesa (7.11.2) on Fedora 16, so I think it is build with radeon drm support, yes.

Tracing and debugging is not (yet) my skill level, but perhaps you can guide and help me. Here is what I get setting a breakpoint at dri2CreateNewScreen:

(gdb) run
Starting program: /usr/bin/glxinfo
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
name of display: :0
libGL: OpenDriver: trying /usr/lib64/dri/r600_dri.so

Breakpoint 1, dri2CreateNewScreen (scrn=0, fd=8, extensions=0x614f30, driver_configs=0x7fffffffd980, data=0x6160b0) at ../common/dri_util.c:865
865 {
(gdb)

What else should I do ?

Thanks a lot !

Revision history for this message
In , Michel Dänzer (michel-daenzer) wrote :

(In reply to comment #7)
> What else should I do ?

First of all, run 'finish' and check that the return value of dri2CreateNewScreen is 0 as suspected.

If so, single-step through dri2CreateNewScreen and its callees with 'step' / 'next' to find out why it returns 0.

Revision history for this message
Dirk Möbius (dmoebius-deactivatedaccount-deactivatedaccount) wrote :
Revision history for this message
eva (evammg) wrote :

Yes, same messages with Dell PowerEdge R300 and ATI ES1000.

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xserver-xorg-video-ati (Ubuntu):
status: New → Confirmed
bugbot (bugbot)
tags: added: 3d
Revision history for this message
In , Freedesktop-n8 (freedesktop-n8) wrote :

Hello,

I think I have found a solution for this problem and another. I have the same notebook with that graphics card and had some problems with it in the past months whenever I tried the open source driver from Debian unstable. It worked about a year ago but then I bought a 27" monitor which was only usable with its native resolution of 2560x1440 with the fglrx driver (which had some other problems by the way). I regularly tried the open source driver when new versions show up in Debian but since some months the XServer crashed immediately after the start with a segfault. In newer versions it became more graceful with the following log messages:

(EE) RADEON(0): radeon_surface_best failed
(EE) RADEON(0): radeon_setup_kernel_mem failed

After debugging like suggested in bug #48138 I found out that there is missing a case in r6_init_hw_info for setting num_banks. While there are cases for 0 and 1 the FirePro M7740 has a value of 2 at some bits of the tiling_config so it returns with -EINVAL from the default case. First I did not know on what to set num_banks in that case but tried something and the XServer started successfully with that change.

Then I saw in /var/log/Xorg.0.log that the 3D acceleration was not working like described in this bug report:

(EE) AIGLX error: Calling driver entry point failed
(EE) AIGLX: reverting to software rendering

I tried to debug that too, following the above hints and ended up in r600_interpret_tiling in src/gallium/drivers/r600/r600_pipe.c in the MESA code and found exactly the same reason as above, a missing case 2. In the meantime I checked out the source of xserver-xorg-video-ati too and sensitized by the above findings made a grep over all three source trees (libdri, mesa, xserver-xorg-video-ati):

grep "num_banks.*=" -rsn . -B 2 -A 1

There I found another missing case 2 in r600_interpret_tiling in src/radeon_kms.c and somewhere else an existing case 2 with num_banks = 16. So I patched all found asymmetries regarding case 2 and the 3D acceleration began to work again.

I append all three patches I made. Maybe someone can check them and add them if they are reasonable so future versions can incorporate the fixes.

Best regards
Stefan Kanarski

PS: Now my only problem is the resolution of 2560x1440 with my Fujitsu P27T-6. Via DVI I only get 1280x1440 (every second pixel column missing, looks like single-link although the cable should be dual-link) and via DisplayPort the monitor is toggling between power save and a black screen. But that's another story for another day or two. If someone has an idea where to start looking I am glad to hear.

Revision history for this message
In , Freedesktop-n8 (freedesktop-n8) wrote :

Created attachment 62157
Patch for branch debian-unstable in http://git.debian.org/pkg-xorg/lib/libdrm.git

Revision history for this message
In , Freedesktop-n8 (freedesktop-n8) wrote :

Created attachment 62158
Patch for branch debian-unstable in http://git.debian.org/pkg-xorg/lib/mesa.git

Revision history for this message
In , Freedesktop-n8 (freedesktop-n8) wrote :

Created attachment 62159
Patch for branch debian-unstable in http://git.debian.org/pkg-xorg/driver/xserver-xorg-video-ati.git

Revision history for this message
In , agd5f (agd5f) wrote :

Created attachment 62246
possible fix

It's actually a kernel issue. The attached patch against Dave's drm-fixes branch should fix it.

Revision history for this message
madbiologist (me-again) wrote :

This bug is fixed upstream in kernel 3.5-rc1. From the changelog:

author Alex Deucher
Thu, 31 May 2012 22:53:36 +0000 (18:53 -0400)
committer Dave Airlie
Fri, 1 Jun 2012 14:36:31 +0000 (15:36 +0100)
commit 29d654067a98c1cb8874c774e5fd799a038af8a6
tree caf59daf243217689b78d4086c74ace5bb2a23c2
parent 08ef8e41a6f420c3c0998b50d478e0b2c267a226

drm/radeon: fix bank information in tiling config

While there are cards with more than 8 mem banks, the max
number of banks from a tiling perspective is 8, so cap
the tiling config at 8 banks.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=43448

Signed-off-by: Alex Deucher
Cc: <email address hidden>
Signed-off-by: Dave Airlie

A PPA of this kernel is available from http://kernel.ubuntu.com/~kernel-ppa/mainline/
See https://wiki.ubuntu.com/Kernel/MainlineBuilds for info on how to install and uninstall this PPA.

This fix has also been cc'd to the stable kernel tree, so it will probably appear in a future 3.2.xx kernel, which would subsequently be available for Ubuntu 12.04 "Precise Pangolin" as an SRU.

Changed in xserver-xorg-video-ati (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
In , Michel Dänzer (michel-daenzer) wrote :

Could libdrm_radeon also be made to deal gracefully with broken kernels?

Revision history for this message
In , agd5f (agd5f) wrote :

Created attachment 62672
libdrm fix

This patch should do the trick.

Revision history for this message
In , agd5f (agd5f) wrote :

Created attachment 62674
libdrm fix

slightly improved version.

Changed in xserver-xorg-driver-ati:
importance: Unknown → High
status: Unknown → Confirmed
Revision history for this message
In , Brmdamon (brmdamon) wrote :

I have a Hewlett Packard H8-1224 which has a Radeon HD7570 video card. Software is up to date Debian Wheezy, using the radeon X driver and the non-free firmware. The startup of X fails with the messages

[ 18.376] (EE) RADEON(0): radeon_surface_best failed
[ 18.376] (EE) RADEON(0): radeon_setup_kernel_mem failed

It's been suggested that my problem is related to the bug documented here. To those more knowledgable than I - does this seem likely? I'll post the complete Xorg.log.

If the patches listed here are relevant, could someone explain - would ONE of the patches address the problem, or would they ALL need to be installed.

Thanks for your help!

Revision history for this message
In , Brmdamon (brmdamon) wrote :

Created attachment 63053
Xorg.log from HP H8-1224 with Radeon HD7570 and Debian Wheezy

Revision history for this message
In , Michel Dänzer (michel-daenzer) wrote :

(In reply to comment #17)
> It's been suggested that my problem is related to the bug documented here. To
> those more knowledgable than I - does this seem likely?

Yes.

> If the patches listed here are relevant, could someone explain - would ONE of
> the patches address the problem, or would they ALL need to be installed.

Either alone should be sufficient.

The libdrm fix is in the 2.4.35 release and I think the kernel fix is in mainline as well, so resolving this report as fixed.

Changed in xserver-xorg-driver-ati:
status: Confirmed → Fix Released
Revision history for this message
madbiologist (me-again) wrote :

This fix is now in the upstream 3.2.20 kernel, and kernel 3.5.0-1.1 is in quantal-proposed. Marking as Fix Released.

Changed in xserver-xorg-video-ati (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Dirk Möbius (dmoebius-deactivatedaccount-deactivatedaccount) wrote :

Great! So when will it hit precise-updates?

Revision history for this message
madbiologist (me-again) wrote :

It will spend some time in precise-proposed before it hits precise-updates. This will occur after 3.2.0-26.41, which is currently in precise-proposed, moves to precise-updates. 3.2.0-26.41 is based on the upstream 3.2.19 kernel - see bug 1008711.
You can see this bug number under the precise heading at http://people.canonical.com/~ubuntu-archive/pending-sru.html and you can also monitor that page for the next kernel after 3.2.0-26.41.

See https://wiki.ubuntu.com/Testing/EnableProposed for instructions on how to enable and use -proposed.

Technically, I was a little hasty in marking this bug as Fix Released. I should have waited until the fix moved into either quantal-release or precise-proposed, but I was eager to get it off my radar. I hope you don't mind too much. 3.5.0-1.1 is now in quantal-release so if my understanding is correct Fix Released is now technically correct since this bug is not targeted to a specific Ubuntu version.

Revision history for this message
Dirk Möbius (dmoebius-deactivatedaccount-deactivatedaccount) wrote :

Thanks for your explanations.

Revision history for this message
In , Brmdamon (brmdamon) wrote :

Further to the above - I have tried all the patches listed above, in various combinations, and the problem still exists. The startup of X fails with the messages

radeon_surface_best failed
radeon_setup_kernel_mem failed

Configuration (current Debian Wheezy):

Radeon 7570 card - PCI identifier 675D
Kernel: 3.2.0-2-amd64
xserver-xorg-video-radeon: 6.14.4-5
libdrm-radeon1 & libdrm2: 2.4.33-1
/etc/X11/xorg.conf.d: Does not contain a Device section.

Revision history for this message
In , Michel Dänzer (michel-daenzer) wrote :

(In reply to comment #20)
> Radeon 7570 card - PCI identifier 675D

That's a different card from the one this bug report is about.

> libdrm-radeon1 & libdrm2: 2.4.33-1

Support for your card was only added in libdrm_radeon 2.4.34.

Revision history for this message
In , Brmdamon (brmdamon) wrote :

Thank you for the information. I found the PCI code 675D in various header files in xserver-xorg-video-ati-6.14.4 and mesa-8.0.2, leading me to believe that it was supported in Wheezy. But now I see it is not mentioned in the .h files in libdrm-2.4.33.

Revision history for this message
In , W-florijn-k (w-florijn-k) wrote :

A patch referencing this bug report has been merged in Linux v3.5-rc1:

commit 29d654067a98c1cb8874c774e5fd799a038af8a6
Author: Alex Deucher <email address hidden>
Date: Thu May 31 18:53:36 2012 -0400

    drm/radeon: fix bank information in tiling config

Revision history for this message
Dirk Möbius (dmoebius-deactivatedaccount-deactivatedaccount) wrote :

I noticed that this fix has been backported into linux-image-3.2.0-27.43 (precise-updates). I updated, and it works now! That is, the error "AIGLX error: Calling driver entry point failed" is gone now. Gnome 3D/Unity works like a charm.

Many thanks to all involved!

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.