Bug 1411292 - Don't get hardware acceleration with modesetting driver on Intel graphics
Summary: Don't get hardware acceleration with modesetting driver on Intel graphics
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: xorg-x11-server
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: X/OpenGL Maintenance List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-09 11:23 UTC by Jonathan Dieter
Modified: 2017-01-13 17:19 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-13 12:13:05 UTC
Type: Bug


Attachments (Terms of Use)
Xorg log (36.37 KB, text/plain)
2017-01-09 11:23 UTC, Jonathan Dieter
no flags Details
Patch to glvnd-enable mesa (7.14 KB, patch)
2017-01-09 18:14 UTC, Jonathan Dieter
no flags Details | Diff

Description Jonathan Dieter 2017-01-09 11:23:55 UTC
Created attachment 1238685 [details]
Xorg log

Description of problem:
When I enable the modesetting Xorg driver instead of the intel driver, I don't get hardware acceleration.

Version-Release number of selected component (if applicable):
xorg-x11-server-Xorg-1.19.0-3.fc25.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Enable modesetting driver for i915
2. Start X
3.

Actual results:
Xorg falls back to software OpenGL

Expected results:
Xorg uses hardware OpenGL

Additional info:
This is a multiseat system.  This particular seat is using the built-in Intel graphics.

Comment 1 Jonathan Dieter 2017-01-09 11:29:46 UTC
CC'ing Hans as he requested at https://github.com/negativo17/nvidia-driver/pull/10#issuecomment-271234920.

FWIW, I think the important lines in the Xorg log are:
[  7123.348] (II) AIGLX: Screen 0 is not DRI2 capable
[  7123.348] (EE) AIGLX: reverting to software rendering

Comment 2 Hans de Goede 2017-01-09 13:33:45 UTC
Hi,

(In reply to Jonathan Dieter from comment #1)
> CC'ing Hans as he requested at
> https://github.com/negativo17/nvidia-driver/pull/10#issuecomment-271234920.
> 
> FWIW, I think the important lines in the Xorg log are:
> [  7123.348] (II) AIGLX: Screen 0 is not DRI2 capable
> [  7123.348] (EE) AIGLX: reverting to software rendering

Actually, this seems to be the real problem:

[  7123.312] (EE) modeset(0): eglGetDisplay() failed
[  7123.314] (EE) modeset(0): glamor initialization failed

The problem is that you end up using the libGL.so from the negativo17.org glvnd packages which does not work with the mesa libGL.so which is normally used with an intel GPU (even when using the modesetting driver).

Once we've a glvnd enabled mesa this should be fixed. Note that this also means that although you get some accel with the intel driver, OpenGL apps will not be accelerated even when using the intel ddx instead of the modesetting ddx.

There are 2 possible workarounds:

1) Remove the glvnd files from /etc/ld.so.conf.d/ and start the xserver using the nvidia binary driver
with LD_LIBRARY_PATH=/usr/lib/glvnd:/usr/lib64/glvnd set in the environment, note see the .conf files you're removing under /etc/ld.so.conf.d/ for the correct path I might be wrong

2) Install the glvnd enabled mesa from:
https://copr.fedorainfracloud.org/coprs/ajax/glvnd/

Note this is a downgrade compared to the recent F25 update to mesa 1.13, but it should work fine.

Regards,

Hans

Comment 3 Jonathan Dieter 2017-01-09 18:14:03 UTC
Created attachment 1238852 [details]
Patch to glvnd-enable mesa

Hans, thanks so much for taking a look at this.

I'm already using a locally built glvnd-enabled mesa (sorry, I really should have mentioned that in the initial report).  I'm attaching the patch that shows the changes I made to Fedora's mesa (and, yes, the Provides libGL.so.1 is completely wrong; I just didn't want to have to rebuild libglvnd as well).

As I am using negativo17.org's glvnd, I wonder if my multiseat system is missing libglvnd-egl, and that's where the problem's coming from.

Now that I have an idea of where to look, I'll take a look at it on Wednesday (tomorrow's a full teaching day) and get back to you.

Comment 4 Jonathan Dieter 2017-01-13 12:13:05 UTC
Ok, I've figured out the problem, and, as you may have guessed, it was in my glvnd-enabled mesa build.  Apparently the patches to build libglvnd-enabled egl aren't in mesa-13.0.2 (and I don't think they're upstream yet either).

My glvnd-enabled mesa build worked fine with glx, but not with egl, and since I'm using X, not Wayland, I didn't notice.  Ajax's build works fine as he has those non-upstreamed patches in his build, so I'm going to bump the epoch on his and use it internally.  If I get some time, I'll see if I can forward-port those patches to mesa 13.

Thanks for pointing me in the right direction.  If you happen to know if someone's already got patches for libglvnd-enabled egl in mesa, please let me know.

Comment 5 Hans de Goede 2017-01-13 15:25:23 UTC
Hi,

(In reply to Jonathan Dieter from comment #4)
> Ok, I've figured out the problem, and, as you may have guessed, it was in my
> glvnd-enabled mesa build.  Apparently the patches to build libglvnd-enabled
> egl aren't in mesa-13.0.2 (and I don't think they're upstream yet either).
> 
> My glvnd-enabled mesa build worked fine with glx, but not with egl, and
> since I'm using X, not Wayland, I didn't notice.  Ajax's build works fine as
> he has those non-upstreamed patches in his build, so I'm going to bump the
> epoch on his and use it internally.  If I get some time, I'll see if I can
> forward-port those patches to mesa 13.

I already have a mesa 13 with forward ported patches available here:

https://fedorapeople.org/~jwrdegoede/mesa-13.0.3-2.fc26.src.rpm

If you can give this a try and confirm that it works for you that would be great,
note best tried together with:
https://fedorapeople.org/~jwrdegoede/libglvnd-0.2.999-6.gitdc16f8c.fc25.src.rpm

Regards,

Hans

Comment 6 Jonathan Dieter 2017-01-13 17:19:20 UTC
This is exactly what I was looking for.  I've just rebuilt both your mesa and libglvnd packages for Fedora 25 and they work perfectly!  Running 32-bit legacy applications also works as expected.

My intel seat is using the modesetting driver, my nvidia seat is using the binary driver, and my amd seats are using the gallium driver, and it just works!  Thanks so much!


Note You need to log in before you can comment on or make changes to this bug.