Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
MESA-LOADER: failed to open zink
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
madjestic
n00b
n00b


Joined: 10 Oct 2013
Posts: 53

PostPosted: Tue Mar 19, 2024 9:42 pm    Post subject: MESA-LOADER: failed to open zink Reply with quote

Hey guys,

When I start some graphical applications from the terminal, e.g. glxgears, I am getting an error like this:
Code:

$ glxgears
MESA-LOADER: failed to open zink: /usr/lib64/dri/zink_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib64/dri, suffix _dri)
failed to load driver: zink


Any idea what may be causing this?

Here's some relevant output:
Code:

$ eix -I mesa
[I] media-libs/mesa
     Available versions:  23.3.5^t 23.3.6^t (~)24.0.1^t (~)24.0.2^t (~)24.0.3^t **9999*l^t {+X d3d9 debug gles1 +gles2 +llvm lm-sensors opencl +opengl osmesa +proprietary-codecs selinux test unwind vaapi valgrind vdpau vulkan vulkan-overlay wayland xa zink +zstd ABI_MIPS="n32 n64 o32" ABI_S390="32 64" ABI_X86="32 64 x32" CPU_FLAGS_X86="sse2" LLVM_SLOT="15 16 +17" VIDEO_CARDS="d3d12 freedreno intel lavapipe lima nouveau panfrost r300 r600 radeon radeonsi v3d vc4 virgl vivante vmware"}
     Installed versions:  24.0.3^t(10:33:01 PM 03/19/2024)(X d3d9 gles1 gles2 llvm opencl opengl proprietary-codecs vulkan vulkan-overlay wayland zstd -debug -lm-sensors -osmesa -selinux -test -unwind -vaapi -valgrind -vdpau -xa -zink ABI_MIPS="-n32 -n64 -o32" ABI_S390="-32 -64" ABI_X86="32 64 -x32" CPU_FLAGS_X86="sse2" LLVM_SLOT="17 -15 -16" VIDEO_CARDS="intel -d3d12 -freedreno -lavapipe -lima -nouveau -panfrost -r300 -r600 -radeon -radeonsi -v3d -vc4 -virgl -vivante -vmware")
     Homepage:            https://www.mesa3d.org/ https://mesa.freedesktop.org/
     Description:         OpenGL-like graphic library for Linux



(from make.conf):
Code:
 
USE="-initramfs -java elogind -systemd -consolekit X emacs xft \
     mpeg mjpeg ffmpeg x264 win32codecs quicktime mp3 mp4 acc alsa \
     networkmanager jack wacom opengl opencl vulkan \
     a52 aac alsa cdda dts dv dvb dvd ffmpeg flac jack lame \
     libass modplug mp3 mpeg ogg opus oss pulseaudio
     theora v4l vaapi vcd vorbis wavpack"

VIDEO_CARDS="intel"


[EDIT : ]

I've got the zink USE flag added to mesa packag.use, however it seems to be ignored when I am emerging it, as seen from the eix output above.

package.use/mesa:
Code:

media-libs/mesa vulkan opencl d3d9 gles1 gles2 llvm vulkan-overlay proprietary-codecs vdpau xa vaapi zink
x11-libs/xcb-util-keysyms   abi_x86_32
>=x11-libs/libvdpau-1.5     abi_x86_32


Here's the make.conf in full:
Code:

# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
COMMON_FLAGS="-march=native -O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
MICROCODE_SIGNATURES="-s 0x000906a3"

# NOTE: This stage was built with the bindist Use flag enabled
PORTDIR="/var/db/repos/gentoo"
DISTDIR="/var/cache/distfiles"
PKGDIR="/var/cache/binpkgs"

MAKEOPTS="-j15"

CHOST="x86_64-pc-linux-gnu"

CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 ssse3"

