Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Intel GMA 900 & OpenGL (properly setting up X drivers)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Marcih
Apprentice
Apprentice


Joined: 19 Feb 2018
Posts: 213

PostPosted: Mon Sep 03, 2018 1:49 pm    Post subject: [SOLVED] Intel GMA 900 & OpenGL (properly setting up X d Reply with quote

I have my integrated Intel graphics working fine for everyday usage, both in the TTY and for X server. When I try to run OpenGL applications (mostly trying games), things get a bit dicey; refusing to launch, rendering issues, that sort of thing. Granted, some things do work as intended.

Things I've tried and work:
glxgears
Extreme Tux Racer
OpenArena

Things I've tried and don't work:
Star Wars JKII: Jedi Outcast (runs, rendering issues, can try to post screenshot if pointed in the direction how to. May be an issue with the port though since this machine is known to be able to play the game on Windows and it uses a similar engine to OpenArena)
Xonotic (doesn't launch, see output at the end)
eduke32 with duke3d-demodata (launches, sound effects in menu play but only black screen is shown, both with OGL and software rendering)


This got me wondering whether I have the driver set up properly. The wiki is, quite frankly, unclear on what exactly is currently supported by what and what is deprecated. Can I use the "modesetting" driver in xorg.conf with it only being the default for Gen 4 and beyond or is it only an option for Gen 4+? How can I tell which driver I'm using? Does mesa provide a graphics driver? Is the graphics driver part of xorg-drivers or is it just a meta-package? Which driver is recommended? So many questions!

Here's the things I could think of being relevant, can provide more if requested:
Code:
$ grep CONFIG_DRM_I915 /usr/src/linux/.config
CONFIG_DRM_I915=y
# CONFIG_DRM_I915_ALPHA_SUPPORT is not set
CONFIG_DRM_I915_CAPTURE_ERROR=y
CONFIG_DRM_I915_COMPRESS_ERROR=y
CONFIG_DRM_I915_USERPTR=y

Code:
$ emerge -pv mesa xorg-drivers xf86-video-intel

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] x11-drivers/xf86-video-intel-2.99.917_p20180214-r1::gentoo  USE="dri sna udev -debug -dri3 -tools -uxa -xvmc" 0 KiB
[ebuild   R    ] media-libs/mesa-18.1.6::gentoo  USE="classic dri3 egl gallium gbm llvm nptl -bindist -d3d9 -debug -gles1 -gles2 -opencl -openmax -osmesa -pax_kernel -pic (-selinux)
-unwind -vaapi -valgrind -vdpau -vulkan -wayland -xa -xvmc" VIDEO_CARDS="i915 intel (-freedreno) -i965 (-imx) -nouveau -r100 -r200 -r300 -r600 -radeon -radeonsi (-vc4) -virgl (-vivante) -vmware" 0 KiB
[ebuild   R    ] x11-base/xorg-drivers-1.19::gentoo  INPUT_DEVICES="libinput synaptics -elographics -evdev -joystick -keyboard -mouse -tslib -vmmouse -void -wacom" VIDEO_CARDS="i915
intel -amdgpu -ast -dummy -fbdev (-freedreno) -geode -glint -i965 -mga (-newport) -nouveau -nv -nvidia (-omap) -qxl -r128 -radeon -radeonsi -siliconmotion (-tdfx) (-tegra) (-vc4) -vesa -via -virtualbox -vmware (-voodoo)" 0 KiB

Code:
$ cat /etc/portage/make.conf
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j1"

GENTOO_MIRRORS="ftp://ftp.fi.muni.cz/pub/linux/gentoo/"
USE="X acpi alsa branding -consolekit -dbus -gnome -introspection -kde opengl -policykit -pulseaudio -systemd unicode -wayland"
CPU_FLAGS_X86="mmx mmxext sse sse2"
VIDEO_CARDS="intel i915"
INPUT_DEVICES="libinput synaptics"

PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
FEATURES="clean-logs userfetch"

# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C

Code:
$ cat /etc/X11/xorg.conf.d/20-display.conf
Section "Device"
        Identifier "Intel Graphics"
        Driver     "intel"
        Option     "AccelMethod"    "sna"
EndSection

(20opengl.conf is auto-created, the purpose of it is unknown to me since it looks empty.)
Code:
$ cat /etc/X11/xorg.conf.d/20opengl.conf
Section "Files"
EndSection

Code:
$ eselect opengl list
Available OpenGL implementations:
  [1]   xorg-x11 *

Code:
$ xonotic-glx
Game is Xonotic using base gamedir data
gamename for server filtering: Xonotic
Xonotic Linux 15:53:52 Sep  3 2018 - release
Current nice level is below the soft limit - cannot use niceness
Skeletal animation uses SSE code path
DPSOFTRAST available (SSE2 instructions detected)
execing quake.rc
execing default.cfg
execing defaultXonotic.cfg
execing sRGB-disable.cfg
menu: program is not loaded
execing weapons.cfg
execing binds-xonotic.cfg
execing cdtracks.cfg
execing balance-xonotic.cfg
execing bal-wep-xonotic.cfg
execing effects-normal.cfg
execing physicsX.cfg
execing turrets.cfg
execing crosshairs.cfg
execing gamemodes.cfg
execing ctfscoring-samual.cfg
execing mutators.cfg
execing notifications.cfg
execing monsters.cfg
execing minigames.cfg
execing physics.cfg
execing commands.cfg
execing _hud_common.cfg
execing _hud_descriptions.cfg
execing hud_luma.cfg
couldn't exec config.cfg
"maxplayers" set to "16"
execing data/campaign.cfg
execing config_update.cfg
execing font-xolonium.cfg
client: program is not loaded
execing autoexec/empty.cfg
execing autoexec.cfg
Loaded public key key_0.d0pk (fingerprint: Xon//KssdlzGkFKdnnN4sgg8H+koTbBn5JTi37BAW1Q=)
Loaded private ID key_0.d0si for key_0.d0pk (public key fingerprint: R1JImsqobaHngw1yZ1vbMTsnDM9pX49r46k8ipVuOtw=)
NOTE: this ID has not yet been signed!
Only need a signature for an existing key...
Signature generation in progress...
execing post-config.cfg
Client using an automatically assigned port
Client opened a socket on address 0.0.0.0:0
Client opened a socket on address [0:0:0:0:0:0:0:0]:0
Loading OpenGL driver libGL.so.1
dri_create_context: glthread isn't thread safe - missing call XInitThreads
GL_VENDOR: Mesa Project
GL_RENDERER: i915 (chipset: 915GM)
GL_VERSION: 2.1 Mesa 18.1.6
vid.support.arb_multisample 1
vid.support.gl20shaders 1
NOTE: requested 1x AA, got 0x AA
Video Mode: fullscreen 1024x768x32x0.00hz
Received signal 11, exiting...
Invalid response from keygen server:


Did I do things right? Have I missed something? Should I use a different driver? Is there a benchmark I can use to check whether I've done things correctly?

EDIT: Updated as promised.
_________________
Bones McCracker wrote:
It wouldn't be so bad, if it didn't suck.

NeddySeagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.


Last edited by Marcih on Thu Sep 06, 2018 2:04 pm; edited 1 time in total
Back to top
View user's profile Send private message
Marcih
Apprentice
Apprentice


Joined: 19 Feb 2018
Posts: 213

PostPosted: Tue Sep 04, 2018 11:44 am    Post subject: Reply with quote

Update, MuPDF with USE="opengl" is toast as well (using mupdf-x11 still works):
Code:
$ mupdf-gl test.pdf
dri_create_context: glthread isn't thread safe - missing call XInitThreads
munmap_chunk(): invalid pointer
SIGABRT

_________________
Bones McCracker wrote:
It wouldn't be so bad, if it didn't suck.

NeddySeagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.
Back to top
View user's profile Send private message
The Main Man
Veteran
Veteran


Joined: 27 Nov 2014
Posts: 1166
Location: /run/user/1000

PostPosted: Wed Sep 05, 2018 9:08 am    Post subject: Reply with quote

I think you should turn off gallium USE flag for mesa, also dri3 and llvm.
Last two don't matter with your problem but you don't need them with that gpu.
Could be wrong though, on one machine I have 945G and I think I had similar problem, until I disabled gallium, I think that started with mesa 18.X , with 17.X and earlier it worked fine.
Back to top
View user's profile Send private message
Marcih
Apprentice
Apprentice


Joined: 19 Feb 2018
Posts: 213

PostPosted: Thu Sep 06, 2018 2:04 pm    Post subject: Reply with quote

kajzer wrote:
I think you should turn off gallium USE flag for mesa, also dri3 and llvm.
Last two don't matter with your problem but you don't need them with that gpu.
Could be wrong though, on one machine I have 945G and I think I had similar problem, until I disabled gallium, I think that started with mesa 18.X , with 17.X and earlier it worked fine.

Brilliant, everything works as expected: eduke32 shows stuff, xonotic launches, mupdf-gl works and Jedi Outcast renders the game properly!

I guess I should trust my own judgement a bit more since I was already thinking of disabling both Gallium since the Intel driver doesn't and won't support it (at least on i915) and dri3 since dri2 is the latest GMA 900 supports. However, I do have classic USE flag enabled; I though having them both would result in compiling on both the classic and Gallium architectures so it wouldn't be any harm, even if my driver didn't support Gallium. Looks like I was wrong, would be nice to have that on the Gentoo wiki.

Also, why disable llvm support? The mesa page doesn't help me figure out whether I need it or not. I'm not complaining, llvm is an ugly beast that takes 3 hours to compile and since mesa is the only package requiring it I'll be happy to purge it from the system. What difference does it make though?
_________________
Bones McCracker wrote:
It wouldn't be so bad, if it didn't suck.

NeddySeagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.
Back to top
View user's profile Send private message
The Main Man
Veteran
Veteran


Joined: 27 Nov 2014
Posts: 1166
Location: /run/user/1000

PostPosted: Thu Sep 06, 2018 3:45 pm    Post subject: Reply with quote

Glad it worked!
Took me some time to figure it out month or two ago when I had that problem.

As for dri3, I see you have it disabled in intel driver, so I thought you wouldn't need it in mesa then.
I didn't notice any difference when I disabled llvm, so like you said it's just much quicker mesa compile, at least I think there's no difference, same games I was running still run with no visible problems.
Told you in previous message that dri3 and llvm are not related to the problem you had, but maybe you should turn them off too, it's up to you :)
When I disabled gallium and it solved the problem, I was looking at some other USE flags and for testing I just thought I should try it without llvm and see how that goes, because I knew it's a monster of a package and I don't need it for anything else, turned out I don't need it, so you will have to judge that one for yourself.
Back to top
View user's profile Send private message
tribute58
n00b
n00b


Joined: 14 Oct 2018
Posts: 7

PostPosted: Sat Oct 20, 2018 7:31 pm    Post subject: Reply with quote

Marcih wrote:
However, I do have classic USE flag enabled; I though having them both would result in compiling on both the classic and Gallium architectures so it wouldn't be any harm, even if my driver didn't support Gallium.


You are right, that both are compiled, but you have to select the active driver with "eselect mesa set opengl ..." (can't check the syntax that at the moment). As kajzer already mentioned, the i915 gallium driver is horribly broken and is unmaintained for quiet a while. It's a pitty as the gallium driver has been way better than the classic driver.
Back to top
View user's profile Send private message
mattst88
Developer
Developer


Joined: 28 Oct 2004
Posts: 422

PostPosted: Sun Oct 28, 2018 8:12 pm    Post subject: Reply with quote

The story here is, Intel has graphics chips known as Gen1-9 currently. These generation numbers are not tied to the CPU generation numbers. See https://wiki.gentoo.org/wiki/Intel#Feature_support

Gen2-9+ are supported by the i915 kernel modesetting driver.

Gen2-3 are supported by the i915 Mesa 3D driver.

Gen 4+ are supported by the i965 Mesa 3D driver.

You need both a kernel modesetting driver and a 3D (userspace) driver.

As a result, lots of people are confused by what "i915" means and the difference between the drivers.

Now, it gets a little more confusing. There are DRI ("classic") and Gallium 3D drivers in Mesa. i965 is a classic driver and radeonsi is a Gallium driver for example.

There are *two* i915 drivers. The classic i915 driver supports Gen2-3. The Gallium i915 driver supports only Gen3.

They're both really bad drivers (for really bad hardware).

i915 hardware doesn't do vertex shading in hardware, and this is where the Gallium driver is better. It uses LLVM to build shaders and executes the JIT-compiled programs on the CPU. The classic driver runs the shaders through a software interpreter.

I really need to write this up as a blog post or Wiki page...

To reiterate: The hardware is terrible. Both drivers are terrible.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Sun Oct 28, 2018 11:26 pm    Post subject: Reply with quote

mattst88 wrote:
To reiterate: The hardware is terrible. Both drivers are terrible.

ITYM all three drivers - forgot to mention the intel/modesetting DDX split.
Back to top
View user's profile Send private message
mattst88
Developer
Developer


Joined: 28 Oct 2004
Posts: 422

PostPosted: Mon Oct 29, 2018 12:00 am    Post subject: Reply with quote

Ant P. wrote:
mattst88 wrote:
To reiterate: The hardware is terrible. Both drivers are terrible.

ITYM all three drivers - forgot to mention the intel/modesetting DDX split.


No, I mean both classic and Gallium i915 drivers are terrible.

I wasn't even going to bring up the 2D X drivers that you mention. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum