Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 572274 - =app-eselect/eselect-opengl-1.3.1 - should media-libs/mesa GL libraries be placed directly in main system library paths - potential conflict with proprietary AMD/Nvidia graphics drivers (?)
Summary: =app-eselect/eselect-opengl-1.3.1 - should media-libs/mesa GL libraries be pl...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major with 1 vote (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-18 13:27 UTC by Bob Wya
Modified: 2017-11-16 22:45 UTC (History)
11 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
eselect-opengl-1.3.1-fix-gl-provider-lib-support.patch (eselect-opengl-1.3.1-fix-gl-provider-lib-support.patch,1.60 KB, patch)
2016-01-24 04:52 UTC, Bob Wya
Details | Diff
media-libs/mesa-11.1.1.ebuild.patch (mesa-11.1.1.ebuild.patch,1.76 KB, patch)
2016-01-24 04:54 UTC, Bob Wya
Details | Diff
crux example of GL* select (gl-select,5.62 KB, text/plain)
2016-01-29 12:25 UTC, Oleh
Details
/var/log/Xorg.0.log (Xorg.0.log,51.19 KB, text/plain)
2016-02-12 12:04 UTC, Bob Wya
Details
Xorg.0.log (Xorg.0.log,28.50 KB, text/x-log)
2016-04-16 17:54 UTC, HelLViS69
Details
Xorg.0.log (Xorg.0.log,18.10 KB, text/plain)
2016-05-02 23:32 UTC, Joel Snape
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bob Wya 2016-01-18 13:27:53 UTC
Hi, I've been wrangling with setting up Plasma 5+systemd on my laptop since early January (2016!!)

I can't even login to a Plasma 5 Session - yet! I've tried disabling KWin compositing at startup (accessing the SystemSettings 5 utility - via a LXQt session). This has had no effect though...

I've installed LXQt successfully. This runs fine on top of OpenBox - there are some issues running it on top of Kwin 5 even with compositing disabled. Since GLX support is missing from the native Plasma 5 SystemSettings dialogue (which can be run under LXQt) I can only test with KWin 5 EGL support enabled.

I've tested replacing the EGL and GLES2 libraries (supplied by media-libs/mesa) with symbolic links to the Nvidia driver versions of these libraries (basically what is done on Arch Linux). The compositing support on LXQt+KWin 5 + EGL enabled is significantly "improved" - but still not working 100%.

I've marked the bug as Major - because I've seen at least 2 other Gentoo Users complaining about this same issue on the Gentoo forums.

Btw Gentoo is booted in UEFI mode - so I can't drop back to a virtual TTY console - once X is started (nvidia bug I believe).

Not sure what other information would be useful...



Reproducible: Always

Steps to Reproduce:
1. Enable KDE overlay
2. Install Plasma 5 & despendencies
3. Install SDDM
4. Install LXQt (for testing Kwin, qt5 toolkit, etc.)

Actual Results:  
1) I can reach a working SDDM display manager
2) Starting a Plasma 5 session leads to only a Plasma Desktop (RHS) click session being enabled. The SDDM login screen does not transition into a Splash - it just "stays in place".
3) I can start an LXQt session - running on Kwin 5. But in the SystemSettings (native Plasma SystemSettings5 utility) menu I only see EGL compositing support.


Expected Results:  
2) Successful Plasma 5 Session launcher with Breeze splash screen
3) GLX & EGL composting support when running LXQt on top of Kwin 5 (in native Plasma SystemSettings5 utility).

emerge --info
Portage 2.2.26 (python 3.4.3-final-0, default/linux/amd64/13.0/desktop/plasma/systemd, gcc-5.3.0, glibc-2.22-r1, 4.3.3-2-ARCH x86_64)
=================================================================
System uname: Linux-4.3.3-2-ARCH-x86_64-Intel-R-_Core-TM-_i7-4710HQ_CPU_@_2.50GHz-with-gentoo-2.2
KiB Mem:    32900836 total,    178912 free
KiB Swap:   33554428 total,  33554428 free
Timestamp of repository gentoo: Sat, 16 Jan 2016 23:30:01 +0000
sh bash 4.3_p42-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42-r1::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.22.1::gentoo
dev-lang/python:          2.7.10-r1::gentoo, 3.3.5-r2::gentoo, 3.4.3-r1::gentoo
dev-util/cmake:           3.4.1::gentoo
dev-util/pkgconfig:       0.29::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.20.2::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.10.3-r2::gentoo, 1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r1::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo, 5.3.0::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: --delete-excluded --exclude-from=/etc/portage/rsync_excludes

steam-overlay
    location: /var/lib/layman/steam-overlay
    masters: gentoo
    priority: 0

stuff
    location: /var/lib/layman/stuff
    masters: gentoo
    priority: 1

games-overlay
    location: /var/lib/layman/games-overlay
    masters: gentoo
    priority: 2

kde
    location: /var/lib/layman/kde
    masters: gentoo
    priority: 3

qt
    location: /var/lib/layman/qt
    masters: gentoo
    priority: 4

gentoo-zh
    location: /var/lib/layman/gentoo-zh
    masters: gentoo
    priority: 5

mrueg
    location: /var/lib/layman/mrueg
    masters: gentoo
    priority: 6

multimedia
    location: /var/lib/layman/multimedia
    masters: gentoo
    priority: 7

mva
    location: /var/lib/layman/mva
    masters: gentoo
    priority: 8

vapoursynth
    location: /var/lib/layman/vapoursynth
    masters: gentoo
    priority: 9

bobwya
    location: /usr/local/portage
    masters: gentoo
    priority: 10

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -fomit-frame-pointer -ftree-vectorize -pipe -march=native -mtune=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/conf.d /etc/init.d /usr/share/config /usr/share/config/kdm /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /usr/share/themes/oxygen-gtk/gtk-3.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/skel /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -fomit-frame-pointer -ftree-vectorize -pipe -march=native -mtune=native"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --jobs=8 --load-average=8  --quiet-build=y --quiet-fail=y --backtrack=0"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs compress-build-logs config-protect-if-modified distlocks fixlafiles merge-sync news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_GB.UTF-8"
LC_ALL="en_GB.UTF-8"
LDFLAGS="-O2 -fomit-frame-pointer -ftree-vectorize -pipe -march=native -mtune=native -Wl,--as-needed -Wl,-O1"
MAKEOPTS="-j8 -s"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--delete-excluded --exclude-from=/etc/portage/rsync_excludes"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/tmp"
USE="X a52 aac accessibility acl acpi aes aiglx aim alsa amd64 artswrappersuid audiofile avahi avx avx2 bash-completion bazaar berkdb bluetooth bluray btrfs bzip2 cairo cdda cddb cdio cdr cjk cli cman corefonts cracklib crypt css cups cxx dbus declarative djvu dri dts dv dvb dvd dvdnav dvdr dvdread dvi egl emboss encode exif f2fs faad fam fame fat ffmpeg firefox flac fma3 fontconfig freetype gcj gdbm gif git gles2 gmp gnutls go google-gadgets gphoto2 gpm gsm gtk hfs iconv icq icu imap infinality inotify ipod ipv4 ipv6 irc irda jabber jfs joystick jpeg jpeg2k kde kdeenablefinal kdehiddenvisibility keymap kipi kvm lame lcd lcms libnotify live lm_sensors lua lz4 lzma lzo mad mail matroska mercurial mjpeg mmx mmxext mng modules mozdevelop mp3 mp3rtp mp4 mpeg msn mtp multilib musepack musicbrainz ncurses networkmanager nfs nls nptl nsplugin ntfs nvidia offensive ogg openal opencl openexr opengl openmp osmesa pam pango pcmcia pcre pda pdf phonon plasma png policykit popcnt ppds pulseaudio python qml qt3support qt4 qt5 rar raw rdesjtio readline real reiserfs rss rtmp s3tc samba scanner sdl sdl2 seccomp semantic-desktop session sftp slp smp snmp speex spell sqlite sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 startup-notification stream subversion svg sysfs systemd taglib tcpd theora thumbnail tiff tk truetype type3 udev udisks unicode upcall upower usb v4l2 vcd vdpau visualization vorbis wayland webkit widgets wifi win32codecs wmf wxwidgets x264 x265 xattr xcb xcomposite xfs xinerama xml xpm xscreensaver xulrunner xv xvid xvmc xz yahoo zeroconf zlib" ABI_X86="32 64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="author braindump flow karbon kexi krita sheets stage words" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" DRACUT_MODULES="biosdevname systemd" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="emu multiboot pc emu multiboot pc" INPUT_DEVICES="synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="pdfimport" LINGUAS="en en_GB en_US" LIRC_DEVICES="audio audio_alsa pctv serial" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby20 ruby21 ruby22" SANE_BACKENDS="canon canon630u canon_dr canon_pp net pixma" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7 3.4"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 1 Bob Wya 2016-01-19 15:21:11 UTC
My Qt5 Toolkit Use flags:

equery l -f -F'=$cpv:$slot' '^dev-qt/.*$' | awk '{ if ($0 ~ "\:5$") printf("%s\0", $0) }' 2>/dev/null | xargs -0 emerge --color=n -pv 2>/dev/null


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