USE="-initramfs -java elogind -systemd -consolekit X emacs xft \
     mpeg mjpeg ffmpeg x264 win32codecs quicktime mp3 mp4 acc alsa \
     networkmanager jack wacom opengl opencl vulkan \
     a52 aac alsa cdda dts dv dvb dvd ffmpeg flac jack lame \
     libass modplug mp3 mpeg ogg opus oss pulseaudio
     theora v4l vaapi vcd vorbis wavpack -wayland"

LINGUAS="en ru"
L10N="en-GB pl ru"
#INPUT_DEVICES="evdev keyboard mouse synaptics libinput wacom joystick"
#INPUT_DEVICES="synaptics libinput"
INPUT_DEVICES="synaptics libinput"

GENTOO_MIRRORS="https://mirror.leaseweb.com/gentoo/ http://mirror.leaseweb.com/gentoo/ rsync://mirror.leaseweb.com/gentoo/ \
      https://ftp.snt.utwente.nl/pub/os/linux/gentoo http://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo \
      rsync://ftp.snt.utwente.nl/gentoo"


VIDEO_CARDS="intel"

ACCEPT_LICENSE="-* @FREE @BINARY-REDISTRIBUTABLE"

GRUB_PLATFORMS="efi-64"

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


emerge iinfo:
Quote:

$ emerge --info
Portage 3.0.61 (python 3.11.8-final-0, default/linux/amd64/17.1/desktop, gcc-13, glibc-2.38-r10, 6.8.1-gentoo x86_64)
=================================================================
System uname: Linux-6.8.1-gentoo-x86_64-12th_Gen_Intel-R-_Core-TM-_i5-1240P-with-glibc2.38
KiB Mem: 32572136 total, 27915688 free
KiB Swap: 67108860 total, 67108860 free
Timestamp of repository gentoo: Wed, 20 Mar 2024 13:00:00 +0000
Head commit of repository gentoo: db3dab5b1d105504faa8d7d9f03287fa049c8019
Timestamp of repository audio-overlay: Fri, 15 Mar 2024 21:04:02 +0000
Head commit of repository audio-overlay: a49f59282899b138792ddd785ff99998eaf1801a

Timestamp of repository gentoo-zh: Wed, 20 Mar 2024 08:35:06 +0000
Head commit of repository gentoo-zh: d7b7ae9f5bbff0a92563d6a590e24e2d3cb51b30

Timestamp of repository guru: Wed, 20 Mar 2024 12:03:19 +0000
Head commit of repository guru: 4de73f5aba2a3105dafb2a25ef5caa5171d8476e

Timestamp of repository haskell: Tue, 19 Mar 2024 07:50:16 +0000
Head commit of repository haskell: e3a48d8f52f8f4d3c361ae4269433ed8044e0e9c

Timestamp of repository nix-guix: Sun, 23 Apr 2023 19:46:57 +0000
Head commit of repository nix-guix: d00abbc44841e876d5db47e60ad408cb1d1c322b

Timestamp of repository steam-overlay: Fri, 15 Mar 2024 21:03:58 +0000
Head commit of repository steam-overlay: e01d021389d2d9eb6ac88d559c83a8f5a7b54982

sh bash 5.1_p16-r6
ld GNU ld (Gentoo 2.41 p5) 2.41.0
app-misc/pax-utils: 1.3.7::gentoo
app-shells/bash: 5.1_p16-r6::gentoo
dev-build/autoconf: 2.71-r6::gentoo
dev-build/automake: 1.16.5-r2::gentoo
dev-build/cmake: 3.28.3::gentoo
dev-build/libtool: 2.4.7-r2::gentoo
dev-build/make: 4.4.1-r1::gentoo
dev-build/meson: 1.3.1-r1::gentoo
dev-lang/perl: 5.38.2-r2::gentoo
dev-lang/python: 3.11.8_p1::gentoo, 3.12.2_p1::gentoo
dev-lang/rust-bin: 1.74.1::gentoo
sys-apps/baselayout: 2.14-r2::gentoo
sys-apps/openrc: 0.53::gentoo
sys-apps/sandbox: 2.38::gentoo
sys-devel/binutils: 2.41-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang: 15.0.7-r3::gentoo, 17.0.6::gentoo
sys-devel/gcc: 13.2.1_p20240210::gentoo
sys-devel/gcc-config: 2.11::gentoo
sys-devel/lld: 15.0.7::gentoo
sys-devel/llvm: 15.0.7-r3::gentoo, 17.0.6::gentoo
sys-kernel/linux-headers: 6.6::gentoo (virtual/os-headers)
sys-libs/glibc: 2.38-r10::gentoo
Repositories:

