Bug 107582

Summary: Prefer render nodes instead of X to discover GPU
Product: Beignet Reporter: Sven Arvidsson <sa>
Component: BeignetAssignee: Zhigang Gong <zhigang.gong>
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Sven Arvidsson 2018-08-15 15:21:31 UTC
At the moment Beignet defaults to using X11/DRI to find the GPU. This makes it hard to use the integrated GPU when a discrete graphics card is used as the primary display driver. 

Beignet reports an unhelpful error message:

 DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
 Assuming 131072kB available aperture size.
 May lead to reduced performance or incorrect rendering.
 get chip id failed: -1 [2]

and no devices are found.

The only way to get OpenCL working is by unsetting the DISPLAY variable so X isn't found, and by doing so only non-x applications can use OpenCL.

It would be better if render nodes were used by default (I think these are enabled by default since kernel 3.15?) and X11/DRI only as a fallback. 

Compiling Beignet without X11 gets rid of this problem and seems to work fine in all the environments I tried. (AMD GPU as primary with X11, Intel GPU as primary with X11, from a a headless console environment, etc.)

Possibly X11 support could be removed entirely to cut down on dependencies.

The documentation on https://www.freedesktop.org/wiki/Software/Beignet/ could use an update too. It took far longer to figure out how to get this working than I care to admit ;-)
Comment 1 GitLab Migration User 2018-10-12 21:25:24 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/beignet/beignet/issues/47.

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.