Calculating dependencies  ... done!
[ebuild   R   ~] dev-qt/qtcore-5.5.1:5::gentoo  USE="icu systemd -debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtxml-5.5.1:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtdbus-5.5.1:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtsql-5.5.1:5::gentoo  USE="sqlite -debug -freetds -mysql -oci8 -odbc -postgres {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qttest-5.5.1:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtconcurrent-5.5.1:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtpaths-5.5.1-r1:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtgui-5.5.1:5::gentoo  USE="accessibility dbus egl evdev gif gles2 jpeg png udev xcb -debug -eglfs -gtkstyle -ibus -libinput {-test} -tslib -tuio" 0 KiB
[ebuild   R   ~] dev-qt/qtnetwork-5.5.1:5::gentoo  USE="networkmanager ssl -bindist -connman -debug -libproxy {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qdbus-5.5.1-r1:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qdoc-5.5.1:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtwidgets-5.5.1-r1:5::gentoo  USE="gles2 png xcb -debug -gtkstyle {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtxmlpatterns-5.5.1-r1:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtimageformats-5.5.1-r1:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtx11extras-5.5.1:5::gentoo  USE="-debug {-test}" 33 KiB
[ebuild   R   ~] dev-qt/qtdeclarative-5.5.1-r1:5::gentoo  USE="gles2 jit widgets xml -debug -localstorage {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtopengl-5.5.1:5::gentoo  USE="gles2 -debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtprintsupport-5.5.1:5::gentoo  USE="cups gles2 -debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtscript-5.5.1-r1:5::gentoo  USE="jit scripttools -debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qthelp-5.5.1-r1:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtsvg-5.5.1-r1:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtpositioning-5.5.1-r1:5::gentoo  USE="qml -debug -geoclue {-test}" 0 KiB
[ebuild   R   ~] dev-qt/linguist-tools-5.5.1-r1:5::gentoo  USE="qml -debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtgraphicaleffects-5.5.1-r1:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtmultimedia-5.5.1-r1:5::gentoo  USE="alsa gles2 gstreamer openal pulseaudio qml widgets -debug -gstreamer010 {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtquickcontrols-5.5.1-r1:5::gentoo  USE="widgets -debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtwebkit-5.5.1-r1:5::gentoo  USE="geolocation gstreamer jit opengl qml -debug -gstreamer010 -multimedia -orientation -printsupport {-test} -webchannel -webp" 0 KiB
[ebuild   R   ~] dev-qt/designer-5.5.1-r1:5::gentoo  USE="declarative webkit -debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtquick1-5.5.1-r1:5::gentoo  USE="gles2 opengl webkit xml -debug -designer {-test}" 0 KiB

Total: 29 packages (29 reinstalls), Size of downloads: 33 KiB

 * IMPORTANT: 1 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.
Comment 2 Bob Wya 2016-01-20 20:01:51 UTC
By overriding the media-libs/mesa libGL.so library I've been able to:
start SDDM
launch an LXQt Session
Switch between GLX and EGL compositing
Get full GLX acceleration

I can launch a Plasma 5 Session as well but compositing remains disabled (all EGL and GLX settings are exposed in Systemsettings 5). However the session works and is totally usable and appears quite stable!! This is a big improvement!!

I guess that as some Plasma 5 components are still statically linked against some of the media-libs/mesa GL files:

equery -q d mesa
...
dev-qt/qtgui-5.5.1
...
kde-frameworks/plasma-5.18.0
kde-plasma/kinfocenter-5.5.3
kde-plasma/kwayland-5.5.3
kde-plasma/kwin-5.5.3
...

Causing the Plasma 5 Compositing to fail... I've tried rebuilding against the Nvidia supplied libraries - but there are some missing entry points in libGL.so.1 ...

The media-lib/mesa library GL files mask the Nvidia supplied GL files. The Qt5 Toolkit tries to use the mesa supplied versions = blank screen or very buggy EGL acceleration.
Comment 3 Bob Wya 2016-01-20 20:02:52 UTC
Overrided (media-libs/mesa > x11-drivers/nvidia-drivers) library file details (NB grep 'GL'):

/usr/lib64/
lrwxrwxrwx   1 root root    23 Jan 17 16:37 libEGL_nvidia.so -> libEGL_nvidia.so.361.18*
lrwxrwxrwx   1 root root    23 Jan 17 16:37 libEGL_nvidia.so.0 -> libEGL_nvidia.so.361.18*
lrwxrwxrwx   1 root root    52 Jan 17 16:40 libEGL_nvidia.so.361.18 -> /usr/lib64/opengl/nvidia/lib/libEGL_nvidia.so.361.18*
lrwxrwxrwx   1 root root    15 Jan 20 18:28 libEGL.so -> libEGL.so.1.0.0*
lrwxrwxrwx   1 root root    15 Jan 20 18:28 libEGL.so.1 -> libEGL.so.1.0.0*
lrwxrwxrwx   1 root root    40 Jan 20 18:50 libEGL.so.1.0.0 -> /usr/lib64/opengl/nvidia/lib/libEGL.so.1*
-rwxr-xr-x   1 root root  166K Jan 20 18:28 libEGL.so.1.0.0.bak*
lrwxrwxrwx   1 root root    26 Jan 17 16:57 libGLESv2_nvidia.so -> libGLESv2_nvidia.so.361.18*
lrwxrwxrwx   1 root root    26 Jan 17 16:57 libGLESv2_nvidia.so.2 -> libGLESv2_nvidia.so.361.18*
lrwxrwxrwx   1 root root    55 Jan 17 16:57 libGLESv2_nvidia.so.361.18 -> /usr/lib64/opengl/nvidia/lib/libGLESv2_nvidia.so.361.18*
lrwxrwxrwx   1 root root    19 Jan  7 10:01 libGLEWmx.so -> libGLEWmx.so.1.13.0*
lrwxrwxrwx   1 root root    19 Jan  7 10:01 libGLEWmx.so.1.13 -> libGLEWmx.so.1.13.0*
-rwxr-xr-x   1 root root  434K Jan  7 10:01 libGLEWmx.so.1.13.0*
lrwxrwxrwx   1 root root    17 Jan  7 10:01 libGLEW.so -> libGLEW.so.1.13.0*
lrwxrwxrwx   1 root root    17 Jan  7 10:01 libGLEW.so.1.13 -> libGLEW.so.1.13.0*
-rwxr-xr-x   1 root root  498K Jan  7 10:01 libGLEW.so.1.13.0*
lrwxrwxrwx   1 root root    14 Jan 20 18:28 libGL.so -> libGL.so.1.2.0*
lrwxrwxrwx   1 root root    14 Jan 20 18:28 libGL.so.1 -> libGL.so.1.2.0*
lrwxrwxrwx   1 root root    39 Jan 20 18:49 libGL.so.1.2.0 -> /usr/lib64/opengl/nvidia/lib/libGL.so.1*
-rwxr-xr-x   1 root root  597K Jan 20 18:28 libGL.so.1.2.0.bak*
lrwxrwxrwx   1 root root    15 Jan  7 10:04 libGLU.so -> libGLU.so.1.3.1*
lrwxrwxrwx   1 root root    15 Jan  7 10:04 libGLU.so.1 -> libGLU.so.1.3.1*
-rwxr-xr-x   1 root root  451K Jan  7 10:04 libGLU.so.1.3.1*
lrwxrwxrwx   1 root root    19 Jan  7 16:26 libQt5GLib-2.0.so -> libQt5GLib-2.0.so.0*
lrwxrwxrwx   1 root root    23 Jan  7 16:26 libQt5GLib-2.0.so.0 -> libQt5GLib-2.0.so.1.2.0*
-rwxr-xr-x   1 root root  133K Jan  7 16:26 libQt5GLib-2.0.so.1.2.0*
-rw-r--r--   1 root root  1.3M Jan 20 18:36 libQt5OpenGLExtensions.a
-rw-r--r--   1 root root  1011 Jan 20 18:36 libQt5OpenGLExtensions.prl
-rw-r--r--   1 root root   996 Jan 20 18:38 libQt5OpenGL.prl
lrwxrwxrwx   1 root root    21 Jan 20 18:38 libQt5OpenGL.so -> libQt5OpenGL.so.5.5.1*
lrwxrwxrwx   1 root root    21 Jan 20 18:38 libQt5OpenGL.so.5 -> libQt5OpenGL.so.5.5.1*
lrwxrwxrwx   1 root root    21 Jan 20 18:38 libQt5OpenGL.so.5.5 -> libQt5OpenGL.so.5.5.1*
-rwxr-xr-x   1 root root  356K Jan 20 18:38 libQt5OpenGL.so.5.5.1*
lrwxrwxrwx   1 root root    18 Jan  7 16:26 libQtGLib-2.0.so -> libQtGLib-2.0.so.0*
lrwxrwxrwx   1 root root    22 Jan  7 16:26 libQtGLib-2.0.so.0 -> libQtGLib-2.0.so.1.2.0*
-rwxr-xr-x   1 root root  133K Jan  7 16:26 libQtGLib-2.0.so.1.2.0*

/usr/lib32/
lrwxrwxrwx  1 root root    23 Jan 17 16:40 libEGL_nvidia.so -> libEGL_nvidia.so.361.18*
lrwxrwxrwx  1 root root    23 Jan 17 16:40 libEGL_nvidia.so.0 -> libEGL_nvidia.so.361.18*
lrwxrwxrwx  1 root root    52 Jan 17 16:40 libEGL_nvidia.so.361.18 -> /usr/lib32/opengl/nvidia/lib/libEGL_nvidia.so.361.18*
lrwxrwxrwx  1 root root    15 Jan 20 18:28 libEGL.so -> libEGL.so.1.0.0*
lrwxrwxrwx  1 root root    15 Jan 20 18:28 libEGL.so.1 -> libEGL.so.1.0.0*
lrwxrwxrwx  1 root root    40 Jan 20 18:52 libEGL.so.1.0.0 -> /usr/lib32/opengl/nvidia/lib/libEGL.so.1*
-rwxr-xr-x  1 root root  180K Jan 20 18:28 libEGL.so.1.0.0.bak*
lrwxrwxrwx  1 root root    26 Jan 17 16:55 libGLESv2_nvidia.so -> libGLESv2_nvidia.so.361.18*
lrwxrwxrwx  1 root root    26 Jan 17 16:55 libGLESv2_nvidia.so.2 -> libGLESv2_nvidia.so.361.18*
lrwxrwxrwx  1 root root    55 Jan 17 16:55 libGLESv2_nvidia.so.361.18 -> /usr/lib32/opengl/nvidia/lib/libGLESv2_nvidia.so.361.18*
lrwxrwxrwx  1 root root    19 Jan  7 10:01 libGLEWmx.so -> libGLEWmx.so.1.13.0*
lrwxrwxrwx  1 root root    19 Jan  7 10:01 libGLEWmx.so.1.13 -> libGLEWmx.so.1.13.0*
-rwxr-xr-x  1 root root  374K Jan  7 10:01 libGLEWmx.so.1.13.0*
lrwxrwxrwx  1 root root    17 Jan  7 10:01 libGLEW.so -> libGLEW.so.1.13.0*
lrwxrwxrwx  1 root root    17 Jan  7 10:01 libGLEW.so.1.13 -> libGLEW.so.1.13.0*
-rwxr-xr-x  1 root root  422K Jan  7 10:01 libGLEW.so.1.13.0*
lrwxrwxrwx  1 root root    14 Jan 20 18:28 libGL.so -> libGL.so.1.2.0*
lrwxrwxrwx  1 root root    14 Jan 20 18:28 libGL.so.1 -> libGL.so.1.2.0*
lrwxrwxrwx  1 root root    39 Jan 20 18:52 libGL.so.1.2.0 -> /usr/lib32/opengl/nvidia/lib/libGL.so.1*
-rwxr-xr-x  1 root root  662K Jan 20 18:28 libGL.so.1.2.0.bak*
lrwxrwxrwx  1 root root    15 Jan  7 10:04 libGLU.so -> libGLU.so.1.3.1*
lrwxrwxrwx  1 root root    15 Jan  7 10:04 libGLU.so.1 -> libGLU.so.1.3.1*
-rwxr-xr-x  1 root root  486K Jan  7 10:04 libGLU.so.1.3.1*
Comment 4 Bob Wya 2016-01-21 18:08:56 UTC
A more elegant (cough) - but still horrible hack to get GLX support back is to globally override the default library paths. For example by creating a duplicate of the eselect opengl env file:

/etc/env.d/000gl
LD_LIBRARY_PATH="/usr/lib32/opengl/nvidia/lib:/usr/lib64/opengl/nvidia/lib"

As before this results in working Plasma 5 Session - but without full compositing support. A LXQt Session - running a top KWin 5 - has full compositing support.

The Nvidia libraries are being dynamically loaded in preference to the Mesa supplied ones...

ldd /usr/lib/libQt5Gui.so.5.5.1 | grep GL
        libGL.so.1 => /usr/lib64/opengl/nvidia/lib/libGL.so.1 (0x00007fc0f86d6000)
        libGLX.so.0 => /usr/lib64/opengl/nvidia/lib/libGLX.so.0 (0x00007fc0f5f29000)
        libGLdispatch.so.0 => /usr/lib64/opengl/nvidia/lib/libGLdispatch.so.0 (0x00007fc0f5c1a000)

ldd /usr/bin/kwin_x11 | grep GL
        libGL.so.1 => /usr/lib64/opengl/nvidia/lib/libGL.so.1 (0x00007f61308a8000)
        libEGL.so.1 => /usr/lib64/opengl/nvidia/lib/libEGL.so.1 (0x00007f612ceaf000)
        libGLX.so.0 => /usr/lib64/opengl/nvidia/lib/libGLX.so.0 (0x00007f612af84000)
        libGLdispatch.so.0 => /usr/lib64/opengl/nvidia/lib/libGLdispatch.so.0 (0x00007f612ac76000)
Comment 5 Michael Palimaka (kensington) gentoo-dev 2016-01-22 11:55:54 UTC
Could you please add the output of 'eselect opengl list' and 'eselect mesa list'?
Comment 6 Bob Wya 2016-01-22 14:13:52 UTC
(In reply to Michael Palimaka (kensington) from comment #5)
> Could you please add the output of 'eselect opengl list' and 'eselect mesa
> list'?

eselect opengl list

Available OpenGL implementations:
  [1]   nvidia *
  [2]   xorg-x11

eselect mesa list

64bit i915 (Intel 915, 945)
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 *
32bit i915 (Intel 915, 945)
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 *
Comment 7 Michael Palimaka (kensington) gentoo-dev 2016-01-22 19:08:38 UTC
@x11, any ideas why this might happen?
Comment 8 Oleh 2016-01-22 20:18:49 UTC
so, what is happening is that libGL.so, libEGL.so, libGLESv2.so are coming from mesa. This probably always was so and that's the major problem with proprietary drivers. What should be in reality is (assuming 64 bit):

/usr/lib64/opengl/nvidia/lib/libEGL.so -> /usr/lib64/libEGL.so
/usr/lib64/opengl/nvidia/lib/libGL.so -> /usr/lib64/libGL.so
/usr/lib64/opengl/nvidia/lib/libGLESv2.so -> /usr/lib64/libGLESv2.so

A new eselect opengl implementation, perhaps, (...in theory) had to deal with that but apparently it doesn't. This is not kde problem.
Comment 9 Bob Wya 2016-01-23 10:29:35 UTC
I've got a working solution now. Finally a Plasma 5 composited desktop - with OpenGL 3.1 GLX acceleration. Basically I just copied most of the library layout that Arch Linux uses (as this is a known working solution - on my system).

The applications / utilities I changed were:

media-libs/mesa
(don't pollute /usr/lib{32,64} with GL libraries - I stuck the GL lib files in /usr/lib{32,64}/opengl/mesa/lib)

x11-drivers/nvidia
(put nvidia specific libraries in /usr/lib{32,64} - non shared GL libraries)

app-eselect/eselect-opengl
(now switches symbolic links - in /usr/lib{32,64} - on my system this is between x11-drivers/nvidia & media-libs/mesa GL libraries - but will handle other OpenGL providers as before)

The script changes to eselect-opengl are currently a bit of hack - but they work OK!! I'll post some patches once I've woken up (yet another late night hacking on this issue!!)

I'll also add (-r) revision bumps to the packages and put them in my Overlay (bobwya) for folk to test out...
Comment 10 Bob Wya 2016-01-23 10:30:28 UTC
I had to rebuild all my:

dev-qt/*:5
kde-frameworks/*
kde-plasma/*

packages against the new lib setup to get compositing to work on a Plasma 5 session.
Comment 11 Oleh 2016-01-23 12:30:42 UTC
(In reply to Bob Wya from comment #9)
> I've got a working solution now. Finally a Plasma 5 composited desktop -
> with OpenGL 3.1 GLX acceleration. Basically I just copied most of the
> library layout that Arch Linux uses (as this is a known working solution -
> on my system).
> 
> The applications / utilities I changed were:
> 
> media-libs/mesa
> (don't pollute /usr/lib{32,64} with GL libraries - I stuck the GL lib files
> in /usr/lib{32,64}/opengl/mesa/lib)
> 
> x11-drivers/nvidia
> (put nvidia specific libraries in /usr/lib{32,64} - non shared GL libraries)
> 
> app-eselect/eselect-opengl
> (now switches symbolic links - in /usr/lib{32,64} - on my system this is
> between x11-drivers/nvidia & media-libs/mesa GL libraries - but will handle
> other OpenGL providers as before)
> 
> The script changes to eselect-opengl are currently a bit of hack - but they
> work OK!! I'll post some patches once I've woken up (yet another late night
> hacking on this issue!!)
> 
> I'll also add (-r) revision bumps to the packages and put them in my Overlay
> (bobwya) for folk to test out...

it would good to have the patches attached or link to overlay added
Comment 12 Bob Wya 2016-01-23 12:44:43 UTC
(In reply to Oleg from comment #11)
> 
> it would good to have the patches attached or link to overlay added

Uhmmm, sure I'm just tidying things up - so that people can access all the nvidia-driver / mesa versions in the Gentoo tree. I've only just got my system working this morning after all... I just wanted to let the "Gentoo Development team" know that this bug/issue is definitely one of the major blockers for a working Plasma 5 desktop!!
Comment 13 Oleh 2016-01-23 13:03:27 UTC
its hardly specific to Plasma 5. it's what never worked right with proprietary drivers. GL, EGL (and others) libs have to be from a driver not mesa but on the other hand there should be a way to switch them on runtime, is what claimed added in new opengl eselect module but this report reveals it never actually added.
Comment 14 Bob Wya 2016-01-24 04:52:31 UTC
Created attachment 423738 [details, diff]
eselect-opengl-1.3.1-fix-gl-provider-lib-support.patch

Patch to correct operation of eselect-opengl.
Now also adds/switches GL lib symlinks from /usr/lib{32,64}/ to /usr/lib{32,64}/opengl/*/lib/

Must be used with patched media-libs/mesa version which does not polute /usr/lib{32,64} with GL libs.
Comment 15 Bob Wya 2016-01-24 04:54:50 UTC
Created attachment 423740 [details, diff]
media-libs/mesa-11.1.1.ebuild.patch

Patch against =media-libs/mesa-11.1.1.ebuild which stops the package from polluting /usr/lib{32,64}/ with GL libs.
Comment 16 Bob Wya 2016-01-24 05:03:20 UTC
I've added patched copies of:

media-libs/mesa::bobwya
app-eselect/eselect-opengl::bobwya

to my Layman Overlay.

I've dropped support for <media-libs/mesa-11.0.0 - as older versions used the older app-eselect/eselect-opengl API anyway.
( Plus I only want totally clean packages in my Overlay - with no repoman complaints :-)

To test I would recommend (at minimum) rebuilding all packages directly dependent on media-libs/mesa - on a given system.
Comment 17 Bob Wya 2016-01-24 05:07:55 UTC
My testing and working dev-qt/*:5 USE flags:


Calculating dependencies  ... done!
[ebuild   R   ~] dev-qt/qtcore-5.5.1:5::gentoo  USE="icu systemd -debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtxml-5.5.1:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtdbus-5.5.1:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtsql-5.5.1:5::gentoo  USE="sqlite -debug -freetds -mysql -oci8 -odbc -postgres {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qttest-5.5.1:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtconcurrent-5.5.1:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtpaths-5.5.1-r1:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtgui-5.5.1:5::gentoo  USE="accessibility dbus evdev gif jpeg png udev xcb -debug -egl -eglfs -gles2 -gtkstyle -ibus -libinput {-test} -tslib -tuio" 0 KiB
[ebuild   R   ~] dev-qt/qtnetwork-5.5.1:5::gentoo  USE="networkmanager ssl -bindist -connman -debug -libproxy {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qdbus-5.5.1-r1:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qdoc-5.5.1:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtwidgets-5.5.1-r1:5::gentoo  USE="png xcb -debug -gles2 -gtkstyle {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtxmlpatterns-5.5.1-r1:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtimageformats-5.5.1-r1:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtx11extras-5.5.1:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtdeclarative-5.5.1-r1:5::gentoo  USE="jit widgets xml -debug -gles2 -localstorage {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtopengl-5.5.1:5::gentoo  USE="-debug -gles2 {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtprintsupport-5.5.1:5::gentoo  USE="cups -debug -gles2 {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtscript-5.5.1-r1:5::gentoo  USE="jit scripttools -debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qthelp-5.5.1-r1:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtsvg-5.5.1-r1:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtpositioning-5.5.1-r1:5::gentoo  USE="qml -debug -geoclue {-test}" 0 KiB
[ebuild   R   ~] dev-qt/linguist-tools-5.5.1-r1:5::gentoo  USE="qml -debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtgraphicaleffects-5.5.1-r1:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtmultimedia-5.5.1-r1:5::gentoo  USE="alsa gstreamer openal pulseaudio qml widgets -debug -gles2 -gstreamer010 {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtquickcontrols-5.5.1-r1:5::gentoo  USE="widgets -debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtwebkit-5.5.1-r1:5::gentoo  USE="geolocation gstreamer jit opengl qml -debug -gstreamer010 -multimedia -orientation -printsupport {-test} -webchannel -webp" 0 KiB
[ebuild   R   ~] dev-qt/designer-5.5.1-r1:5::gentoo  USE="declarative webkit -debug {-test}" 0 KiB
[ebuild   R   ~] dev-qt/qtquick1-5.5.1-r1:5::gentoo  USE="opengl webkit xml -debug -designer -gles2 {-test}" 0 KiB


My testing and working kde-plasma/* USE flags:

Calculating dependencies  ... done!
[ebuild   R   ~] kde-plasma/kde-cli-tools-5.5.3:5::gentoo  USE="X handbook kdesu -debug {-test}" 0 KiB
[ebuild   R   ~] kde-plasma/kwayland-5.5.3:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] kde-plasma/kdecoration-5.5.3:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] kde-plasma/libkscreen-5.5.3:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] kde-plasma/libksysguard-5.5.3:5::gentoo  USE="X detailedmemory -debug {-test}" 0 KiB
[ebuild   R   ~] kde-plasma/milou-5.5.3:5::gentoo  USE="-debug" 0 KiB
[ebuild   R   ~] kde-plasma/plasma-pa-5.5.3:5::gentoo  USE="-debug" 0 KiB
[ebuild   R   ~] kde-plasma/breeze-gtk-5.5.3:5::gentoo  USE="-debug" 0 KiB
[ebuild   R   ~] kde-plasma/kgamma-5.5.3:5::gentoo  USE="handbook -debug" 0 KiB
[ebuild   R   ~] kde-plasma/kwrited-5.5.3:5::gentoo  USE="-debug" 0 KiB
[ebuild   R   ~] kde-plasma/oxygen-fonts-5.4.3:5::gentoo  USE="X" 0 KiB
[ebuild   R   ~] kde-plasma/plasma-sdk-5.5.3:5::gentoo  USE="-debug {-test}" 0 KiB
[ebuild   R   ~] kde-plasma/polkit-kde-agent-5.5.3:5::gentoo  USE="-debug" 0 KiB
[ebuild   R   ~] kde-plasma/user-manager-5.5.3:5::gentoo  USE="-debug" 0 KiB
[ebuild   R   ~] kde-plasma/kscreenlocker-5.5.3:5::gentoo  USE="pam -debug {-test}" 0 KiB
[ebuild   R   ~] kde-plasma/breeze-5.5.3:5::gentoo  USE="qt4 -debug" 0 KiB
[ebuild   R   ~] kde-plasma/kde-gtk-config-5.5.3:5::gentoo  USE="gtk3 -debug {-test}" 0 KiB
[ebuild   R   ~] kde-plasma/ksysguard-5.5.3:5::gentoo  USE="handbook lm_sensors -debug" 0 KiB
[ebuild   R   ~] kde-plasma/oxygen-5.5.3:5::gentoo  USE="-debug" 0 KiB
[ebuild   R   ~] kde-plasma/bluedevil-5.5.3:5::gentoo  USE="-debug" 0 KiB
[ebuild   R   ~] kde-plasma/khelpcenter-5.5.3:5::gentoo  USE="handbook -debug" 0 KiB
[ebuild   R   ~] kde-plasma/kinfocenter-5.5.3:5::gentoo  USE="X egl handbook nfs opengl pci samba -debug -gles -ieee1394 -wayland" 0 KiB
[ebuild   R   ~] kde-plasma/kscreen-5.5.3:5::gentoo  USE="-debug" 0 KiB
[ebuild   R   ~] kde-plasma/kwallet-pam-5.5.3:5::gentoo  USE="-debug" 0 KiB
[ebuild   R   ~] kde-plasma/sddm-kcm-5.5.3:5::gentoo  USE="-debug" 0 KiB
[ebuild   R   ~] kde-plasma/kwin-5.5.3:5::gentoo  USE="handbook multimedia -debug -gles2 {-test}" 0 KiB
[ebuild   R   ~] kde-plasma/systemsettings-5.5.3:5::gentoo  USE="gtk handbook -classic -debug" 0 KiB
[ebuild   R   ~] kde-plasma/plasma-workspace-5.5.3:5::gentoo  USE="dbus geolocation handbook -debug -gps (-prison) -qalculate {-test}" 0 KiB
[ebuild   R   ~] kde-plasma/khotkeys-5.5.3:5::gentoo  USE="handbook -debug" 0 KiB
[ebuild   R   ~] kde-plasma/kdeplasma-addons-5.5.3:5::gentoo  USE="-debug -ibus -scim" 0 KiB
[ebuild   R   ~] kde-plasma/plasma-desktop-5.5.3:5::gentoo  USE="evdev fontconfig handbook pulseaudio qt4 -debug -gtk2 -gtk3 -legacy-systray {-test} -touchpad" 0 KiB
[ebuild   R   ~] kde-plasma/plasma-mediacenter-5.5.3:5::gentoo  USE="semantic-desktop -debug" 0 KiB
[ebuild   R   ~] kde-plasma/plasma-nm-5.5.3:5::gentoo  USE="-debug -modemmanager -openconnect -teamd" 0 KiB
[ebuild   R   ~] kde-plasma/powerdevil-5.5.3:5::gentoo  USE="handbook systemd -debug" 0 KiB
[ebuild   R   ~] kde-plasma/kmenuedit-5.5.3:5::gentoo  USE="handbook hotkeys -debug" 0 KiB
Comment 18 Rich Gannon 2016-01-26 01:47:03 UTC
I can confirm that both the eselect-opengl patch and mesa patch do handle the correct selection of OpenGL libraries and when packages are rebuilt against these two changes, OpenGL works correctly with nvidia-drivers.  Previous to this fix, if the nvidia opengl was selected in eselect, X would be a blank screen after exhausting options.

Currently using:
x11-drivers/nvidia-drivers-352.63
media-libs/mesa-11.0.6-r1 (patched above)
app-eselect/eselect-opengl-1.3.1-r5 (patched above)
NVidia GTX 660
Comment 19 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-01-28 11:02:21 UTC
For someone who can reproduce the issue (and didn't alter his system with incorrect patches), we need:

- /etc/X11/xorg.conf*
- /var/log/Xorg.0.log or equiv
- output of /sbin/ldconfig -p | grep GL
Comment 20 Oleh 2016-01-29 12:18:03 UTC
here it is:
oleg2 / # eselect opengl set 2
Switching to xorg-x11 OpenGL interface... done
oleg2 / # /sbin/ldconfig -p | grep GL
        libQt5OpenGL.so.5 (libc6,x86-64) => /usr/lib64/libQt5OpenGL.so.5
        libQt5OpenGL.so (libc6,x86-64) => /usr/lib64/libQt5OpenGL.so
        libGLU.so.1 (libc6,x86-64) => /usr/lib64/libGLU.so.1
        libGLU.so.1 (libc6) => /usr/lib32/libGLU.so.1
        libGLU.so (libc6,x86-64) => /usr/lib64/libGLU.so
        libGLU.so (libc6) => /usr/lib32/libGLU.so
        libGLEWmx.so.1.13 (libc6,x86-64) => /usr/lib64/libGLEWmx.so.1.13
        libGLEWmx.so (libc6,x86-64) => /usr/lib64/libGLEWmx.so
        libGLEW.so.1.13 (libc6,x86-64) => /usr/lib64/libGLEW.so.1.13
        libGLEW.so (libc6,x86-64) => /usr/lib64/libGLEW.so
        libGLESv2.so.2 (libc6,x86-64) => /usr/lib64/libGLESv2.so.2
        libGLESv2.so.2 (libc6) => /usr/lib32/libGLESv2.so.2
        libGLESv2.so (libc6,x86-64) => /usr/lib64/libGLESv2.so
        libGLESv2.so (libc6) => /usr/lib32/libGLESv2.so
        libGL.so.1 (libc6,x86-64) => /usr/lib64/libGL.so.1
        libGL.so.1 (libc6) => /usr/lib32/libGL.so.1
        libGL.so (libc6,x86-64) => /usr/lib64/libGL.so
        libGL.so (libc6) => /usr/lib32/libGL.so
        libEGL.so.1 (libc6,x86-64) => /usr/lib64/libEGL.so.1
        libEGL.so.1 (libc6) => /usr/lib32/libEGL.so.1
        libEGL.so (libc6,x86-64) => /usr/lib64/libEGL.so
        libEGL.so (libc6) => /usr/lib32/libEGL.so
oleg2 / # cat /etc/env.d/000opengl 
# Configuration file for eselect
# This file has been automatically generated.
LDPATH=""
OPENGL_PROFILE="xorg-x11"
oleg2 / #

oleg2 / # eselect opengl set 1
Switching to nvidia OpenGL interface... done
oleg2 / #

oleg2 / # /sbin/ldconfig -p | grep GL
        libQt5OpenGL.so.5 (libc6,x86-64) => /usr/lib64/libQt5OpenGL.so.5
	libQt5OpenGL.so (libc6,x86-64) => /usr/lib64/libQt5OpenGL.so
	libOpenGL.so.0 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libOpenGL.so.0
	libOpenGL.so.0 (libc6) => /usr/lib32/opengl/nvidia/lib/libOpenGL.so.0
	libOpenGL.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libOpenGL.so
	libOpenGL.so (libc6) => /usr/lib32/opengl/nvidia/lib/libOpenGL.so
	libGLdispatch.so.0 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLdispatch.so.0
	libGLdispatch.so.0 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLdispatch.so.0
	libGLdispatch.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLdispatch.so
	libGLdispatch.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLdispatch.so
	libGLX_nvidia.so.0 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLX_nvidia.so.0
	libGLX_nvidia.so.0 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLX_nvidia.so.0
	libGLX_nvidia.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLX_nvidia.so
	libGLX_nvidia.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLX_nvidia.so
	libGLX.so.0 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLX.so.0
	libGLX.so.0 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLX.so.0
	libGLX.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLX.so
	libGLX.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLX.so
	libGLU.so.1 (libc6,x86-64) => /usr/lib64/libGLU.so.1
	libGLU.so.1 (libc6) => /usr/lib32/libGLU.so.1
	libGLU.so (libc6,x86-64) => /usr/lib64/libGLU.so
	libGLU.so (libc6) => /usr/lib32/libGLU.so
	libGLEWmx.so.1.13 (libc6,x86-64) => /usr/lib64/libGLEWmx.so.1.13
	libGLEWmx.so (libc6,x86-64) => /usr/lib64/libGLEWmx.so
	libGLEW.so.1.13 (libc6,x86-64) => /usr/lib64/libGLEW.so.1.13
	libGLEW.so (libc6,x86-64) => /usr/lib64/libGLEW.so
	libGLESv2_nvidia.so.2 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv2_nvidia.so.2
	libGLESv2_nvidia.so.2 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv2_nvidia.so.2
	libGLESv2_nvidia.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv2_nvidia.so
	libGLESv2_nvidia.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv2_nvidia.so
	libGLESv2.so.2 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv2.so.2
	libGLESv2.so.2 (libc6,x86-64) => /usr/lib64/libGLESv2.so.2
	libGLESv2.so.2 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv2.so.2
	libGLESv2.so.2 (libc6) => /usr/lib32/libGLESv2.so.2
	libGLESv2.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv2.so
	libGLESv2.so (libc6,x86-64) => /usr/lib64/libGLESv2.so
	libGLESv2.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv2.so
	libGLESv2.so (libc6) => /usr/lib32/libGLESv2.so
	libGLESv1_CM.so.1 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv1_CM.so.1
	libGLESv1_CM.so.1 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv1_CM.so.1
	libGLESv1_CM.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv1_CM.so
	libGLESv1_CM.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv1_CM.so
	libGL.so.1 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGL.so.1
	libGL.so.1 (libc6,x86-64) => /usr/lib64/libGL.so.1
	libGL.so.1 (libc6) => /usr/lib32/opengl/nvidia/lib/libGL.so.1
	libGL.so.1 (libc6) => /usr/lib32/libGL.so.1
	libGL.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGL.so
	libGL.so (libc6,x86-64) => /usr/lib64/libGL.so
	libGL.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGL.so
	libGL.so (libc6) => /usr/lib32/libGL.so
	libEGL_nvidia.so.0 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libEGL_nvidia.so.0
	libEGL_nvidia.so.0 (libc6) => /usr/lib32/opengl/nvidia/lib/libEGL_nvidia.so.0
	libEGL_nvidia.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libEGL_nvidia.so
	libEGL_nvidia.so (libc6) => /usr/lib32/opengl/nvidia/lib/libEGL_nvidia.so
	libEGL.so.1 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libEGL.so.1
	libEGL.so.1 (libc6,x86-64) => /usr/lib64/libEGL.so.1
	libEGL.so.1 (libc6) => /usr/lib32/opengl/nvidia/lib/libEGL.so.1
	libEGL.so.1 (libc6) => /usr/lib32/libEGL.so.1
	libEGL.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libEGL.so
	libEGL.so (libc6,x86-64) => /usr/lib64/libEGL.so
	libEGL.so (libc6) => /usr/lib32/opengl/nvidia/lib/libEGL.so
	libEGL.so (libc6) => /usr/lib32/libEGL.so

oleg2 / # cat /etc/env.d/000opengl 
# Configuration file for eselect
# This file has been automatically generated.
LDPATH="/usr/lib32/opengl/nvidia/lib:/usr/lib64/opengl/nvidia/lib"
OPENGL_PROFILE="nvidia"
oleg2 / #
Comment 21 Oleh 2016-01-29 12:24:48 UTC
so, what it does is just using env.d and LDPATH and this is bad design. Because now GL* libs and symlinks are doubled: i.e mesa ones and nvidia used at the same time. Good design is: GL* libs that coming from nvidia should replace mesa ones. esect opengl modules should be rewritten to work properly and not relying on hacking environment in env.d. I attaching a CRUX gl-select file as a prototype on how this things should work. It does hard replacements of symlinks
Comment 22 Oleh 2016-01-29 12:25:24 UTC
Created attachment 424150 [details]
crux example of GL* select
Comment 23 Bob Wya 2016-01-29 13:18:27 UTC
Of all the distibutions I have installed on my laptop (Fedora 23, Ubuntu Mate 15.10, Arch, OpenSUSE Tumbleweed)...

NO OTHER DISTRIBUTION pollutes /usr/lib{32,64} with the main GL mesa libraries. 
So to continue the trend of using pointlessly "emotive" language... Gentoo's current eselect solution is INCORRECT!!
Comment 24 Bob Wya 2016-01-29 13:18:52 UTC
I had a poke around in the Debian configuration for switching libraries...
Not too shabby!! The ld.conf switching files are contained in the directory structure of the associated 


For Debian /etc/ld.so.conf.d/ :

GL (32-bit) switch...

i386-linux-gnu_GL.conf -> /etc/alternatives/i386-linux-gnu_gl_conf -> "/usr/lib/nvidia-358/alt_ld.so.conf"

""

GL (64-bit) switch...

x86_64-linux-gnu_GL.conf -> /etc/alternatives/x86_64-linux-gnu_gl_conf -> /usr/lib/nvidia-358/ld.so.conf
"/usr/lib/nvidia-358
/usr/lib32/nvidia-358"

EGL switch...

x86_64-linux-gnu_EGL.conf -> /etc/alternatives/x86_64-linux-gnu_egl_conf
-> /usr/lib/x86_64-linux-gnu/mesa-egl/ld.so.conf
"/usr/lib/x86_64-linux-gnu/mesa-egl"
Comment 25 Bob Wya 2016-01-29 13:19:16 UTC
* package...
Comment 26 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-01-29 14:16:01 UTC
I would appreciate if you saved your comments and 'correct solutions' to yourselves, and sticked to the facts. This bug does not need any more irrelevant tales or useless suggestions. Unless your goal is to prevent us from fixing the issue at hand.

The results pasted by Oleg indicate that the correct library is being used. However, I still need to see Xorg logs to know whether the correct Xorg extensions are being loaded.
Comment 27 Oleh 2016-01-29 15:22:25 UTC
(In reply to Michał Górny from comment #26)
> I would appreciate if you saved your comments and 'correct solutions' to
> yourselves, and sticked to the facts. This bug does not need any more
> irrelevant tales or useless suggestions. Unless your goal is to prevent us
> from fixing the issue at hand.
> 
> The results pasted by Oleg indicate that the correct library is being used.
> However, I still need to see Xorg logs to know whether the correct Xorg
> extensions are being loaded.

the result shows that both libs (mesa and nvidia) used, just in case you need a magnifying glass. It should use only nvidia libs and symlinks when nvidia opengl set. It should use only libs from fglrx in case ati opengl set or it should use only xorg (mesa) libs in the other cases. Sticking with env.d is a wrong approach, the fact is eselect opengl (a *new design*) is just plain broken, don't defend your crap implementations.
Comment 28 Justin Lecher (RETIRED) gentoo-dev 2016-01-30 11:37:50 UTC
To all reporters, thank you for your input. Please bare in mind, that your workarounds or solution might be working, but not technically the best solution. I am not technically an expert on that matter, but your patches seem to resemble the old unwanted behavior of the opengl eselect system.

Please provide any information request by Gentoo developers which are experts on that matter, so that they can sort out a solution which tackles the real underlying problem.

Thank you for your cooperation.
Comment 29 Christian Ruppert (idl0r) gentoo-dev 2016-02-08 19:19:05 UTC
I also have issues since the upgrade(s), in my case it's Steam:
% LIBGL_DEBUG=verbose ./steam
...
libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/lib32/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib32/dri/swrast_dri.so
libGL: Can't open configuration file /home/idl0r/.drirc: No such file or directory.
libGL: Can't open configuration file /home/idl0r/.drirc: No such file or directory.
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast


Using:
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib32/opengl/nvidia/lib" ./steam
Works for me. If you need any other info just let me know.
Comment 30 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-02-08 20:55:27 UTC
steam is bug #531990 which was worked around in Gentoo and reported upstream.
Comment 31 Bob Wya 2016-02-12 12:04:26 UTC
Created attachment 425290 [details]
/var/log/Xorg.0.log

(In reply to Justin Lecher from comment #28)

> Please provide any information request by Gentoo developers which are
> experts on that matter, so that they can sort out a solution which tackles
> the real underlying problem.
> 
> Thank you for your cooperation.

Well said... So OK, but sometimes experts have to listen to mere mortals!! :-). I reverted all my modifications to the GL libraries and used the stock ebuilds for media-libs/mesa and app-eselect/opengl... I've posted the requested files, log and linker information.


- /etc/X11/xorg.conf* ...

/etc/X11/xorg.conf.d/00-keyboard.conf:
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "gb"
EndSection

/etc/X11/xorg.conf.d/10-nvidia.conf:
Section "Device"                                                                                                                                                                                                                             
    Identifier     "nvidia"                                                                                                                                                                                                                  
    Driver         "nvidia"                                                                                                                                                                                                                  
    VendorName     "NVIDIA Corporation"                                                                                                                                                                                                      
    BoardName      "GeForce GTX 970M"                                                                                                                                                                                                        
    Option          "TripleBuffer"      "True"                                                                                                                                                                                               
EndSection 

/etc/X11/xorg.conf.d/20opengl.conf:
Section "Files"                                                                                                                                                                                                                              
        ModulePath "/usr/lib32/xorg/modules"                                                                                                                                                                                                 
        ModulePath "/usr/lib64/opengl/nvidia"                                                                                                                                                                                                
        ModulePath "/usr/lib64/xorg/modules"                                                                                                                                                                                                 
EndSection



- /var/log/Xorg.0.log  (see attached)
Comment 32 Bob Wya 2016-02-12 12:06:15 UTC
- output of /sbin/ldconfig -p | grep GL

	libQt5OpenGL.so.5 (libc6,x86-64) => /usr/lib64/libQt5OpenGL.so.5
	libQt5OpenGL.so (libc6,x86-64) => /usr/lib64/libQt5OpenGL.so
	libQt5GLib-2.0.so.0 (libc6,x86-64) => /usr/lib64/libQt5GLib-2.0.so.0
	libQt5GLib-2.0.so (libc6,x86-64) => /usr/lib64/libQt5GLib-2.0.so
	libQtOpenGL.so.4 (libc6,x86-64) => /usr/lib64/qt4/libQtOpenGL.so.4
	libQtOpenGL.so.4 (libc6) => /usr/lib32/qt4/libQtOpenGL.so.4
	libQtOpenGL.so (libc6,x86-64) => /usr/lib64/qt4/libQtOpenGL.so
	libQtOpenGL.so (libc6) => /usr/lib32/qt4/libQtOpenGL.so
	libQtGLib-2.0.so.0 (libc6,x86-64) => /usr/lib64/libQtGLib-2.0.so.0
	libQtGLib-2.0.so (libc6,x86-64) => /usr/lib64/libQtGLib-2.0.so
	libOpenGL.so.0 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libOpenGL.so.0
	libOpenGL.so.0 (libc6) => /usr/lib32/opengl/nvidia/lib/libOpenGL.so.0
	libOpenGL.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libOpenGL.so
	libOpenGL.so (libc6) => /usr/lib32/opengl/nvidia/lib/libOpenGL.so
	libGLdispatch.so.0 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLdispatch.so.0
	libGLdispatch.so.0 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLdispatch.so.0
	libGLdispatch.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLdispatch.so
	libGLdispatch.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLdispatch.so
	libGLX_nvidia.so.0 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLX_nvidia.so.0
	libGLX_nvidia.so.0 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLX_nvidia.so.0
	libGLX_nvidia.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLX_nvidia.so
	libGLX_nvidia.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLX_nvidia.so
	libGLX.so.0 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLX.so.0
	libGLX.so.0 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLX.so.0
	libGLX.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLX.so
	libGLX.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLX.so
	libGLU.so.1 (libc6,x86-64) => /usr/lib64/libGLU.so.1
	libGLU.so.1 (libc6) => /usr/lib32/libGLU.so.1
	libGLU.so (libc6,x86-64) => /usr/lib64/libGLU.so
	libGLU.so (libc6) => /usr/lib32/libGLU.so
	libGLEWmx.so.1.13 (libc6,x86-64) => /usr/lib64/libGLEWmx.so.1.13
	libGLEWmx.so.1.13 (libc6) => /usr/lib32/libGLEWmx.so.1.13
	libGLEWmx.so (libc6,x86-64) => /usr/lib64/libGLEWmx.so
	libGLEWmx.so (libc6) => /usr/lib32/libGLEWmx.so
	libGLEW.so.1.13 (libc6,x86-64) => /usr/lib64/libGLEW.so.1.13
	libGLEW.so.1.13 (libc6) => /usr/lib32/libGLEW.so.1.13
	libGLEW.so (libc6,x86-64) => /usr/lib64/libGLEW.so
	libGLEW.so (libc6) => /usr/lib32/libGLEW.so
	libGLESv2_nvidia.so.2 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv2_nvidia.so.2
	libGLESv2_nvidia.so.2 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv2_nvidia.so.2
	libGLESv2_nvidia.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv2_nvidia.so
	libGLESv2_nvidia.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv2_nvidia.so
	libGLESv2.so.2 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv2.so.2
	libGLESv2.so.2 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv2.so.2
	libGLESv2.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv2.so
	libGLESv2.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv2.so
	libGLESv1_CM_nvidia.so.1 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv1_CM_nvidia.so.1
	libGLESv1_CM_nvidia.so.1 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv1_CM_nvidia.so.1
	libGLESv1_CM_nvidia.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv1_CM_nvidia.so
	libGLESv1_CM_nvidia.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv1_CM_nvidia.so
	libGLESv1_CM.so.1 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv1_CM.so.1
	libGLESv1_CM.so.1 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv1_CM.so.1
	libGLESv1_CM.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv1_CM.so
	libGLESv1_CM.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv1_CM.so
	libGL.so.1 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGL.so.1
	libGL.so.1 (libc6,x86-64) => /usr/lib64/libGL.so.1
	libGL.so.1 (libc6) => /usr/lib32/opengl/nvidia/lib/libGL.so.1
	libGL.so.1 (libc6) => /usr/lib32/libGL.so.1
	libGL.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGL.so
	libGL.so (libc6,x86-64) => /usr/lib64/libGL.so
	libGL.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGL.so
	libGL.so (libc6) => /usr/lib32/libGL.so
	libEGL_nvidia.so.0 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libEGL_nvidia.so.0
	libEGL_nvidia.so.0 (libc6) => /usr/lib32/opengl/nvidia/lib/libEGL_nvidia.so.0
	libEGL_nvidia.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libEGL_nvidia.so
	libEGL_nvidia.so (libc6) => /usr/lib32/opengl/nvidia/lib/libEGL_nvidia.so
	libEGL.so.1 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libEGL.so.1
	libEGL.so.1 (libc6,x86-64) => /usr/lib64/libEGL.so.1
	libEGL.so.1 (libc6) => /usr/lib32/opengl/nvidia/lib/libEGL.so.1
	libEGL.so.1 (libc6) => /usr/lib32/libEGL.so.1
	libEGL.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libEGL.so
	libEGL.so (libc6,x86-64) => /usr/lib64/libEGL.so
	libEGL.so (libc6) => /usr/lib32/opengl/nvidia/lib/libEGL.so
	libEGL.so (libc6) => /usr/lib32/libEGL.so
	libCgGL.so (libc6,x86-64) => /opt/nvidia-cg-toolkit/lib64/libCgGL.so
	libCgGL.so (libc6) => /opt/nvidia-cg-toolkit/lib32/libCgGL.so
Comment 33 Bob Wya 2016-02-12 12:18:05 UTC
The __shared__ GL* libs from both the x11-nvidia/drivers and media-libs/mesa are clearly being linked to simultaneously throughout the system...

So I tested a version of my ebuilds where I:

1) stored the shared mesa GL lib's in /usr/lib{32,64}/opengl/mesa/

2) kept the env setting so that /etc/ld.so.conf has:
# ld.so.conf autogenerated by env-update; make all changes to
# contents of /etc/env.d directory
/usr/lib32/opengl/nvidia/lib
/usr/lib64/opengl/nvidia/lib
...

3) so the nvidia GL libraries _should_ be picked up and linked to

4) I did NOT introduce any symlinks to the Nvidia GL lib's:
/usr/lib{32,64}/ -> /usr/lib{32,64}/opengl/nvidia/

5) I actually justed expect x11-base/xorg-server to build - proving that I was wasting my time with this bug... However I got a build failure...

libtool: link: x86_64-pc-linux-gnu-gcc -shared  -fPIC -DPIC  .libs/glxmodule.o  -Wl,--whole-archive ../../../glx/.libs/libglx.a ../../../glx/.libs/libglxdri.a -Wl,--no-whole-archive  -Wl,--as-needed -lGL -ldl -lm  -O2 -march=native -mtune=native -O2 -march=native -mtune=native -Wl,-O1 -Wl,-z -Wl,lazy   -Wl,-soname -Wl,libglx.so -o .libs/libglx.so
/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status

6) I re-created the symlinks to the Nvidia GL lib's:
/usr/lib{32,64}/ -> /usr/lib{32,64}/opengl/nvidia/

7) x11-base/xorg-server now built cleanly - without the GL linker error

This is a reproduceable problem - that could surely lead to all kinds of funky issues...
Comment 34 Bob Wya 2016-02-12 12:51:07 UTC
With my "modified" media-libs/mesa ebuild...

- output of /sbin/ldconfig -p | grep GL

	libQt5OpenGL.so.5 (libc6,x86-64) => /usr/lib64/libQt5OpenGL.so.5
	libQt5OpenGL.so (libc6,x86-64) => /usr/lib64/libQt5OpenGL.so
	libQt5GLib-2.0.so.0 (libc6,x86-64) => /usr/lib64/libQt5GLib-2.0.so.0
	libQt5GLib-2.0.so (libc6,x86-64) => /usr/lib64/libQt5GLib-2.0.so
	libQtOpenGL.so.4 (libc6,x86-64) => /usr/lib64/qt4/libQtOpenGL.so.4
	libQtOpenGL.so.4 (libc6) => /usr/lib32/qt4/libQtOpenGL.so.4
	libQtOpenGL.so (libc6,x86-64) => /usr/lib64/qt4/libQtOpenGL.so
	libQtOpenGL.so (libc6) => /usr/lib32/qt4/libQtOpenGL.so
	libQtGLib-2.0.so.0 (libc6,x86-64) => /usr/lib64/libQtGLib-2.0.so.0
	libQtGLib-2.0.so (libc6,x86-64) => /usr/lib64/libQtGLib-2.0.so
	libOpenGL.so.0 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libOpenGL.so.0
	libOpenGL.so.0 (libc6,x86-64) => /usr/lib64/libOpenGL.so.0
	libOpenGL.so.0 (libc6) => /usr/lib32/opengl/nvidia/lib/libOpenGL.so.0
	libOpenGL.so.0 (libc6) => /usr/lib32/libOpenGL.so.0
	libOpenGL.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libOpenGL.so
	libOpenGL.so (libc6,x86-64) => /usr/lib64/libOpenGL.so
	libOpenGL.so (libc6) => /usr/lib32/opengl/nvidia/lib/libOpenGL.so
	libOpenGL.so (libc6) => /usr/lib32/libOpenGL.so
	libGLdispatch.so.0 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLdispatch.so.0
	libGLdispatch.so.0 (libc6,x86-64) => /usr/lib64/libGLdispatch.so.0
	libGLdispatch.so.0 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLdispatch.so.0
	libGLdispatch.so.0 (libc6) => /usr/lib32/libGLdispatch.so.0
	libGLdispatch.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLdispatch.so
	libGLdispatch.so (libc6,x86-64) => /usr/lib64/libGLdispatch.so
	libGLdispatch.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLdispatch.so
	libGLdispatch.so (libc6) => /usr/lib32/libGLdispatch.so
	libGLX_nvidia.so.0 (libc6,x86-64) => /usr/lib64/libGLX_nvidia.so.0
	libGLX_nvidia.so.0 (libc6) => /usr/lib32/libGLX_nvidia.so.0
	libGLX_nvidia.so (libc6,x86-64) => /usr/lib64/libGLX_nvidia.so
	libGLX_nvidia.so (libc6) => /usr/lib32/libGLX_nvidia.so
	libGLX.so.0 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLX.so.0
	libGLX.so.0 (libc6,x86-64) => /usr/lib64/libGLX.so.0
	libGLX.so.0 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLX.so.0
	libGLX.so.0 (libc6) => /usr/lib32/libGLX.so.0
	libGLX.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLX.so
	libGLX.so (libc6,x86-64) => /usr/lib64/libGLX.so
	libGLX.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLX.so
	libGLX.so (libc6) => /usr/lib32/libGLX.so
	libGLU.so.1 (libc6,x86-64) => /usr/lib64/libGLU.so.1
	libGLU.so.1 (libc6) => /usr/lib32/libGLU.so.1
	libGLU.so (libc6,x86-64) => /usr/lib64/libGLU.so
	libGLU.so (libc6) => /usr/lib32/libGLU.so
	libGLEWmx.so.1.13 (libc6,x86-64) => /usr/lib64/libGLEWmx.so.1.13
	libGLEWmx.so.1.13 (libc6) => /usr/lib32/libGLEWmx.so.1.13
	libGLEWmx.so (libc6,x86-64) => /usr/lib64/libGLEWmx.so
	libGLEWmx.so (libc6) => /usr/lib32/libGLEWmx.so
	libGLEW.so.1.13 (libc6,x86-64) => /usr/lib64/libGLEW.so.1.13
	libGLEW.so.1.13 (libc6) => /usr/lib32/libGLEW.so.1.13
	libGLEW.so (libc6,x86-64) => /usr/lib64/libGLEW.so
	libGLEW.so (libc6) => /usr/lib32/libGLEW.so
	libGLESv2_nvidia.so.2 (libc6,x86-64) => /usr/lib64/libGLESv2_nvidia.so.2
	libGLESv2_nvidia.so.2 (libc6) => /usr/lib32/libGLESv2_nvidia.so.2
	libGLESv2_nvidia.so (libc6,x86-64) => /usr/lib64/libGLESv2_nvidia.so
	libGLESv2_nvidia.so (libc6) => /usr/lib32/libGLESv2_nvidia.so
	libGLESv2.so.2 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv2.so.2
	libGLESv2.so.2 (libc6,x86-64) => /usr/lib64/libGLESv2.so.2
	libGLESv2.so.2 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv2.so.2
	libGLESv2.so.2 (libc6) => /usr/lib32/libGLESv2.so.2
	libGLESv2.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv2.so
	libGLESv2.so (libc6,x86-64) => /usr/lib64/libGLESv2.so
	libGLESv2.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv2.so
	libGLESv2.so (libc6) => /usr/lib32/libGLESv2.so
	libGLESv1_CM_nvidia.so.1 (libc6,x86-64) => /usr/lib64/libGLESv1_CM_nvidia.so.1
	libGLESv1_CM_nvidia.so.1 (libc6) => /usr/lib32/libGLESv1_CM_nvidia.so.1
	libGLESv1_CM_nvidia.so (libc6,x86-64) => /usr/lib64/libGLESv1_CM_nvidia.so
	libGLESv1_CM_nvidia.so (libc6) => /usr/lib32/libGLESv1_CM_nvidia.so
	libGLESv1_CM.so.1 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv1_CM.so.1
	libGLESv1_CM.so.1 (libc6,x86-64) => /usr/lib64/libGLESv1_CM.so.1
	libGLESv1_CM.so.1 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv1_CM.so.1
	libGLESv1_CM.so.1 (libc6) => /usr/lib32/libGLESv1_CM.so.1
	libGLESv1_CM.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv1_CM.so
	libGLESv1_CM.so (libc6,x86-64) => /usr/lib64/libGLESv1_CM.so
	libGLESv1_CM.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv1_CM.so
	libGLESv1_CM.so (libc6) => /usr/lib32/libGLESv1_CM.so
	libGL.so.1 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGL.so.1
	libGL.so.1 (libc6,x86-64) => /usr/lib64/libGL.so.1
	libGL.so.1 (libc6) => /usr/lib32/opengl/nvidia/lib/libGL.so.1
	libGL.so.1 (libc6) => /usr/lib32/libGL.so.1
	libGL.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGL.so
	libGL.so (libc6,x86-64) => /usr/lib64/libGL.so
	libGL.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGL.so
	libGL.so (libc6) => /usr/lib32/libGL.so
	libEGL_nvidia.so.0 (libc6,x86-64) => /usr/lib64/libEGL_nvidia.so.0
	libEGL_nvidia.so.0 (libc6) => /usr/lib32/libEGL_nvidia.so.0
	libEGL_nvidia.so (libc6,x86-64) => /usr/lib64/libEGL_nvidia.so
	libEGL_nvidia.so (libc6) => /usr/lib32/libEGL_nvidia.so
	libEGL.so.1 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libEGL.so.1
	libEGL.so.1 (libc6,x86-64) => /usr/lib64/libEGL.so.1
	libEGL.so.1 (libc6) => /usr/lib32/opengl/nvidia/lib/libEGL.so.1
	libEGL.so.1 (libc6) => /usr/lib32/libEGL.so.1
	libEGL.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libEGL.so
	libEGL.so (libc6,x86-64) => /usr/lib64/libEGL.so
	libEGL.so (libc6) => /usr/lib32/opengl/nvidia/lib/libEGL.so
	libEGL.so (libc6) => /usr/lib32/libEGL.so
	libCgGL.so (libc6,x86-64) => /opt/nvidia-cg-toolkit/lib64/libCgGL.so
	libCgGL.so (libc6) => /opt/nvidia-cg-toolkit/lib32/libCgGL.so
Comment 35 Bob Wya 2016-02-12 12:53:28 UTC
So NO media-libs/mesa GL files are now being "incorrectly" linked to...

equery files =media-libs/mesa-11.1.1-r1 | grep GL
/usr/include/EGL
/usr/include/EGL/egl.h
/usr/include/EGL/eglext.h
/usr/include/EGL/eglextchromium.h
/usr/include/EGL/eglmesaext.h
/usr/include/EGL/eglplatform.h
/usr/include/GL
/usr/include/GL/gl.h
/usr/include/GL/gl_mangle.h
/usr/include/GL/glcorearb.h
/usr/include/GL/glext.h
/usr/include/GL/glx.h
/usr/include/GL/glx_mangle.h
/usr/include/GL/glxext.h
/usr/include/GL/internal
/usr/include/GL/internal/dri_interface.h
/usr/include/GL/osmesa.h
/usr/include/GL/wglext.h
/usr/lib/debug/usr/lib32/opengl/mesa/lib/libEGL.so.1.0.0.debug
/usr/lib/debug/usr/lib32/opengl/mesa/lib/libGL.so.1.2.0.debug
/usr/lib/debug/usr/lib64/opengl/mesa/lib/libEGL.so.1.0.0.debug
/usr/lib/debug/usr/lib64/opengl/mesa/lib/libGL.so.1.2.0.debug
/usr/lib32/opengl/mesa/lib/libEGL.so
/usr/lib32/opengl/mesa/lib/libEGL.so.1
/usr/lib32/opengl/mesa/lib/libEGL.so.1.0.0
/usr/lib32/opengl/mesa/lib/libGL.so
/usr/lib32/opengl/mesa/lib/libGL.so.1
/usr/lib32/opengl/mesa/lib/libGL.so.1.2.0
/usr/lib64/opengl/mesa/lib/libEGL.so
/usr/lib64/opengl/mesa/lib/libEGL.so.1
/usr/lib64/opengl/mesa/lib/libEGL.so.1.0.0
/usr/lib64/opengl/mesa/lib/libGL.so
/usr/lib64/opengl/mesa/lib/libGL.so.1
/usr/lib64/opengl/mesa/lib/libGL.so.1.2.0
Comment 36 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-02-12 20:03:00 UTC
Before getting into more details, I see a first problem:

>         ModulePath "/usr/lib32/xorg/modules"

This directory should not exist. Please check if it's owned by any package, and remove it. Then re-run 'eselect opengl' to get updated ModulePaths.
Comment 37 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-02-12 20:06:49 UTC
(In reply to Bob Wya from comment #33)
> 5) I actually justed expect x11-base/xorg-server to build - proving that I
> was wasting my time with this bug... However I got a build failure...
> 
> libtool: link: x86_64-pc-linux-gnu-gcc -shared  -fPIC -DPIC 
> .libs/glxmodule.o  -Wl,--whole-archive ../../../glx/.libs/libglx.a
> ../../../glx/.libs/libglxdri.a -Wl,--no-whole-archive  -Wl,--as-needed -lGL
> -ldl -lm  -O2 -march=native -mtune=native -O2 -march=native -mtune=native
> -Wl,-O1 -Wl,-z -Wl,lazy   -Wl,-soname -Wl,libglx.so -o .libs/libglx.so
> /usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/../../../../x86_64-pc-linux-gnu/bin/
> ld: cannot find -lGL
> collect2: error: ld returned 1 exit status
> 
> 6) I re-created the symlinks to the Nvidia GL lib's:
> /usr/lib{32,64}/ -> /usr/lib{32,64}/opengl/nvidia/
> 
> 7) x11-base/xorg-server now built cleanly - without the GL linker error
> 
> This is a reproduceable problem - that could surely lead to all kinds of
> funky issues...

Congratulations. You've just reintroduced tricky issue in webkit-gtk which happens when it's built against nvidia stuff.
Comment 38 vylaern 2016-03-13 19:35:22 UTC
Hi,

Do we have any ideas in this topic, as new xorg-server 1.18.2 did not fix my black screen on nvidia optimus.
https://bugs.gentoo.org/show_bug.cgi?id=574410
So I have no idea, why X doesn't work with Optimus for last 6 weeks.
Comment 39 brett 2016-03-30 12:46:28 UTC
How goes the patch?

I recently re-installed Gentoo after a 5 year break (welcome back Brett, thanks it's good to be back other Brett... well, almost). Right out of the box I find myself with this issue. 

I have a freshly installed system. I only just installed Firefox 30 min ago. My xorg.conf does not have ModulePath "/usr/lib32/xorg/modules". But I still have the issue. Would you like me to try any official patches before I start to hack? 

( I need my glmatrix background ASAP, else I can't really be productive )



home-gentoo xorg.conf.d # cat 20opengl.conf 
Section "Files"
        ModulePath "/usr/lib64/opengl/nvidia"
        ModulePath "/usr/lib64/xorg/modules"
EndSection
Comment 40 Bob Wya 2016-03-30 16:55:27 UTC
(In reply to brett from comment #39)
> 
> I recently re-installed Gentoo after a 5 year break (welcome back Brett,
> thanks it's good to be back other Brett... well, almost). Right out of the
> box I find myself with this issue. 

Not sure what "this issue" is... :-)

But I suspect your problem is due to something else. Nobody has been definitely able to pin down, for certain, that installing the media-libs/mesa GL libraries directly in /usr/lib{32,64} causes any issues (well apart from with the native Steam client obviously). I would suggest visiting the Gentoo forums...
Comment 41 Jakub Panachida 2016-04-11 22:01:28 UTC
I have the same behaviour, when I try to use some display manger. However when I use `startx` then everything is fine.
Comment 42 HelLViS69 2016-04-16 17:43:43 UTC
Hi all,same situation here, black screen as soon as X starts (just using kdm + windowmaker right now because copy/paste from links was a pita...)

My laptop uses NVidia Optimus with modesetting using EDID from Intel chip.
This is what I installed right now:
media-libs/mesa 11.0.6
x11-drivers/nvidia-drivers 361.28
app-eselect/eselect-opengl 1.3.1-r4
x11-base/xorg-server 1.17.4

I followed the wiki on how to install KDE 5, so sddb is in video group, it has its own autogenerated /etc/sddm.conf file, /var/lib/sddm was present with sddm:root permission. The only thing not mentioned in the wiki was that I had to comment out pam_systemd.so in /etc/pam.d/sddm-greeter because it complained during startup (I'm using OpenRC)

Btw, reading this post, I checked my symlinks and  I noticed that I have 2 broken links which point to the older nvidia-driver previously installed:

/usr/lib64/libGLESv1_CM.so -> opengl/nvidia/lib/libGLESv1_CM.so.355.11
/usr/lib64/libGLESv2.so -> opengl/nvidia/lib/libGLESv2.so.355.11

As you can see, these links weren't updated when I updated nvidia driver..
I tried also to rebuild nvidia driver, swtich to mesa from eselect opengl and then switch back to nvidia, but nothing changed, and those symlinks still point to old libs.

Following there are what you asked before:

# eselect opengl list
Available OpenGL implementations:
  [1]   nvidia *
  [2]   xorg-x11


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


# ldconfig -p | grep GL
        libQt5OpenGL.so.5 (libc6,x86-64) => /usr/lib64/libQt5OpenGL.so.5
        libQt5OpenGL.so (libc6,x86-64) => /usr/lib64/libQt5OpenGL.so
        libQtOpenGL.so.4 (libc6,x86-64) => /usr/lib64/qt4/libQtOpenGL.so.4
        libQtOpenGL.so.4 (libc6) => /usr/lib32/qt4/libQtOpenGL.so.4
        libQtOpenGL.so (libc6,x86-64) => /usr/lib64/qt4/libQtOpenGL.so
        libQtOpenGL.so (libc6) => /usr/lib32/qt4/libQtOpenGL.so
        libOpenGL.so.0 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libOpenGL.so.0
        libOpenGL.so.0 (libc6) => /usr/lib32/opengl/nvidia/lib/libOpenGL.so.0
        libOpenGL.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libOpenGL.so
        libOpenGL.so (libc6) => /usr/lib32/opengl/nvidia/lib/libOpenGL.so
        libGLdispatch.so.0 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLdispatch.so.0
        libGLdispatch.so.0 (libc6,x86-64) => /usr/lib64/libGLdispatch.so.0
        libGLdispatch.so.0 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLdispatch.so.0
        libGLdispatch.so.0 (libc6) => /usr/lib32/libGLdispatch.so.0
        libGLdispatch.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLdispatch.so
        libGLdispatch.so (libc6,x86-64) => /usr/lib64/libGLdispatch.so
        libGLdispatch.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLdispatch.so
        libGLdispatch.so (libc6) => /usr/lib32/libGLdispatch.so
        libGLX_nvidia.so.0 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLX_nvidia.so.0
        libGLX_nvidia.so.0 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLX_nvidia.so.0
        libGLX_nvidia.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLX_nvidia.so
        libGLX_nvidia.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLX_nvidia.so
        libGLX.so.0 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLX.so.0
        libGLX.so.0 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLX.so.0
        libGLX.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLX.so
        libGLX.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLX.so
        libGLU.so.1 (libc6,x86-64) => /usr/lib64/libGLU.so.1
        libGLU.so.1 (libc6) => /usr/lib32/libGLU.so.1
        libGLU.so (libc6,x86-64) => /usr/lib64/libGLU.so
        libGLU.so (libc6) => /usr/lib32/libGLU.so
        libGLEWmx.so.1.10 (libc6,x86-64) => /usr/lib64/libGLEWmx.so.1.10
        libGLEWmx.so (libc6,x86-64) => /usr/lib64/libGLEWmx.so
        libGLEW.so.1.10 (libc6,x86-64) => /usr/lib64/libGLEW.so.1.10
        libGLEW.so (libc6,x86-64) => /usr/lib64/libGLEW.so
        libGLESv2_nvidia.so.2 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv2_nvidia.so.2
        libGLESv2_nvidia.so.2 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv2_nvidia.so.2
        libGLESv2_nvidia.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv2_nvidia.so
        libGLESv2_nvidia.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv2_nvidia.so
        libGLESv2.so.2 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv2.so.2
        libGLESv2.so.2 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv2.so.2
        libGLESv2.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv2.so
        libGLESv2.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv2.so
        libGLESv1_CM_nvidia.so.1 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv1_CM_nvidia.so.1
        libGLESv1_CM_nvidia.so.1 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv1_CM_nvidia.so.1
        libGLESv1_CM_nvidia.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv1_CM_nvidia.so
        libGLESv1_CM_nvidia.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv1_CM_nvidia.so
        libGLESv1_CM.so.1 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv1_CM.so.1
        libGLESv1_CM.so.1 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv1_CM.so.1
        libGLESv1_CM.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv1_CM.so
        libGLESv1_CM.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv1_CM.so
        libGL.so.1 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGL.so.1
        libGL.so.1 (libc6,x86-64) => /usr/lib64/libGL.so.1
        libGL.so.1 (libc6) => /usr/lib32/opengl/nvidia/lib/libGL.so.1
        libGL.so.1 (libc6) => /usr/lib32/libGL.so.1
        libGL.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGL.so
        libGL.so (libc6,x86-64) => /usr/lib64/libGL.so
        libGL.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGL.so
        libGL.so (libc6) => /usr/lib32/libGL.so
        libEGL_nvidia.so.0 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libEGL_nvidia.so.0
        libEGL_nvidia.so.0 (libc6) => /usr/lib32/opengl/nvidia/lib/libEGL_nvidia.so.0
        libEGL_nvidia.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libEGL_nvidia.so
        libEGL_nvidia.so (libc6) => /usr/lib32/opengl/nvidia/lib/libEGL_nvidia.so
        libEGL.so.1 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libEGL.so.1
        libEGL.so.1 (libc6,x86-64) => /usr/lib64/libEGL.so.1
        libEGL.so.1 (libc6) => /usr/lib32/opengl/nvidia/lib/libEGL.so.1
        libEGL.so.1 (libc6) => /usr/lib32/libEGL.so.1
        libEGL.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libEGL.so
        libEGL.so (libc6,x86-64) => /usr/lib64/libEGL.so
        libEGL.so (libc6) => /usr/lib32/opengl/nvidia/lib/libEGL.so
        libEGL.so (libc6) => /usr/lib32/libEGL.so


# cat /etc/X11/xorg.conf.d/20opengl.conf 
Section "Files"
        ModulePath "/usr/lib32/xorg/modules"
        ModulePath "/usr/lib64/opengl/nvidia"
        ModulePath "/usr/lib64/xorg/modules"
EndSection


# cat /etc/X11/xorg.conf.d/40-monitor.conf
Section "ServerLayout"
        Identifier      "layout"
        Screen          0 "Screen0"
        Inactive        "intel"
EndSection

Section "Extensions"
        Option         "Composite" "Enable"
EndSection

Section "Module"
        Load           "glx"
EndSection

Section "Monitor"
        Identifier     "Monitor0"
        VendorName     "Seiko/Epson"
        ModelName      "Unknown"
        #HorizSync       28.0 - 33.0
        #VertRefresh     43.0 - 72.0
        Option         "DPMS"
#Manufacturer                 : SEC
#Monitor Name                 : Seiko/Epson
#Product ID                   : 0x544b
#32-bit Serial Number         : 0x00000000
#Serial Number String         : 
#Manufacture Date             : 2010, week 0
#Prefer first detailed timing : Yes
#Supports Continuous Frequency: No
#EDID 1.4 YCbCr 422 support   : No
#EDID 1.4 YCbCr 444 support   : Yes
#Maximum Image Size           : 300 mm x 170 mm
#Valid HSync Range            : 37.2 kHz - 55.8 kHz
#Valid VRefresh Range         : 40.0 Hz - 60.0 Hz
EndSection

Section "Device"
        Identifier     "NVidia"
        Driver         "nvidia"
        VendorName     "NVIDIA Corporation"
        BoardName      "GeForce GT 555M"
        # Stuff on the net says to use BusID "PCI:1:0:0" but the manual says to use "1@0:0:0"
        BusID          "1@0:0:0"
        Option         "ConnectedMonitor" "DFP-0"
        Option         "CustomEDID" "DFP-0:/lib/firmware/edid/1600x900_Alien_M14xR1.bin"
        Option         "UseEDID" "True"
        Option         "ModeValidation" "NoVirtualSizeCheck"
        # Option       "ModeDebug" "True"
EndSection

Section "Screen"
        Identifier     "Screen0"
        Device         "NVidia"
        Monitor        "Monitor0"
        Option         "RenderAccel" "True"
        Option         "NoRenderExtension" "False"
        Option         "AllowGLXWithComposite" "True"
        Option         "AddARGBGLXVisuals" "True"
        Option         "DamageEvents" "True"
        Option         "ConnectToAcpid" "True"
        #Option        "AllowEmptyInitialConfiguration"
        DefaultDepth    24
        SubSection     "Display"
                Depth       24
                Modes      "1600x900"
        EndSubSection
EndSection

Section "Device"
        Identifier     "intel"
        Driver         "modesetting"
        Option         "CustomEDID" "DFP-0:/lib/firmware/edid/1600x900_Alien_M14xR1.bin"
EndSection

Section "Screen"
        Identifier    "intel"
        Device        "intel"
        SubSection     "Display"
                Depth       24
                Modes      "1600x900"
        EndSubSection
        Monitor        "Monitor0"
EndSection
Comment 43 HelLViS69 2016-04-16 17:54:29 UTC
Created attachment 430844 [details]
Xorg.0.log
Comment 44 Joel Snape 2016-05-02 23:31:33 UTC
I also have problems with eselect-opengl and nvidia. I recently migrated to plasma 5 and it only works correctly when I use xorg-x11 opengl, using nvidia, many workspace elements fail to show correcty (taskbar, background, widgets, task switcher, etc.), windows sometimes appear only with a black fill, the system settings window closes when pressing back, etc.

These are my settings:

app-eselect/eselect-opengl-1.3.1-r4
media-libs/mesa-11.2.1
x11-base/xorg-server-1.18.3
x11-drivers/nvidia-drivers-364.19


# eselect opengl list
Available OpenGL implementations:
  [1]   nvidia *
  [2]   xorg-x11

# eselect mesa list
64bit i915 (Intel 915, 945)
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)
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 *


# ldconfig -p | grep GL
        libQt5OpenGL.so.5 (libc6,x86-64) => /usr/lib64/libQt5OpenGL.so.5
        libQt5OpenGL.so (libc6,x86-64) => /usr/lib64/libQt5OpenGL.so
        libQt5GLib-2.0.so.0 (libc6,x86-64) => /usr/lib64/libQt5GLib-2.0.so.0
        libQt5GLib-2.0.so (libc6,x86-64) => /usr/lib64/libQt5GLib-2.0.so
        libQtOpenGL.so.4 (libc6,x86-64) => /usr/lib64/qt4/libQtOpenGL.so.4
        libQtOpenGL.so.4 (libc6) => /usr/lib32/qt4/libQtOpenGL.so.4
        libQtOpenGL.so (libc6,x86-64) => /usr/lib64/qt4/libQtOpenGL.so
        libQtOpenGL.so (libc6) => /usr/lib32/qt4/libQtOpenGL.so
        libQtGLib-2.0.so.0 (libc6,x86-64) => /usr/lib64/libQtGLib-2.0.so.0
        libQtGLib-2.0.so (libc6,x86-64) => /usr/lib64/libQtGLib-2.0.so
        libOpenGL.so.0 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libOpenGL.so.0
        libOpenGL.so.0 (libc6) => /usr/lib32/opengl/nvidia/lib/libOpenGL.so.0
        libOpenGL.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libOpenGL.so
        libOpenGL.so (libc6) => /usr/lib32/opengl/nvidia/lib/libOpenGL.so
        libGLdispatch.so.0 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLdispatch.so.0
        libGLdispatch.so.0 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLdispatch.so.0
        libGLdispatch.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLdispatch.so
        libGLdispatch.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLdispatch.so
        libGLX_nvidia.so.0 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLX_nvidia.so.0
        libGLX_nvidia.so.0 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLX_nvidia.so.0
        libGLX_nvidia.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLX_nvidia.so
        libGLX_nvidia.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLX_nvidia.so
        libGLX.so.0 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLX.so.0
        libGLX.so.0 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLX.so.0
        libGLX.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLX.so
        libGLX.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLX.so
        libGLU.so.1 (libc6,x86-64) => /usr/lib64/libGLU.so.1
        libGLU.so.1 (libc6) => /usr/lib32/libGLU.so.1
        libGLU.so (libc6,x86-64) => /usr/lib64/libGLU.so
        libGLU.so (libc6) => /usr/lib32/libGLU.so
        libGLEWmx.so.1.13 (libc6,x86-64) => /usr/lib64/libGLEWmx.so.1.13
        libGLEWmx.so.1.13 (libc6) => /usr/lib32/libGLEWmx.so.1.13
        libGLEWmx.so (libc6,x86-64) => /usr/lib64/libGLEWmx.so
        libGLEWmx.so (libc6) => /usr/lib32/libGLEWmx.so
        libGLEW.so.1.13 (libc6,x86-64) => /usr/lib64/libGLEW.so.1.13
        libGLEW.so.1.13 (libc6) => /usr/lib32/libGLEW.so.1.13
        libGLEW.so (libc6,x86-64) => /usr/lib64/libGLEW.so
        libGLEW.so (libc6) => /usr/lib32/libGLEW.so
        libGLESv2_nvidia.so.2 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv2_nvidia.so.2
        libGLESv2_nvidia.so.2 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv2_nvidia.so.2
        libGLESv2_nvidia.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv2_nvidia.so
        libGLESv2_nvidia.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv2_nvidia.so
        libGLESv2.so.2 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv2.so.2
        libGLESv2.so.2 (libc6,x86-64) => /usr/lib64/libGLESv2.so.2
        libGLESv2.so.2 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv2.so.2
        libGLESv2.so.2 (libc6) => /usr/lib32/libGLESv2.so.2
        libGLESv2.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv2.so
        libGLESv2.so (libc6,x86-64) => /usr/lib64/libGLESv2.so
        libGLESv2.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv2.so
        libGLESv2.so (libc6) => /usr/lib32/libGLESv2.so
        libGLESv1_CM_nvidia.so.1 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv1_CM_nvidia.so.1
        libGLESv1_CM_nvidia.so.1 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv1_CM_nvidia.so.1
        libGLESv1_CM_nvidia.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv1_CM_nvidia.so
        libGLESv1_CM_nvidia.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv1_CM_nvidia.so
        libGLESv1_CM.so.1 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv1_CM.so.1
        libGLESv1_CM.so.1 (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv1_CM.so.1
        libGLESv1_CM.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGLESv1_CM.so
        libGLESv1_CM.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGLESv1_CM.so
        libGL.so.1 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGL.so.1
        libGL.so.1 (libc6,x86-64) => /usr/lib64/libGL.so.1
        libGL.so.1 (libc6) => /usr/lib32/opengl/nvidia/lib/libGL.so.1
        libGL.so.1 (libc6) => /usr/lib32/libGL.so.1
        libGL.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libGL.so
        libGL.so (libc6,x86-64) => /usr/lib64/libGL.so
        libGL.so (libc6) => /usr/lib32/opengl/nvidia/lib/libGL.so
        libGL.so (libc6) => /usr/lib32/libGL.so
        libEGL_nvidia.so.0 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libEGL_nvidia.so.0
        libEGL_nvidia.so.0 (libc6) => /usr/lib32/opengl/nvidia/lib/libEGL_nvidia.so.0
        libEGL_nvidia.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libEGL_nvidia.so
        libEGL_nvidia.so (libc6) => /usr/lib32/opengl/nvidia/lib/libEGL_nvidia.so
        libEGL.so.1 (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libEGL.so.1
        libEGL.so.1 (libc6,x86-64) => /usr/lib64/libEGL.so.1
        libEGL.so.1 (libc6) => /usr/lib32/opengl/nvidia/lib/libEGL.so.1
        libEGL.so.1 (libc6) => /usr/lib32/libEGL.so.1
        libEGL.so (libc6,x86-64) => /usr/lib64/opengl/nvidia/lib/libEGL.so
        libEGL.so (libc6,x86-64) => /usr/lib64/libEGL.so
        libEGL.so (libc6) => /usr/lib32/opengl/nvidia/lib/libEGL.so
        libEGL.so (libc6) => /usr/lib32/libEGL.so
        libCgGL.so (libc6,x86-64) => /usr/lib64/libCgGL.so
        libCgGL.so (libc6,x86-64) => /opt/nvidia-cg-toolkit/lib64/libCgGL.so
        libCgGL.so (libc6) => /opt/nvidia-cg-toolkit/lib32/libCgGL.so

# cat /etc/X11/xorg.conf.d/20opengl.conf
Section "Files"
        ModulePath "/usr/lib64/opengl/nvidia"
        ModulePath "/usr/lib64/xorg/modules"
EndSection

# cat /etc/X11/xorg.conf
Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

#Section "Files"
#       ModulePath   "/usr/lib64/xorg/modules"
#       FontPath     "/usr/share/fonts/misc/"
#       FontPath     "/usr/share/fonts/TTF/"
#       FontPath     "/usr/share/fonts/OTF"
#       FontPath     "/usr/share/fonts/Type1/"
#       FontPath     "/usr/share/fonts/100dpi/"
#       FontPath     "/usr/share/fonts/75dpi/"
#EndSection

Section "Module"
#       Load "dri"
#       Load "GLCore"
        Load  "glx"
        Load  "extmod"
        Load  "dbe"
#       Load  "record"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
        Option      "CoreKeyboard"
        Option      "XkbRules" "xorg"
        Option      "XkbModel" "pc105"
        Option      "XkbLayout" "pt"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/input/mice"
        Option      "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "SWcursor"                  # [<bool>]
        #Option     "HWcursor"                  # [<bool>]
        #Option     "NoAccel"                   # [<bool>]
        #Option     "ShadowFB"                  # [<bool>]
        #Option     "UseFBDev"                  # [<bool>]
        #Option     "Rotate"                    # [<str>]
        #Option     "VideoKey"                  # <i>
        #Option     "FlatPanel"                 # [<bool>]
        #Option     "FPDither"                  # [<bool>]
        #Option     "CrtcNumber"                # <i>
        #Option     "FPScale"                   # [<bool>]
        #Option     "FPTweak"                   # <i>
        #Option     "DualHead"                  # [<bool>]
        Identifier  "Card0"
        Driver      "nvidia"
#       Driver      "nouveau"
#       Driver      "vesa"
        VendorName  "nVidia Corporation"
        BoardName   "GT400b [GeForce GTX 460]"
        BusID       "PCI:1:0:0"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        DefaultDepth 24
        SubSection "Display"
                Viewport   0 0
                Depth     1
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     4
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     8
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     15
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     16
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth      24
                Modes      "1920x1080"
        EndSubSection
EndSection

I tried the mesa-11.2.1-r1 and eselect-opengl-1.3.2 packages from bobwya's layman repository but with these versions, plasma has the same problems but with both opengl implementations.
Comment 45 Joel Snape 2016-05-02 23:32:41 UTC
Created attachment 433000 [details]
Xorg.0.log
Comment 46 Joel Snape 2016-05-15 23:41:13 UTC
Sorry, it seems that my problem had nothing to do with eselect... I had "gles gles2 egl" in my use flags and removing them solved the graphical issues (I had tried removing gles2 and egl before but I needed to remove all three to avoid dependency issues)... It's a pity that EGL doesn't work as a backend on my computer but it will have to do...
Comment 47 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2016-05-16 14:47:53 UTC
As there's been no bickering on this bug for quite some time, I'm removing us (comre).
Call us back if there's anything for us to do.
Comment 48 HelLViS69 2016-05-17 21:57:49 UTC
I have egl, gles and gles2 disabled and still can't login to Plasma.. I still have broken symlinks, pointing to old nvidia driver..
Comment 49 Bob Wya 2016-05-17 22:24:50 UTC
(In reply to HelLViS69 from comment #48)
> I have egl, gles and gles2 disabled and still can't login to Plasma.. I
> still have broken symlinks, pointing to old nvidia driver..

The invalid / "left-over" Nvidia driver version 355.11 symlinks (you quoted originally) are setup by the x11-drivers/nvidia-drivers package...
"libEGL.so.1 ${GL_ROOT}"
                        "libEGL_nvidia.so.${NV_SOVER} ${GL_ROOT}"
                        "libGL.so.$(usex compat ${NV_SOVER} 1.0.0) ${GL_ROOT}"
                        "libGLESv1_CM.so.1 ${GL_ROOT}"
                        "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}"
                        "libGLESv2.so.2 ${GL_ROOT}"
                        "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}"
                        "libGLX.so.0 ${GL_ROOT}"
                        "libGLX_nvidia.so.${NV_SOVER} ${GL_ROOT}"
                        "libGLdispatch.so.0 ${GL_ROOT}"

i.e. your problem is nothing to do with app-eselect/opengl !!

So it may be a problem - but it's nothing to do with this bug report... :-)
Never mind the fact that a dual-GPU setup adds a whole host of other complications...
Comment 50 HelLViS69 2016-05-17 23:20:29 UTC
(In reply to Bob Wya from comment #49)
> (In reply to HelLViS69 from comment #48)
> > I have egl, gles and gles2 disabled and still can't login to Plasma.. I
> > still have broken symlinks, pointing to old nvidia driver..
> 
> The invalid / "left-over" Nvidia driver version 355.11 symlinks (you quoted
> originally) are setup by the x11-drivers/nvidia-drivers package...
> "libEGL.so.1 ${GL_ROOT}"
>                         "libEGL_nvidia.so.${NV_SOVER} ${GL_ROOT}"
>                         "libGL.so.$(usex compat ${NV_SOVER} 1.0.0)
> ${GL_ROOT}"
>                         "libGLESv1_CM.so.1 ${GL_ROOT}"
>                         "libGLESv1_CM_nvidia.so.${NV_SOVER} ${GL_ROOT}"
>                         "libGLESv2.so.2 ${GL_ROOT}"
>                         "libGLESv2_nvidia.so.${NV_SOVER} ${GL_ROOT}"
>                         "libGLX.so.0 ${GL_ROOT}"
>                         "libGLX_nvidia.so.${NV_SOVER} ${GL_ROOT}"
>                         "libGLdispatch.so.0 ${GL_ROOT}"
> 
> i.e. your problem is nothing to do with app-eselect/opengl !!
> 
> So it may be a problem - but it's nothing to do with this bug report... :-)
> Never mind the fact that a dual-GPU setup adds a whole host of other
> complications...

Apart from NVidia symlinks, my Plasma 5 can't start with sddm neither with lightdm.. Only KDM can start it, leaving just the k-menu ( or kickoff or what's using now) and the only thing I can do is to kill X server..

The fact I have a dual GPU surely complicates things, but I didn't get any problem using KDE 4... every OpenGL stuff worked like a charm...
Comment 51 funzzy 2016-06-24 11:42:52 UTC
Hi all,

Is there any news about this problem ?

I have it since march and manage to workaround it by using x11 opengl, but now I really want to use the nvidia driver to have properly 3d support.

When I enable egl and gles2 the kde 5 desktop do not display but I can right click, open a browser, a konsole, and have all desktop effects (woobly, transparency, etc..)

If I disable gles2 use flag Kde desktop display correctly but I have no more desktop effects available (which mean no 3d hardware acceleration).

So I have done many tests on my system: 
* +gles -gles2 -gles3 -egl
* -gles +gles2 -gles3 +egl
* -gles -gles2 -gles3 +egl

and nothing seems to work properly.

Moreover, directFB-1.7.6 do not compile when I add egl use flag, don't know if it is related or not. So I have tested with an old directFB which do not have egl use flag, and with deactivating egl for directFB explicitly, but it change nothing on the problem.

I would appreciate a correct fix for this if something can be done by gentoo developpers.

Thank you,
Regards.
Comment 52 funzzy 2016-06-24 11:48:08 UTC
The directFb problem I was talking on my previous comment is related to this bug: 

https://bugs.gentoo.org/show_bug.cgi?id=540644
Comment 53 Bob Wya 2016-06-24 19:29:40 UTC
(In reply to funzzy from comment #51)
> Hi all,
> 
> Is there any news about this problem ?
> 
> I have it since march and manage to workaround it by using x11 opengl, but
> now I really want to use the nvidia driver to have properly 3d support.
> 
> When I enable egl and gles2 the kde 5 desktop do not display but I can right
> click, open a browser, a konsole, and have all desktop effects (woobly,
> transparency, etc..)
> 
> If I disable gles2 use flag Kde desktop display correctly but I have no more
> desktop effects available (which mean no 3d hardware acceleration).
> 
> So I have done many tests on my system: 
> * +gles -gles2 -gles3 -egl
> * -gles +gles2 -gles3 +egl
> * -gles -gles2 -gles3 +egl
> 
> and nothing seems to work properly.
> 

That issue may have nothing to do with this bug... This bug is in a stalemate position at present and additionally is still in an "unproven" state.

I've got some forked packages in my Overlay bobwya that implements the older eselect-opengl behaviour (symlink from the "/usr/lib{32,64}" directories). But I'm mature enough (cough) not to recommend them to other Gentoo users and in addition they are masked in the Overlay anyway.

There is a bug in the packaging of Plasma / Portage that means you have to manually rebuild the kde-frameworks/* package set and then the kde-plasma/* packages - after you make significant changes to your dev-qt/*:5 packages. Took me about 2 weeks of heartache to figure that one out... Give that a whirl on your system.

Every time I upgrade my dev-qt/*:5 libraries - I follow this 1-2-3 rebuild strategy now. Desktop effects are working fine on my laptop with an Geforce 970M + driver 367.27-r1 (from my overlay). That's apart from a few remaining known/reported KDE bugs - that aren't too major now...

I would recommend sticking to -gles (all versions!! Get it out of here!!) and -egl disabled for your dev-qt/*:5 libraries - when using the Nvidia proprietary driver. I'm still seeing folk posting on the forums, in recent times, saying this fixed their system!! Just remember to do a full rebuild of the Plasma stack - in order suggested above.
Comment 54 funzzy 2016-06-25 09:35:53 UTC
(In reply to Bob Wya from comment #53)
> That issue may have nothing to do with this bug... This bug is in a
> stalemate position at present and additionally is still in an "unproven"
> state.
> 
> I've got some forked packages in my Overlay bobwya that implements the older
> eselect-opengl behaviour (symlink from the "/usr/lib{32,64}" directories).
> But I'm mature enough (cough) not to recommend them to other Gentoo users
> and in addition they are masked in the Overlay anyway.
> 
> There is a bug in the packaging of Plasma / Portage that means you have to
> manually rebuild the kde-frameworks/* package set and then the kde-plasma/*
> packages - after you make significant changes to your dev-qt/*:5 packages.
> Took me about 2 weeks of heartache to figure that one out... Give that a
> whirl on your system.
> 
> Every time I upgrade my dev-qt/*:5 libraries - I follow this 1-2-3 rebuild
> strategy now. Desktop effects are working fine on my laptop with an Geforce
> 970M + driver 367.27-r1 (from my overlay). That's apart from a few remaining
> known/reported KDE bugs - that aren't too major now...
> 
> I would recommend sticking to -gles (all versions!! Get it out of here!!)
> and -egl disabled for your dev-qt/*:5 libraries - when using the Nvidia
> proprietary driver. I'm still seeing folk posting on the forums, in recent
> times, saying this fixed their system!! Just remember to do a full rebuild
> of the Plasma stack - in order suggested above.

Thank you for your reply.
I have tested your solution. In Use flag on make.conf the related use flags are: gles gles2 gles3 egl

in package.use I have:

dev-libs/DirectFB -egl
dev-qt/* -egl

And I have create a script to rebuild properly all the stuff in right order:

```
#!/bin/bash
INSTALLED_QT_PACKAGES=`eix --only-names -IC dev-qt`
INSTALLED_KDE_FRAMEWORK_PACKAGES=`eix --only-names -IC kde-frameworks`
INSTALLED_KDE_PLASMA_PACKAGES=`eix --only-names -IC kde-plasma`

emerge -1 $INSTALLED_QT_PACKAGES
emerge -1 $INSTALLED_KDE_FRAMEWORK_PACKAGES
emerge -1 $INSTALLED_KDE_PLASMA_PACKAGES
```

But, I have still the problem. Did I miss something ?
Thank you.
Comment 55 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-06-25 09:58:25 UTC
(In reply to funzzy from comment #54)
> Thank you for your reply.
> I have tested your solution. In Use flag on make.conf the related use flags
> are: gles gles2 gles3 egl

He meant you should have '-gles -gles2 -gles3 -egl' everywhere. Unless you're using some embedded system, you don't want any of that. It's going to cause a lot of harm and no benefit.
Comment 56 Oleh 2016-06-25 10:07:53 UTC
then, why not reduce gles USE usage :) on profile level. Because it is known to cause all sorts of a problems for users.
Comment 57 funzzy 2016-06-25 10:25:15 UTC
(In reply to Michał Górny from comment #55)
> (In reply to funzzy from comment #54)
> > Thank you for your reply.
> > I have tested your solution. In Use flag on make.conf the related use flags
> > are: gles gles2 gles3 egl
> 
> He meant you should have '-gles -gles2 -gles3 -egl' everywhere. Unless
> you're using some embedded system, you don't want any of that. It's going to
> cause a lot of harm and no benefit.

No opengl support = no problem ! Yes fine, I can also set opengl to xorg-x11 and my problems disappears ! I know that ! The goal is to have 3d support !
Comment 58 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-06-25 10:30:20 UTC
(In reply to funzzy from comment #57)
> No opengl support = no problem ! Yes fine, I can also set opengl to xorg-x11
> and my problems disappears ! I know that ! The goal is to have 3d support !

You're confusing gles (i.e. OpenGL ES -- for embedded systems) with regular OpenGL. You want the latter, done by USE=opengl. You don't want USE=gles* since it often disables regular OpenGL in favor of GLES that doesn't work well atm.
Comment 59 funzzy 2016-06-25 12:04:28 UTC
(In reply to Michał Górny from comment #58)
> (In reply to funzzy from comment #57)
> > No opengl support = no problem ! Yes fine, I can also set opengl to xorg-x11
> > and my problems disappears ! I know that ! The goal is to have 3d support !
> 
> You're confusing gles (i.e. OpenGL ES -- for embedded systems) with regular
> OpenGL. You want the latter, done by USE=opengl. You don't want USE=gles*
> since it often disables regular OpenGL in favor of GLES that doesn't work
> well atm.

Thank you very ! Yes I was confusing things, now it's better only with opengl.

Regards
Comment 60 Ultratux 2016-08-28 20:02:23 UTC
I think I'm suffering from this bug. I can launch sddm fine when using mesa, but after switching to nvidia I get black screens.

I think it's quite astonishing that this bug after 8 months hasn't even left status: UNCONFIRMED yet. What needs to get done to get this confirmed ?

I've read through all of this, but as a mere mortal user I haven't the faintest clue how to implement some of the workarounds suggested, and if so specifically which workarounds. 

I've found I had the egl USE flag in use, so I'm now rebuilding some packages. But from reading all the comments I have the feeling that alone will not fix it for me. Am I wrong?

Is anyone even looking at eventually addressing this bug...? It's been very quiet for a couple months now...
Comment 61 Bob Wya 2016-08-28 23:13:31 UTC
(In reply to Ultratux from comment #60)
> I think I'm suffering from this bug. I can launch sddm fine when using mesa,

That sums up the problem there in one word!! "think"

The most likely fix for your Plasma, LXQt (or whatever) issues is to force re-install your entire Qt5 stack with:
-egl -gles2

Start with dev-qt:
equery list -F'=$cpv:$slot' 'dev-qt/*' | awk '{if ($0 ~ /\:5/) printf("%s ", $0) }' | xargs emerge -1v

Then rebuild kde-frameworks:
equery list -F'=$cpv:$slot' 'kde-frameworks/*' | awk '{if ($0 ~ /\:5/) printf("%s ", $0) }' | xargs emerge -1v

Then rebuild plasma & sddm:
equery list -F'=$cpv:$slot' 'kde-plasma/*' | awk '{if ($0 ~ /\:5/) printf("%s ", $0) }' | xargs emerge -v x11-misc/sddm

Portage isn't smart enough to rebuild all the necessary packages... So taking a sledge hammer to it is probably the best way :-)
Comment 62 Ultratux 2016-08-29 17:58:10 UTC
Thanks Bob, for the help. I'm doing exactly as you suggested... currently finishing up with whatever emerge still wanted to reemerge after that. 

I'd like to note that I didn't have any gles* USE flags, only egl. Before running the commands you listed, I noticed that none of them listed any changed USE flags... they either were never emerged with those USE flags to begin with, or portage couldn't tell anymore...? Is that why you say "Portage isn't smart enough to ..." because these were not build-time flags... only run-time (or via linker?) ? Because that's what's been implied here, no? If it would show up with --newuse there would be no reason to update everything this way... 

Ahh... bad news... I'm sorry to say that the sddm problem did not disappear. I still get a black screen. X does start up fine, according to the Xorg.0.log, but just nothing that displays... 

btw: I'm not using systemd. Openrc here. Doubt it matters, but...
Comment 63 Jakub Panachida 2016-08-29 18:02:31 UTC
(In reply to Ultratux from comment #62)
> Ahh... bad news... I'm sorry to say that the sddm problem did not disappear.
> I still get a black screen. X does start up fine, according to the
> Xorg.0.log, but just nothing that displays... 
I've had the same problem. I've ditched sddm and use lightdm instead. I see no reason to stick with the long time brokem sddm.
Comment 64 Cory Lytle 2017-02-24 20:09:24 UTC
been having this problem for nearly a year. nearly threw this laptop away thinking the video card failed.
Comment 65 Andreas Sturmlechner gentoo-dev 2017-11-05 23:24:50 UTC
Can we rightfully conclude this bug was caused by USE flag confusion?
Comment 66 Andreas Sturmlechner gentoo-dev 2017-11-05 23:33:47 UTC
(In reply to Andreas Sturmlechner from comment #65)
> Can we rightfully conclude this bug was caused by USE flag confusion?
I'd say yes, since USE=gles2 seems to be in every comment I was skimming through.

Also since commit 535545f92c69775f435d022c902803099268ac9d, plasma profile has masked USE=gles2 on packages where it disables full OpenGL.
Comment 67 Realname 2017-11-16 22:45:24 UTC
(In reply to Andreas Sturmlechner from comment #66)
> (In reply to Andreas Sturmlechner from comment #65)
> > Can we rightfully conclude this bug was caused by USE flag confusion?
> I'd say yes, since USE=gles2 seems to be in every comment I was skimming
> through.
> 
> Also since commit 535545f92c69775f435d022c902803099268ac9d, plasma profile
> has masked USE=gles2 on packages where it disables full OpenGL.

So, what's the solution then? I'm facing this very same issue too with KDE/Plasma 5 and nvidia-drivers.
I did set -egl -gles* in my make.conf, recompiled Qt, the KDE frameworks, Plasma and sddm, with no success; then I just deleted any reference to egl and gles in make.conf so only the files in /usr/portage/profiles/targets/desktop/plasma/package.use.mask got the -gles2 USE flag; no success either, so I tried using LightDM, but it's been inutile too.
After losing a lot of time with all those "experiments" I still can't use Nvidia's OpenGL because I get no Plasmashell nor OpenGL. Only the mouse and individual apps that I can launch from custom keyboard shotcuts work, but there's no graphic acceleration (glxgears returns a «X Error of failed request:  BadWindow (invalid Window parameter)» message and some others complan about «Unrecognized OpenGL version» and «no OpenGL context»). So, so far, I'm forced to eselect xorg-x11 OpenGL.

If, as you say, all the problem comes from a simple USE flag confusion, could you please clarify here what should be the correct USE flag configuration so we, common users can stop shooting in the dark?


Regards.