Bug 69694 - Xorg doesn't start on KABINi with radeonsi
Summary: Xorg doesn't start on KABINi with radeonsi
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/radeonsi (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-23 07:53 UTC by Marco
Modified: 2014-02-17 07:54 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
gdb trace on segfault (11.23 KB, text/plain)
2013-09-23 07:53 UTC, Marco
Details
xorg.conf (2.74 KB, text/plain)
2013-09-23 07:54 UTC, Marco
Details
Xorg.0.log (28.57 KB, text/plain)
2013-09-23 07:55 UTC, Marco
Details
dmesg log (69.51 KB, text/plain)
2013-09-23 07:55 UTC, Marco
Details
xorg.conf working (lead to llvmpipe render) (4.55 KB, text/plain)
2013-09-23 21:07 UTC, Marco
Details
Gdb trace whe uncommenting glamoregl (7.04 KB, text/plain)
2013-09-23 21:10 UTC, Marco
Details
xorg.conf (4.61 KB, text/plain)
2013-09-24 20:45 UTC, Marco
Details
Backtrace of crash (3.02 KB, text/plain)
2013-09-24 20:45 UTC, Marco
Details
xorg.conf working with only one GPU (HD8330) (2.54 KB, text/plain)
2013-09-25 21:46 UTC, Marco
Details
Modified xorg.conf with two gpus (2.00 KB, text/plain)
2014-02-13 22:30 UTC, Marco
Details
Xorg.log with previous xorg.conf (37.69 KB, text/plain)
2014-02-13 22:33 UTC, Marco
Details
Dmesg for running kernel (78.04 KB, text/plain)
2014-02-13 22:34 UTC, Marco
Details
Latest xorg.log without xorg.conf (40.82 KB, text/plain)
2014-02-16 21:25 UTC, Marco
Details

Description Marco 2013-09-23 07:53:48 UTC
Created attachment 86336 [details]
gdb trace on segfault

I bougth a brand new laptop with AMD APU A4-5000 (KABINI) which have two amd gpu (8330 integrated + 8550M dedicated).

I just tried to recompile everithing to make Xorg work with radeonsi.

At then end I have:
1)kernel 3.12-rc1 (with latest Alex Deucher 6 patches, the first is https://patchwork.kernel.org/patch/2922981/ dealing with clocks on SI);
2) libdrm git;
3) mesa git;
4) xf86-video-ati git;
5) glamor git;
6) Xserver git;

I cannot start Xorg (the screen goes black), but I can ssh into it a trace the segfault with gdb.
Comment 1 Marco 2013-09-23 07:54:32 UTC
Created attachment 86337 [details]
xorg.conf
Comment 2 Marco 2013-09-23 07:55:02 UTC
Created attachment 86338 [details]
Xorg.0.log
Comment 3 Marco 2013-09-23 07:55:25 UTC
Created attachment 86339 [details]
dmesg log
Comment 4 Alex Deucher 2013-09-23 14:23:54 UTC
Can you try removing your xorg.conf?
Comment 5 Marco 2013-09-23 21:05:46 UTC
Removing xorg.conf leads to the same crash (trace is very similar).

Then I tried with this little xorg.conf (to load glamoregl)

Section "Module"
	Load  "dri2"
	Load  "glamoregl"
	Load  "glx"
EndSection

but result is always the same crash.

The only configuration with which I can start Xorg (but with llvmpipe renderer) is the xorg.conf attached.
Comment 6 Marco 2013-09-23 21:07:06 UTC
Created attachment 86422 [details]
xorg.conf working (lead to llvmpipe render)
Comment 7 Marco 2013-09-23 21:10:02 UTC
Created attachment 86423 [details]
Gdb trace whe uncommenting glamoregl

Uncommenting "glamoregl" in the working xorg.conf lead to crash described in the gdb attached.
Comment 8 Marco 2013-09-23 21:42:45 UTC
Looks terribly similar to:
https://bugs.freedesktop.org/show_bug.cgi?id=69682
Comment 9 Marco 2013-09-23 22:19:45 UTC
But unfortunatly, commenting glx module doesn't solve my problem.
Comment 10 Marco 2013-09-24 06:56:52 UTC
Thinking on it twice and rebuilding new mesa from git I remember I had this notification during build:
undefined symbol: _glapi_tls_Context

I will look into configure flags of both mesa and xserver (--enable-glx-tls) and let you know.
Comment 11 Marco 2013-09-24 20:44:16 UTC
All is compiled with --enable-glx-tls.

