Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 562996 - media-libs/mesa-11.0.3 VIDEO_CARDS="amdgpu radeonsi", glxgears run as user: "dlopen /usr/lib64/dri/amdgpu_dri.so failed"
Summary: media-libs/mesa-11.0.3 VIDEO_CARDS="amdgpu radeonsi", glxgears run as user: "...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-13 14:44 UTC by Alpha Bravo
Modified: 2017-01-29 04:41 UTC (History)
3 users (show)

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


Attachments
output of # glxinfo (run as root) (glxinfo_root,92.56 KB, text/plain)
2015-10-13 14:53 UTC, Alpha Bravo
Details
output of $ glxinfo (run as user) (glxinfo_user,47.27 KB, text/plain)
2015-10-13 14:53 UTC, Alpha Bravo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alpha Bravo 2015-10-13 14:44:32 UTC
After switching from CONFIG_DRM_RADEON to CONFIG_DRM_AMDGPU with kernel-4.2.3 on Kaveri-CPU, I hit that weird problem that OpenGL doesn't seem to work for non-
root users with media-libs/mesa-11.0.3 and VIDEO_CARDS="amdgpu radeonsi":

$ LIBGL_DEBUG="verbose" glxgears
MESA-LOADER: could not create udev device for fd 4
libGL: OpenDriver: trying /usr/lib64/dri/tls/amdgpu_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/amdgpu_dri.so
libGL: dlopen /usr/lib64/dri/amdgpu_dri.so failed (/usr/lib64/dri/amdgpu_dri.so: cannot open shared object file: No such file or directory)
libGL error: unable to load driver: amdgpu_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: amdgpu
libGL: OpenDriver: trying /usr/lib64/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/swrast_dri.so
libGL: Can't open configuration file /home/user/.drirc: No such file or directory.
libGL: Can't open configuration file /home/user/.drirc: No such file or directory.
Killed

# LIBGL_DEBUG="verbose" glxgears
libGL: OpenDriver: trying /usr/lib64/dri/tls/radeonsi_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/radeonsi_dri.so
libGL: Can't open configuration file /root/.drirc: No such file or directory.
libGL: Can't open configuration file /root/.drirc: No such file or directory.
libGL: Using DRI2 for screen 0
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.

Reproducible: Always




kernel-config:
CONFIG_EXTRA_FIRMWARE="radeon/kaveri_ce.bin radeon/kaveri_me.bin radeon/kaveri_mec2.bin radeon/kaveri_mec.bin radeon/kaveri_pfp.bin 
radeon/kaveri_rlc.bin radeon/kaveri_sdma1.bin radeon/kaveri_sdma.bin radeon/kaveri_uvd.bin radeon/kaveri_vce.bin"
CONFIG_DRM_AMDGPU=y
CONFIG_DRM_AMDGPU_CIK=y
CONFIG_DRM_AMDGPU_USERPTR=y

The video_cards_amdgpu USE-Flag was unmasked and it was necessary to put "=x11-libs/libdrm-2.4.65 video_cards_radeon" in /etc/portage/package.use due to a depe
ndency by mesa[video_cards_radeonsi]
The video_cards_amdgpu USE-Flag is unmasked and it was necessary to put "=x11-libs/libdrm-2.4.65 video_cards_radeon" in /etc/portage/package.use due to
x11-libs/xorg-drivers-1.17 (video_cards_radeonsi ? x11-drivers/xf86-video-ati[glamor])
x11-drivers/xf86-video-ati-7.5.0 (>=x11-libs/libdrm-2.4.58[video_cards_radeon])
and
media-libs/mesa-11.0.3 (video_cards_radeonsi ? >=x11-libs/libdrm-2.4.64[video_cards_radeon])