gentoo
location: /var/db/repos/gentoo
sync-type: rsync
sync-uri: rsync://rsync.gentoo.org/gentoo-portage
priority: -1000
volatile: False
sync-rsync-extra-opts:
sync-rsync-verify-jobs: 1
sync-rsync-verify-metamanifest: yes
sync-rsync-verify-max-age: 24

audio-overlay
location: /var/db/repos/audio-overlay
sync-type: git
sync-uri: https://github.com/gentoo-mirror/audio-overlay.git
masters: gentoo
volatile: False

gentoo-zh
location: /var/db/repos/gentoo-zh
sync-type: git
sync-uri: https://github.com/gentoo-mirror/gentoo-zh.git
masters: gentoo
volatile: False

guru
location: /var/db/repos/guru
sync-type: git
sync-uri: https://github.com/gentoo-mirror/guru.git
masters: gentoo
volatile: False

haskell
location: /var/db/repos/haskell
sync-type: git
sync-uri: https://github.com/gentoo-mirror/haskell.git
masters: gentoo
volatile: False

nix-guix
location: /var/db/repos/nix-guix
sync-type: git
sync-uri: https://github.com/gentoo-mirror/nix-guix.git
masters: gentoo
volatile: False

steam-overlay
location: /var/db/repos/steam-overlay
sync-type: git
sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
masters: gentoo
volatile: False

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE @BINARY-REDISTRIBUTABLE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="https://mirror.leaseweb.com/gentoo/ http://mirror.leaseweb.com/gentoo/ rsync://mirror.leaseweb.com/gentoo/ https://ftp.snt.utwente.nl/pub/os/linux/gentoo http://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo rsync://ftp.snt.utwente.nl/gentoo"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
LINGUAS="en ru"
MAKEOPTS="-j15"
PKGDIR="/var/cache/binpkgs"
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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac acc acl acpi alsa amd64 bluetooth branding bzip2 cairo cdda cdr cli crypt cups dbus dri dts dv dvb dvd dvdr elogind emacs encode exif ffmpeg flac fortran gdbm gif gpm gtk gui iconv icu ipv6 jack jpeg lame lcms libass libnotify libtirpc mad mjpeg mng modplug mp3 mp4 mpeg multilib ncurses networkmanager nls ogg opencl opengl openmp opus oss pam pango pcre pdf png policykit ppds pulseaudio qt5 quicktime readline sdl seccomp sound spell split-usr ssl startup-notification svg test-rust theora tiff truetype udev udisks unicode upower usb v4l vaapi vcd vorbis vulkan wacom wavpack win32codecs wxwidgets x264 xattr xcb xft xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="synaptics libinput" KERNEL="linux" L10N="en-GB pl ru" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS



Regards,
V
Back to top
View user's profile Send private message
madjestic
n00b
n00b


Joined: 10 Oct 2013
Posts: 53

PostPosted: Wed Mar 20, 2024 8:20 pm    Post subject: Reply with quote

So, I did a bit of digging, and it looks like zink USE flag was masked out from the profile.

By adding the following to the /etc/portage/profile/use.mask :
Code:

-zink


I was able to emerge mesa with zink USE flag. However, now I am getting another error:
Code:

$ glxgears
MESA: error: Unknown kernel mode driver
MESA: error: Unknown kernel mode driver
MESA: error: ZINK: vkEnumeratePhysicalDevices failed (VK_ERROR_INITIALIZATION_FAILED)
MESA: error: ZINK: failed to choose pdev
glx: failed to create drisw screen
failed to load driver: zink
1061 frames in 5.0 seconds = 212.126 FPS


