Jump to content
funtoo forums
  • 0
mirix

OpenGL applications segfault

Question

Hi,

I have just installed Funtoo, including X, with the Debian kernel as per the manual and then built a tailored Gentoo 4.14 kernel. Then I emerged LXDE and a number of applications. All seems to be running fine (I have updated world and performed a number of consistency checks, all good).

However when I try to run an OpenGL application it segfaults. I have tried sci-chem/chimera-bin (two versions), sci-chem/avogadro, sci-chem/pymol and glxgears. Same result. They all emerge just fine but they segfault immediately when I run them. No problems with Libreoffice, Firefox, Gimp, Inkscape, etc. Just OpenGL.

I have followed the Intel section of the Gentoo wiki to make sure everything is fine and rebooted.

No joy. This is a Lenovo Ideapad S10-3s

$ lspci

00:00.0 Host bridge: Intel Corporation Atom Processor D4xx/D5xx/N4xx/N5xx DMI Bridge
00:02.0 VGA compatible controller: Intel Corporation Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller
00:02.1 Display controller: Intel Corporation Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller

$ cat /proc/cpuinfo

model name    : Intel(R) Atom(TM) CPU N455   @ 1.66GHz

$ glxinfo
name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:

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

$ lspci -nnk | grep -i vga -A3 | grep 'in use'
    Kernel driver in use: i915

I am a member of the video group, etc. Any ideas? I wonder, shouldn't Intel be the OpenGL vendor and Mesa the implementation?

Share this post


Link to post
Share on other sites

9 answers to this question

Recommended Posts

  • 0

I just installed the mesa-progs to see if it works and glxgears runs fine without problem here.

