Discussion:
[Bug 70409] New: Radeon 7730M discrete GPU use crashes DRI PRIME, appears to be using r600 driver
b***@freedesktop.org
2013-10-12 19:36:52 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=70409

Priority: medium
Bug ID: 70409
Assignee: dri-***@lists.freedesktop.org
Summary: Radeon 7730M discrete GPU use crashes DRI PRIME,
appears to be using r600 driver
Severity: normal
Classification: Unclassified
OS: Linux (All)
Reporter: ***@gmail.com
Hardware: x86-64 (AMD64)
Status: NEW
Version: XOrg CVS
Component: DRM/Radeon
Product: DRI

I am trying to get DRI PRIME working on my AMD dual-GPU laptop.

hp dv6z-7000
AMD A10-4600 APU with Radeon HD 7660G (ARUBA)
AMD Radeon HD 7730M (VERDE) discrete GPU, 2GB VRAM
Ubuntu GNOME 13.10
Custom-built kernel 3.11-rc7 from drm-next-3.13-wip branch (for DPM)

I'm using the Ubuntu-provided xorg, mesa, glamor, and libdrm packages. I had
to compile my own xserver-xorg-video-ati/radeon packages with glamor
acceleration support enabled. With this I can confirm glamor acceleration is
being used with the 7660G on r600 and it works well.

Now, I want to enable DRI PRIME to use the 7730M with games.

***@Adam-dv6z-7000:~$ xrandr --listproviders
Providers: number : 3
Provider 0: id: 0x6c cap: 0xf, Source Output, Sink Output, Source Offload, Sink
Offload crtcs: 4 outputs: 3 associated providers: 2 name:radeon
Provider 1: id: 0x45 cap: 0xf, Source Output, Sink Output, Source Offload, Sink
Offload crtcs: 6 outputs: 0 associated providers: 2 name:radeon
Provider 2: id: 0x45 cap: 0xf, Source Output, Sink Output, Source Offload, Sink
Offload crtcs: 6 outputs: 0 associated providers: 2 name:radeon

***@Adam-dv6z-7000:~$ xrandr --setprovideroffloadsink 0x45 0x6C

***@Adam-dv6z-7000:~$ DRI_PRIME=1 glxinfo | grep renderer

When I run that third line, X crashes immediately with a segfault and
automatically restarts GDM to the login screen. I will attach a Xorg log to
this bug report after I post it and run the commands.
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2013-10-12 19:42:21 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=70409

--- Comment #1 from Adam Honse <***@gmail.com> ---
Created attachment 87528
--> https://bugs.freedesktop.org/attachment.cgi?id=87528&action=edit
Xorg log from DRI_PRIME=1 crash
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2013-10-15 23:14:16 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=70409

Adam Honse <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Summary|Radeon 7730M discrete GPU |Discrete GPU fails to
|use crashes DRI PRIME, |initialize and X segfaults
|appears to be using r600 |on dual-GPU r600/radeonsi
|driver |laptop
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2013-10-15 23:22:37 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=70409

--- Comment #2 from Adam Honse <***@gmail.com> ---
OK, I've done more research into the issue. I started by reinstalling Ubuntu
GNOME 3.10 on my laptop for a clean install, then upgraded to the most
up-to-date packages in Ubuntu's repository. I have not built any custom
packages.

With this setup, X will not start at all. Trying to run startx fails with a
segmentation fault and the error:

r600: Unknown chipset 0x9900

This chipID appears to be the 7660G GPU according to this line of the Xorg log:

[ 2200.372] (--) RADEON(0): Chipset: "ARUBA" (ChipID = 0x9900)

Upon looking into the Xorg log, it shows that the 7660G (ARUBA) initializes
acceleration via EXA while the 7730M (VERDE) initializes acceleration via
glamor. Both cards have acceleration enabled, and then it segfaults before
anything happens on screen.

I want to use glamor acceleration on both cards as I've found it to perform
better than EXA, so I added a simple xorg.conf.d file like so:

Section "Device"
Identifier "Radeon"
Option "AccelMethod" "glamor"
EndSection

Now X starts, but it's back to my original problem. With xorg.conf forcing
glamor acceleration, the 7660G GPU initializes EGL and glamor properly which is
reflected by desktop acceleration working, but the 7730M attempts to initialize
EGL and fails, being unusable for DRI PRIME (though still showing up in
listproviders, twice for some reason).

I have a thread on Ubuntu Forums with Xorg.log from both without and with
forcing glamor. In addition when I tried to replicate the issue on my desktop,
I got graphical corruption. I'll file a different bug report for that issue.

http://ubuntuforums.org/showthread.php?t=2180826

The conversation that led to this report started here:
http://phoronix.com/forums/showthread.php?84382-RadeonSI-GLAMOR-Support-Still-M-I-A-From-Ubuntu-13-10&p=363236#post363236
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2014-02-13 03:06:20 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=70409

--- Comment #3 from Michel DÀnzer <***@daenzer.net> ---
Is this still an issue with current Mesa Git?
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2014-06-28 17:00:24 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=70409

Vitaliy Filippov <***@yourcmc.ru> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@yourcmc.ru

--- Comment #4 from Vitaliy Filippov <***@yourcmc.ru> ---
I also experience this issue on a Samsung 880Z5E laptop with integrated Intel
HD Graphics 4000 (Ivybrigde) and dedicated Radeon 8770M cards. Kernel version
is 3.14.7-1 from Debian Sid, xserver-xorg-video-radeon is 1:7.4.0-1, mesa is
10.2.1-2, libdrm 2.4.54-1. As far as I know, GLAMOR is disabled in debian
build.

Xorg log after crash is the same as attached by Adam.

What I'm trying is:

xrandr --setprovideroffloadsink 0x41 0x68
DRI_PRIME=1 glxinfo

After these two commands X immediately crashes.

Is there any progress on this issue?
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2014-06-28 18:06:05 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=70409

--- Comment #5 from Vitaliy Filippov <***@yourcmc.ru> ---
Detailed backtrace:

#0 GetScreenPrime (master=0x7f1e37f39e20, ***@entry=0x1,
prime_id=***@entry=1) at ../../../../hw/xfree86/dri2/dri2.c:158
#1 0x00007f1e36f9a47d in GetScreenPrime (prime_id=***@entry=1,
master=***@entry=0x1) at ../../../../hw/xfree86/dri2/dri2.c:151
#2 DRI2GetScreenPrime (master=<optimized out>, prime_id=***@entry=1) at
../../../../hw/xfree86/dri2/dri2.c:169
#3 0x00007f1e36f9c447 in DRI2Connect (client=***@entry=0x7f1e38854de0,
pScreen=<optimized out>, driverType=65536,
fd=***@entry=0x7fff2ef0bb70, driverName=***@entry=0x7fff2ef0bb80,
deviceName=***@entry=0x7fff2ef0bb88)
at ../../../../hw/xfree86/dri2/dri2.c:1312
#4 0x00007f1e36f9d09c in ProcDRI2Connect (client=0x7f1e38854de0) at
../../../../hw/xfree86/dri2/dri2ext.c:122
#5 ProcDRI2Dispatch (client=0x7f1e38854de0) at
../../../../hw/xfree86/dri2/dri2ext.c:596
#6 0x00007f1e36e7786e in Dispatch () at ../../dix/dispatch.c:433
#7 0x00007f1e36e7b68a in dix_main (argc=10, argv=0x7fff2ef0bd98,
envp=<optimized out>) at ../../dix/main.c:294
#8 0x00007f1e34718b45 in __libc_start_main () from
/lib/x86_64-linux-gnu/libc.so.6
#9 0x00007f1e36e66c2e in _start ()
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2014-06-29 10:34:04 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=70409

--- Comment #6 from dimitris <***@yahoo.gr> ---
I have the same exact problem with the latest stuff from git ( mesa,
xorg-server, ddx for intel and radeon from git, llvm-3.5 (from svn), all
relevant libs from git etc...). Glamor is always enabled for radeon.
Kernel-3.15.2
My dgpu is a hd8000M (oland chip) with an integrated Ivybrigde gpu.
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2014-06-30 03:44:52 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=70409

--- Comment #7 from Michel DÀnzer <***@daenzer.net> ---
Please be careful not to mix up several similar, but potentially different
issues.

First of all, any PRIME functionality requires that acceleration is
successfully initialized for all GPUs involved, otherwise the X server will
crash when trying to use it (which is unfortunate, but the way it is right
now).

In Adam's case, acceleration failed to initialize for the discrete GPU with

(EE) RADEON(G0): Failed to create EGL context
(EE) RADEON(G0): glamor detected, failed to initialize EGL.

If this still happens with current Mesa Git, setting the environment variable
EGL_LOG_LEVEL=debug for the Xorg process should give more information about the
failure.

In Vitaliy's case, the problem is the lack of glamor support in Debian sid.
This is fixed in the X packages in Debian experimental.

dimitris says glamor initializes successfully for him, so it's probably a
different problem which should be tracked in a different report.
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2014-06-30 18:08:52 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=70409

--- Comment #8 from Vitaliy Filippov <***@yourcmc.ru> ---
(In reply to comment #7)
Post by b***@freedesktop.org
In Vitaliy's case, the problem is the lack of glamor support in Debian sid.
This is fixed in the X packages in Debian experimental.
Ah, ok... but it seems experimental has no actual xserver-xorg-video-radeon
package... so I should probably rebuild it by hand :-(
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2014-06-30 20:48:55 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=70409

--- Comment #9 from Vitaliy Filippov <***@yourcmc.ru> ---
Just built the packages - you're right, X doesn't crash with glamor enabled...

But I get black picture when I'm trying to run DRI_PRIME=1 glxgears... I
understand it's not related to this bug, but maybe you have some thoughts about
it? What can it be?
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2014-06-30 20:53:29 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=70409

--- Comment #10 from Vitaliy Filippov <***@yourcmc.ru> ---
Also it says "Running synchronized to vertical refresh. The frame rate should
be approximately the same as the monitor refresh rate", but then it says "46864
frames in 5.0 seconds = 9372.675 FPS" which means the sync doesn't work...
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2014-07-01 00:49:45 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=70409

--- Comment #11 from Michel DÀnzer <***@daenzer.net> ---
(In reply to comment #9)
Post by b***@freedesktop.org
But I get black picture when I'm trying to run DRI_PRIME=1 glxgears...
PRIME currently requires a compositing manager to work.
Post by b***@freedesktop.org
I understand it's not related to this bug, [...]
Indeed, please take your remaining issues elsewhere.
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2014-07-01 20:30:23 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=70409

--- Comment #12 from Vitaliy Filippov <***@yourcmc.ru> ---
OK, thanks. Everything works now, I'll post new bugs if I experience more
problems :)
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2016-02-26 06:47:02 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=70409

Christopher M. Penalver <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
CC| |***@gmai
| |l.com
Status|NEW |RESOLVED

--- Comment #13 from Christopher M. Penalver <***@gmail.com> ---
Adam Honse, Ubuntu 13.10 reached EOL on July 17, 2014. For more on this, please
see https://wiki.ubuntu.com/Releases.

If this is reproducible with a supported release, it will help immensely if you
filed a new report with Ubuntu by ensuring you have the package xdiagnose
installed, and that you click the Yes button for attaching additional debugging
information running the following from a terminal:
ubuntu-bug xorg

Also, please feel free to subscribe me to it.

For more on why this is helpful, please see
https://wiki.ubuntu.com/ReportingBugs.
--
You are receiving this mail because:
You are the assignee for the bug.
Loading...