No more ideas...
I'm attaching latest try with xorg.conf and backtrace.
Comment 12 Marco 2013-09-24 20:45:12 UTC
Created attachment 86481 [details]
xorg.conf
Comment 13 Marco 2013-09-24 20:45:57 UTC
Created attachment 86482 [details]
Backtrace of crash
Comment 14 Marco 2013-09-25 21:45:19 UTC
I found a workaround!

Disabling second GPU in xorg.conf let me enter in X with acceleration enabled:

marco@albireo:~$ glxinfo | grep -i opengl
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD KABINI
OpenGL version string: 2.1 Mesa 9.3.0-devel
OpenGL shading language version string: 1.30

Finally!!! And all is working fine.

Then the bug is related to having 2 GPU.
At least now I can play games (with only one GPU).
Comment 15 Marco 2013-09-25 21:46:22 UTC
Created attachment 86601 [details]
xorg.conf working with only one GPU (HD8330)
Comment 16 Alex Deucher 2013-09-25 22:02:39 UTC
Are you sure it doesn't work if you remvoe your xorg.conf completely?  You don't need one and in most cases it causes more problems than it solves.  Also you can remove this line:
		Virtual   5760 1920
from your config.   Unless you are actually using a large virtual desktop, it just wastes memory.
Comment 17 Marco 2013-09-26 05:53:10 UTC
> Are you sure it doesn't work if you remvoe your xorg.conf completely?
Yes, I'm sure. Without a xorg.conf I only have a black screen with the cursor caret in the upper left corner.

I also tried disabling dpm (radeon.dpm=0) but the result is the same.

I think the problem is due to having two gpus under radeon driver and glamor.
Comment 18 Michel Dänzer 2014-02-13 03:07:30 UTC
Is this still an issue with current Mesa Git?
Comment 19 Marco 2014-02-13 22:30:51 UTC
Created attachment 94030 [details]
Modified xorg.conf with two gpus

Yes, still an issue with:
mesa git as of today;
kernel 3.13.2 with VCE patches on top.

Without xorg.conf X doesn't come up: I only have a blank screen with caret cursor on upper left corner.
Using a modified Xorg with the two cards now works: before it never worked.
Comment 20 Marco 2014-02-13 22:33:36 UTC
Created attachment 94031 [details]
Xorg.log with previous xorg.conf

This is the log from xorg using previous xorg.conf.hybrid
Comment 21 Marco 2014-02-13 22:34:43 UTC
Created attachment 94032 [details]
Dmesg for running kernel
Comment 22 Marco 2014-02-16 21:24:18 UTC
Tried yesterday mesa git:
latest commit 1020d8937ef52725cc5adafc12465f6332815.

Now without xorg.conf and with xorg.conf.d with:
Section "Module"
	Load "dri2"
	Load "glamoregl"
EndSection

Xorg start without any problem.

marco@albireo:~/src/mesa.git$ glxinfo | grep -i opengl
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD KABINI
OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.2.0-devel (git-1020d89)
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 10.2.0-devel (git-1020d89)
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:

But... what about my second GPU? I was hoping to use it with DRI_PRIME but:
xrandr --listproviders 
shows only
Providers: number : 1
Provider 0: id: 0x54 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 2 outputs: 3 associated providers: 0 name:radeon

And what about render nodes? Will I be able to use second GPU as a render node?

Or this hybrid AMD GPU is considered as one and not two GPU?
 
For what concern this bug, You can now close it.
Comment 23 Marco 2014-02-16 21:25:28 UTC
Created attachment 94179 [details]
Latest xorg.log without xorg.conf
Comment 24 Michel Dänzer 2014-02-17 07:54:33 UTC
(In reply to comment #22)
> Now without xorg.conf and with xorg.conf.d with:
> Section "Module"
> 	Load "dri2"
> 	Load "glamoregl"
> EndSection
> 
> Xorg start without any problem.

FWIW, the xorg.conf.d snippet shouldn't be necessary anymore either with xserver 1.15 or newer.


> And what about render nodes? Will I be able to use second GPU as a render
> node?

You should be, but that doesn't help you for X.

Not sure why X is ignoring your second GPU, but I notice that you are using slightly outdated Git snapshots of xserver and xf86-video-ati. Can you try the latest releases or a current Git snapshot for those?


> Or this hybrid AMD GPU is considered as one and not two GPU?

No.


> For what concern this bug, You can now close it.

Doing so, BTW you can do this yourself. :)


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.