I looked at the wiki section (https://wiki.gentoo.org/wiki/Intel) and found some differences:

In the kernel I have

[*] Include in-kernel firmware blobs in kernel binary (i915/skl_dmc_ver1.bin) instead of

[*] Include in-kernel firmware blobs in kernel binary (i915/skl_dmc_ver1_26.bin)

 

I have xorg-server installed with the glamor use flag but I don't use the modesetting driver (just intel) and I also don't use the glamor accel method (just sna).

 

What is the output of

equery u xf86-video-intel

 

Any output in dmesg after a segfault?

Share this post


Link to post
Share on other sites
  • 0

I didn't include the firmware blobs in the kernel because I understood it was not strictly required. Should I?

I do not use glamor because my card doesn't support it.

$ uname -a
Linux minchix 4.14.4-gentoo #1 SMP Wed Dec 13 00:28:42 CET 2017 x86_64 Intel(R) Atom(TM) CPU N455 @ 1.66GHz GenuineIntel GNU/Linux

$ equery u xf86-video-intel
Unavailable repository 'gentoo' referenced by masters entry in '/var/lib/layman/palemoon/metadata/layout.conf'
Unavailable repository 'gentoo' referenced by masters entry in '/var/lib/layman/science/metadata/layout.conf'
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for x11-drivers/xf86-video-intel-2.99.917_p20170716:
 U I
 - - debug : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful
             backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
 + + dri   : Enable direct rendering: used for accelerated 3D and some 2D, like DMA
 + + dri3  : (Restricted to <=x11-drivers/xf86-video-intel-2.99.917_p20160621)
             Enable DRI3 support
 + + sna   : Enable SandyBridge's New Acceleration (useful on all chipsets, not just SandyBridge)
 + + udev  : Enable virtual/udev integration (device discovery, power and storage device support, etc)
 - - uxa   : Enable UMA Acceleration Architecture
 - - xvmc  : Enables X-Video Motion Compensation support

$ dmesg

[  162.225639] glxgears[4628]: segfault at 12c ip 00007f581d92f43f sp 00007ffc20c78c10 error 4 in i915g_dri.so[7f581d471000+678000]

 

Share this post


Link to post
Share on other sites
  • 0

OK, it seems to be a bug in the driver affecting mesa-17.1.0_rc4 and possibly mesa-17.1

I have mesa-17.2.0, but both the problem and the workaround are identical to:

https://bugs.freedesktop.org/show_bug.cgi?id=100984

https://bugs.gentoo.org/618206

eselecting classic mode as opposed to gallium allows me to run OpenGL applications.

The solution they propose is upgrading to mesa-17.2.6, which I am tempted to do...

Share this post


Link to post
Share on other sites
  • 0
2 hours ago, mirix said:

I didn't include the firmware blobs in the kernel because I understood it was not strictly required. Should I?

Not sure because as far as I remember I didn't change the default value.

 

2 hours ago, mirix said:

$ equery u xf86-video-intel
Unavailable repository 'gentoo' referenced by masters entry in '/var/lib/layman/palemoon/metadata/layout.conf'
Unavailable repository 'gentoo' referenced by masters entry in '/var/lib/layman/science/metadata/layout.conf'
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for x11-drivers/xf86-video-intel-2.99.917_p20170716:
 U I
 - - debug : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful
             backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
 + + dri   : Enable direct rendering: used for accelerated 3D and some 2D, like DMA
 + + dri3  : (Restricted to <=x11-drivers/xf86-video-intel-2.99.917_p20160621)
             Enable DRI3 support
 + + sna   : Enable SandyBridge's New Acceleration (useful on all chipsets, not just SandyBridge)
 + + udev  : Enable virtual/udev integration (device discovery, power and storage device support, etc)
 - - uxa   : Enable UMA Acceleration Architecture
 - - xvmc  : Enables X-Video Motion Compensation support

I have the same use flags set except that I also include uxa and xvmc. Which probably should not be a problem if you use sna as accelaration method.

 

2 hours ago, mirix said:

OK, it seems to be a bug in the driver affecting mesa-17.1.0_rc4 and possibly mesa-17.1

I have mesa-17.2.0, but both the problem and the workaround are identical to:

https://bugs.freedesktop.org/show_bug.cgi?id=100984

https://bugs.gentoo.org/618206

eselecting classic mode as opposed to gallium allows me to run OpenGL applications.

The solution they propose is upgrading to mesa-17.2.6, which I am tempted to do...

I'm running mesa-17.2.0 as well and have no problem but you can still try if it solves your problem.

And as far I see it the bug reports, the problem only occured when mesa ran in gallium mode, not in classic. When I do 'eselect mesa list' I get

i915 (Intel 915, 945)
  [1]   classic *
i965 (Intel GMA 965, G/Q3x, G/Q4x, HD)
  [1]   classic *
r300 (Radeon R300-R500)
r600 (Radeon R600-R700, Evergreen, Northern Islands)
sw (Software renderer)
  [1]   classic *

So mesa is running in classic here.

Share this post


Link to post
Share on other sites
  • 0

I can confirm that mesa-17.2.7 solves the issue. So far, it works fine both in classic and gallium modes. I will submit an update, should I encounter any issue in real life usage.

Gentoo also has 17.3.0 but, like 17.2.0, those are development versions and, therefore, are expected to be buggy, In mesa-x.y.z, z=0 means development, one should stay away from those versions. The higher the z, the better stability one should expect.

 

Share this post


Link to post
Share on other sites
  • 0

OK, for completion I have also tested mesa-17.3.0.

With mesa-17.2.7, glxgears and Avogadro worth both in classic and gallium mode, whereas chimera-bin segfaults with gallium. This is better than mesa-17.2.0 in which Avogadro also segfaults in classic mode. For whatever puzzling reasons, adding extra flags (see bellow) seems to help even with 17.2.0, which now it is able to run glxgears in classic mode...

With mesa-17.3.0 all three applications work fine so far both in classic and gallium mode. As gallium is reported to be better, for the time being and pending real-life testing, I personally am going stick to the latest version of mesa.

It goes without saying that I am not recommending that anyone should upgrade. 17.3.0 is also a development version. So far it seems to work fine on my hardware but there might be bugs in other drivers or even bugs in i915 I have not come across yet.

$ eselect mesa list
64bit i915 (Intel 915, 945)
  [1]   classic
  [2]   gallium *
64bit i965 (Intel GMA 965, G/Q3x, G/Q4x, HD)
64bit r300 (Radeon R300-R500)
64bit r600 (Radeon R600-R700, Evergreen, Northern Islands)
64bit sw (Software renderer)
  [1]   classic
  [2]   gallium *
32bit i915 (Intel 915, 945)
  [1]   classic
  [2]   gallium *
32bit i965 (Intel GMA 965, G/Q3x, G/Q4x, HD)
32bit r300 (Radeon R300-R500)
32bit r600 (Radeon R600-R700, Evergreen, Northern Islands)
32bit sw (Software renderer)
  [1]   classic
  [2]   gallium *

$ eix media-libs/mesa
[?] media-libs/mesa [1]
     Available versions:  13.0.5^d (~)13.0.6^d 17.0.6^d (~)17.0.7^d (~)17.1.0^d (~)17.1.1^d (~)17.1.2^d (~)17.1.3^d (~)17.1.4^d (~)17.1.5^d (~)17.1.6^d (~)17.1.7^d (~)17.1.8^d (~)17.2.0^md {bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gcrypt gles1 gles2 libressl +llvm +nettle +nptl opencl openmax openssl osmesa pax_kernel pic selinux unwind vaapi valgrind vdpau vulkan wayland xa xvmc ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32" VIDEO_CARDS="freedreno i915 i965 imx intel nouveau r100 r200 r300 r600 radeon radeonsi vc4 virgl vivante vmware"}
     Installed versions:  17.3.0^d[?](13:58:55 19/12/17)(classic d3d9 dri3 egl gallium gbm gles1 gles2 llvm nptl xa -bindist -debug -opencl -openmax -osmesa -pax_kernel -pic -selinux -unwind -vaapi -valgrind -vdpau -vulkan -wayland -xvmc ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="32 64 -x32" VIDEO_CARDS="i915 intel -freedreno -i965 -imx -nouveau -r100 -r200 -r300 -r600 -radeon -radeonsi -vc4 -virgl -vivante -vmware")
     Homepage:            https://www.mesa3d.org/
     Description:         OpenGL-like graphic library for Linux

[1] "xorg-kit" /var/git/meta-repo/kits/xorg-kit

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...