emerge --info
Portage 2.2.23 (python 3.4.3-final-0, hardened/linux/amd64/no-multilib, gcc-5.2.0, glibc-2.21-r1, 4.2.3-hardened-r1 x86_64)
=================================================================
System uname: Linux-4.2.3-hardened-r1-x86_64-AMD_A10-7800_Radeon_R7,_12_Compute_Cores_4C+8G-with-gentoo-2.2
KiB Mem:    15382400 total,  14273932 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Tue, 13 Oct 2015 00:45:01 +0000
sh bash 4.3_p42
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42::gentoo
dev-lang/perl:            5.22.0::gentoo
dev-lang/python:          2.7.10::gentoo, 3.4.3::gentoo, 3.5.0-r1::gentoo
dev-util/cmake:           3.3.2-r1::gentoo
dev-util/pkgconfig:       0.29::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.18::gentoo
sys-apps/sandbox:         2.9::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            5.2.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.2::gentoo (virtual/os-headers)
sys-libs/glibc:           2.21-r1::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://61.244.88.96/pub/linux/gentoo/"
INSTALL_MASK="/lib/systemd /lib32/systemd /lib64/systemd /usr/lib/systemd /usr/lib32/systemd /usr/lib64/systemd /etc/systemd"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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="/var/tmp"
USE="X acl alsa amd64 bindist bzip2 cli cracklib crypt cups cxx dri gdbm hardened iconv ipv6 jpeg justify mmx mmxext modules ncurses nls nptl opengl openmp pax_kernel pcre pie png qt5 readline seccomp session sse sse2 ssl ssp tcpd threads udev unicode urandom vaapi vdpau wayland xattr xtpax zlib" ABI_X86="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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx fma3 fma4 mmx mmxext popcnt sse sse2 sse3 ssse3 sse4_1 sse4_2 xop" 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" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python3_4 python3_5" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi" 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"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

media-libs/mesa-11.0.3::gentoo was built with the following:
USE="bindist classic dri3 egl gallium gbm llvm nptl opencl openmax pax_kernel udev vaapi vdpau wayland -d3d9 -debug -gles1 -gles2 -osmesa -pic (-selinux) -xa -xvmc" VIDEO_CARDS="radeonsi -freedreno -i915 -i965 -ilo -intel -nouveau -r100 -r200 -r300 -r600 -radeon -vmware"
Comment 1 Alpha Bravo 2015-10-13 14:53:01 UTC
Created attachment 414500 [details]
output of # glxinfo (run as root)
Comment 2 Alpha Bravo 2015-10-13 14:53:40 UTC
Created attachment 414502 [details]
output of $ glxinfo (run as user)
Comment 3 Andrei Slavoiu 2015-10-13 18:52:34 UTC
That sounds a lot like the issue here: https://forums.gentoo.org/viewtopic-p-7662734.html
Check your grsec settings or other permission problems.
Comment 4 Alpha Bravo 2015-10-13 20:21:09 UTC
Regarding the line "MESA-LOADER: could not create udev device for fd 4" I agree, but I don't think that's the problem here. amdgpu_dri.so doesn't exist anywhere on the system and afaiu running glxgears as user mesa should try to load radeonsi_dri.so instead of amdgpu_dri.so, just like it does when run as root (at least that's the impression I got from my research on the web, though right now I can't provide any sources - as soon as I find anything I will report it here).

Using the kernel with
CONFIG_EXTRA_FIRMWARE="radeon/kaveri_ce.bin radeon/kaveri_me.bin radeon/kaveri_mec2.bin radeon/kaveri_mec.bin radeon/kaveri_pfp.bin
radeon/kaveri_rlc.bin radeon/kaveri_sdma1.bin radeon/kaveri_sdma.bin radeon/kaveri_uvd.bin radeon/kaveri_vce.bin radeon/BONAIRE_uvd.bin
radeon/BONAIRE_vce.bin"
CONFIG_DRM_RADEON=y
CONFIG_DRM_RADEON_USERPTR=y
CONFIG_HSA_AMD=y
# CONFIG_DRM_AMDGPU is not set
I don't experience the described problem, despite glxgears also complaining about not being able to create udev device:

$ LIBGL_DEBUG="verbose" glxgears
MESA-LOADER: could not create udev device for fd 4
libGL: OpenDriver: trying /usr/lib64/dri/tls/radeonsi_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/radeonsi_dri.so
MESA-LOADER: could not create udev device for fd 4
libGL: Can't open configuration file /home/user/.drirc: No such file or directory.
libGL: Can't open configuration file /home/user/.drirc: No such file or directory.
libGL: Using DRI2 for screen 0
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.

With the latter DRM_RADEON-kernel kwin works with opengl and supertuxkart works, I don't run into this bug: https://bugs.archlinux.org/task/40807#comment133021 and vaapi and vdpau work in contrast to the DRM_AMDGPU-kernel.
Comment 5 Alpha Bravo 2015-10-13 20:46:08 UTC
http://xorg.freedesktop.org/wiki/RadeonFeature
Afaiu radeonsi is the 3D driver which is needed for accelerated 2D (glamor) and thus should be loaded here.
Comment 6 Matt Turner gentoo-dev 2017-01-29 04:41:05 UTC
I've never heard of a problem like this. There's no amdgpu_dri.so driver in Mesa... I figure that's part of the proprietary driver package.

Can you still reproduce this with current stable?