Which is, I guess, fair enough, there's a reason for it to be masked out to begin with, but I wonder if I can fix that, or maybe it's better to wait for a future release?

Surprisingly or not, despite the error, performance is the same as before the change.
Back to top
View user's profile Send private message
sphakka
Tux's lil' helper
Tux's lil' helper


Joined: 24 Jun 2003
Posts: 79

PostPosted: Mon Apr 15, 2024 7:21 pm    Post subject: Reply with quote

madjestic wrote:

Which is, I guess, fair enough, there's a reason for it to be masked out to begin with, but I wonder if I can fix that, or maybe it's better to wait for a future release?

Surprisingly or not, despite the error, performance is the same as before the change.


Here's the reason for masking 'zink'.

BTW, with my old Intel graphics gen. 4th, after upgrading the system to profile 23.0 and mesa-24.0.4, I *do* have performance issues and see other errors. F.i., mpv complains:
Code:

libEGL warning: DRI2: failed to authenticate
libEGL warning: MESA-LOADER: failed to open zink: /usr/lib64/dri/zink_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib64/dri, suffix _dri)

[vo/gpu/opengl] Suspected software renderer or indirect context.
[vo/gpu/drm] VT_GETMODE failed: Inappropriate ioctl for device
[vo/gpu/drm] Failed to set up VT switcher. Terminal switching will be unavailable.
[vo/gpu/drm] Failed to acquire DRM master: Permission denied
[vo/gpu/drm] Failed to commit ModeSetting atomic request: Permission denied
[vo/gpu/opengl] Failed to set CRTC for connector 79: Permission denied
[vo/gpu] Failed to commit atomic request: Permission denied
[vo/gpu/drm] Failed to commit ModeSetting atomic request: Permission denied
[vo/gpu/drm] Failed to restore previous mode
[vo/gpu/drm] Failed to drop DRM master: Permission denied

And starts dropping frames under heavy system load, which wasn't the case before... Is mesa-24 broken??
Back to top
View user's profile Send private message
sphakka
Tux's lil' helper
Tux's lil' helper


Joined: 24 Jun 2003
Posts: 79

PostPosted: Tue Apr 16, 2024 12:46 pm    Post subject: Reply with quote

After digging quite a bit, I discovered that, in my case, zink had really nothing to do with the issue. I suspect that, for some reason, during the system profile upgrade (17.1 => 23.0), the original Intel DDX driver `x11-drivers/xf86-video-intel` got (re-)installed. The puzzling thing is that my X.Org configuration was (apparently?) still using it, even if my system was supposed to use modesetting DDX since a while!

So, I just removed `x11-drivers/xf86-video-intel` and reconfigured X with modesetting DDX and voilà :-)

Here it is how it looks now:

Code:

$ inxi -G
Graphics:
  Device-1: Intel 4th Gen Core Processor Integrated Graphics driver: i915
    v: kernel
  Device-2: Realtek Integrated Camera driver: uvcvideo type: USB
  Display: server: X.Org v: 21.1.13 driver: X: loaded: modesetting
    dri: crocus gpu: i915 resolution: 1920x1080~60Hz
  API: EGL v: 1.5 drivers: crocus,swrast
    platforms: gbm,x11,surfaceless,device
  API: OpenGL v: 4.6 vendor: intel mesa v: 24.0.4 renderer: Mesa Intel HD
    Graphics 4600 (HSW GT2)


Code:

$ glxinfo -B
name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel (0x8086)
    Device: Mesa Intel(R) HD Graphics 4600 (HSW GT2) (0x416)
    Version: 24.0.4
    Accelerated: yes
    Video memory: 1536MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) HD Graphics 4600 (HSW GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 24.0.4
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 24.0.4
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 24.0.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20


HTH!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

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