Bug 79551 - DRI_PRIME not working
Summary: DRI_PRIME not working
Status: RESOLVED NOTABUG
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r600 (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-02 13:37 UTC by Maxim
Modified: 2014-06-10 00:25 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
dmesg and Xorg (44.37 KB, text/plain)
2014-06-02 13:37 UTC, Maxim
Details

Description Maxim 2014-06-02 13:37:24 UTC
Created attachment 100312 [details]
dmesg and Xorg

I have a problem with DRI_PRIME. If i want to render on DGPU: DRI_PRIME=1 glxgears Result is black window. Hardware: IGPU: Radeon HD 6480G. DGPU: Radeon HD 7470M. Kernel 3.15-rc8. CPU:A4-3305M. Booting with radeon.runpm=0 (if with runpm=1 then after few seconds system freezes). Drivers from oibaf ppa.
Comment 1 Alex Deucher 2014-06-02 14:26:27 UTC
PRIME only works with a compositor.  Make sure you are using one.
Comment 2 Maxim 2014-06-02 16:03:52 UTC
xrandr --listproviders
Providers: number : 3
Provider 0: id: 0x78 cap: 0x9, Source Output, Sink Offload crtcs: 2 outputs: 3 associated providers: 2 name:radeon
Provider 1: id: 0x43 cap: 0x6, Sink Output, Source Offload crtcs: 4 outputs: 0 associated providers: 2 name:radeon
Provider 2: id: 0x43 cap: 0x6, Sink Output, Source Offload crtcs: 4 outputs: 0 associated providers: 2 name:radeon

glxinfo | grep "OpenGL renderer"
OpenGL renderer string: Gallium 0.4 on AMD SUMO2

But when I tried:

xrandr --setprovideroffloadsink 0x78 0x43
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  34 ()
  Value in failed request:  0x78
  Serial number of failed request:  17
Current serial number in output stream:  18
Comment 3 Maxim 2014-06-02 16:19:39 UTC
(In reply to comment #1)
> PRIME only works with a compositor.  Make sure you are using one.

Thanks, xcompmgr fixed it
Comment 4 Michel Dänzer 2014-06-03 01:53:08 UTC
I'd argue this is actually a bug (probably in the X server): If PRIME can't work without compositing, it should enable automatic compositing for the windows that need it.
Comment 5 Maxim 2014-06-03 18:48:47 UTC
(In reply to comment #4)
> I'd argue this is actually a bug (probably in the X server): If PRIME can't
> work without compositing, it should enable automatic compositing for the
> windows that need it.

xorg-server 2:1.15.1-0ubuntu2 ubuntu 14.04
Comment 6 Maxim 2014-06-08 17:43:09 UTC
if in /etc/environment set DRI_PRIME=1 and in /etc/xprofile set xcompmgr -c &
some apps will display with artifacts (part of window freezes when scrolling)
Comment 7 Michel Dänzer 2014-06-09 07:24:23 UTC
(In reply to comment #6)
> if in /etc/environment set DRI_PRIME=1 and in /etc/xprofile set xcompmgr -c &
> some apps will display with artifacts (part of window freezes when scrolling)

Apps using PRIME, or others?

BTW, just xcompmgr -a should be enough, no need for -c.
Comment 8 Maxim 2014-06-09 16:14:20 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > if in /etc/environment set DRI_PRIME=1 and in /etc/xprofile set xcompmgr -c &
> > some apps will display with artifacts (part of window freezes when scrolling)
> 
> Apps using PRIME, or others?
> 
> BTW, just xcompmgr -a should be enough, no need for -c.

others.
Today I've tested with DRI_PRIME=0. Same lags. It's appear, when xcompmgr running.
Comment 9 Michel Dänzer 2014-06-10 00:25:34 UTC
(In reply to comment #8)
> others.
> Today I've tested with DRI_PRIME=0. Same lags. It's appear, when xcompmgr
> running.

That's not directly related to this bug report then. If xcompmgr -a doesn't work better, there are many other compositing managers you can try.


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.