Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 916099 - dev-util/vulkan-tools Vkcube crashes with a segfault
Summary: dev-util/vulkan-tools Vkcube crashes with a segfault
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-22 04:22 UTC by cerberus1746
Modified: 2024-03-06 21:23 UTC (History)
3 users (show)

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


Attachments
dmesg (dmesg.log,64.01 KB, text/plain)
2023-10-22 04:23 UTC, cerberus1746
Details
glxinfo (glxinfo.log,115.88 KB, text/x-log)
2023-10-22 04:24 UTC, cerberus1746
Details
prime-run glxinfo (prime-run_glxinfo.log,115.88 KB, text/x-log)
2023-10-22 04:24 UTC, cerberus1746
Details
vulkaninfo (vulkaninfo.log,138.82 KB, text/x-log)
2023-10-22 04:24 UTC, cerberus1746
Details
GDB debugging (gdb-without-prime.log,2.04 KB, text/x-log)
2023-10-22 04:29 UTC, cerberus1746
Details
GDB debugging with prime-run (gdb-with-prime-run.txt,2.93 KB, text/plain)
2023-10-22 04:29 UTC, cerberus1746
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cerberus1746 2023-10-22 04:22:07 UTC
Obs: This was resolved by installing x11-drivers/nvidia-drivers-545.23.06 (beta version)

I am using a Alienware 15 r2 (https://laptopmedia.com/laptop-specs/alienware-15-r2-41/) it has optimus, intel integrated graphics (Intel Core i5-6300HQ), no I can't disable it in the bios, and a nvidia card (NVIDIA GeForce GTX 965M).

In sum with Plasma Wayland and Hyprland vkcube-wayland literally crashes with a segmentation fault. And I have no idea why.

Here's what kinda worked but they are not the ideal solution:

* If I configure Hyprland to only use my nvidia video card, everything works, vkcube-wayland renders fine, a beta version of godot with wayland works, the performance is excelent, except my embedded monitor does not work, the only visble thing is the tty that never moves or do anything, and most of the time my notebook is not connected to the external monitor.
* Anything X related works fine and in wayland anything that does not require vulkan works, I can compile packages to use only OpenGL, but, vulkan is better overall and I want to move completely to wayland and even develop things with wayland and vulkan.
* Xwayland works perfectly fine regardless if it's vulkan or opengl. Don't ask me why, it just works.
* I can make everything work using only the CPU's embedded GPU... Which of course, the performance goes to hell

using egl-wayland 1.11, 1.12 and 1.13 did nothing.

And I kid you not, vulkaninfo always, always, ended in a segmentation fault, regardless if vkcube-wayland or whatever works, it segfaults at the end.

if I run vkcube-wayland with prime-run, isntead of segmentation fault, I get this error instead:

> Selected GPU 1: NVIDIA GeForce GTX 965M, type: DiscreteGpu
> [destroyed object]: error 7: importing the supplied dmabufs failed

Reproducible: Always

Steps to Reproduce:
1. Have a optimus laptop
2. Try to run 
Actual Results:  
crash

Expected Results:  
spinning cube

[code]Portage 3.0.51 (python 3.11.5-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-13, glibc-2.37-r7, 6.1.57-gentoo x86_64)
=================================================================
System uname: Linux-6.1.57-gentoo-x86_64-Intel-R-_Core-TM-_i5-6300HQ_CPU_@_2.30GHz-with-glibc2.37
KiB Mem:    16251552 total,  11216156 free
KiB Swap:    5119996 total,   5119996 free
Timestamp of repository gentoo: Fri, 20 Oct 2023 06:00:01 +0000
Head commit of repository gentoo: a35cb7d6e678394792c71f12c68415f29d7526dc
Timestamp of repository guru: Thu, 19 Oct 2023 18:31:51 +0000
Head commit of repository guru: 1caf9ef5c1266bffd7ba26a608d6ef38d747d9ee

Timestamp of repository steam-overlay: Mon, 09 Oct 2023 11:02:51 +0000
Head commit of repository steam-overlay: ddede83b687eabedeb5dc5aff2d33d2e62296f90

sh bash 5.1_p16-r6
ld GNU ld (Gentoo 2.40 p5) 2.40.0
ccache version 4.8.2 [enabled]
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r6::gentoo
dev-java/java-config:      2.3.1-r1::gentoo
dev-lang/perl:             5.38.0-r1::gentoo
dev-lang/python:           3.11.5::gentoo
dev-lang/rust:             1.71.1::gentoo
dev-util/ccache:           4.8.2::gentoo
dev-util/cmake:            3.26.5-r2::gentoo
dev-util/meson:            1.2.1-r1::gentoo
sys-apps/baselayout:       2.14::gentoo
sys-apps/openrc:           0.48::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/autoconf:        2.13-r7::gentoo, 2.71-r6::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.40-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           15.0.7-r3::gentoo, 16.0.6::gentoo
sys-devel/gcc:             12.3.1_p20230825::gentoo, 13.2.1_p20230826::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             16.0.6::gentoo
sys-devel/llvm:            15.0.7-r3::gentoo, 16.0.6::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.37-r7::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: 4
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24

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

local
    location: /var/db/repos/local
    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="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-ftree-vectorize -march=skylake -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /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"
CXXFLAGS="-ftree-vectorize -march=skylake -O2 -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--ask --autounmask --autounmask-write=y"
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="-ftree-vectorize -march=skylake -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live ccache config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-ftree-vectorize -march=skylake -O2 -pipe"
GENTOO_MIRRORS="https://gentoo.zero.com.ar/gentoo/     rsync://gentoo.zero.com.ar/gentoo     https://gentoo.c3sl.ufpr.br/     http://gentoo.c3sl.ufpr.br/     rsync://gentoo.c3sl.ufpr.br/gentoo/"
LANG="C.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
LINGUAS="pt_BR en en_US"
MAKEOPTS="-j4"
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"
RUSTFLAGS="-C target-cpu=skylake"
SHELL="/bin/zsh"
USE="X a52 aac acl acpi activities alsa amd64 bluetooth branding bzip2 cairo cli crypt cuda cups dbus declarative dri dts elogind encode exif flac flatpak fortran gdbm gif gpm gui hwaccel iconv icu ipv6 jpeg kde kwallet lcms libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses networkmanager nls nptl nvenc ogg opengl openmp pam pango pcre pdf pipewire plasma png policykit ppds pulseaudio qml qt5 readline screencast sdl seccomp semantic-desktop sound spell split-usr ssl startup-notification svg system-png test-rust thunderbolt tiff truetype udev udisks unicode upower usb vorbis vulkan wayland widgets wifi wxwidgets x264 xattr xcb xft xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2021" 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt rdrand sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" L10N="pt-BR en en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" 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="pypy3 python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="intel nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, 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, RANLIB, READELF, SIZE, STRINGS, STRIP, YACC, YFLAGS[/code]
Comment 1 cerberus1746 2023-10-22 04:23:38 UTC
Created attachment 873199 [details]
dmesg
Comment 2 cerberus1746 2023-10-22 04:24:00 UTC
Created attachment 873200 [details]
glxinfo
Comment 3 cerberus1746 2023-10-22 04:24:40 UTC
Created attachment 873201 [details]
prime-run glxinfo
Comment 4 cerberus1746 2023-10-22 04:24:59 UTC
Created attachment 873202 [details]
vulkaninfo
Comment 5 cerberus1746 2023-10-22 04:29:08 UTC
Created attachment 873203 [details]
GDB debugging
Comment 6 cerberus1746 2023-10-22 04:29:56 UTC
Created attachment 873204 [details]
GDB debugging with prime-run
Comment 7 Ionen Wolkens gentoo-dev 2023-10-22 04:32:32 UTC
>Obs: This was resolved by installing x11-drivers/nvidia-drivers-545.23.06 (beta version)
Are you saying that everything works with 545 and the issue is solved? I don't follow. What's Obs: refering to here? obs-studio? (it's not mentioned anywhere else so I was wondering where this fits in).

This beta has a lot of wayland improvements and changed vulkan handling (no more vulkan-producer helper lib), and supposedly has fixes for offloading on wayland -- so this does not sound too surprising.

Either way, wayland with nvidia is still a pretty experimental thing, even moreso with offloading and there's probably nothing vulkan-tools can do there.
Comment 8 cerberus1746 2023-10-22 04:39:40 UTC
>Are you saying that everything works with 545 and the issue is solved? I don't follow. What's Obs: refering to here? obs-studio? (it's not mentioned anywhere else so I was wondering where this fits in)

Obs as in observation. And yes, it works with that beta.

I was asked if I could post here by Kangie and immolo to document or see if there were an alternative fix, I believe and we weren't so sure where to post and since I found the issue in vkcube-wayland I thought I could post here.

But feel free to close or move or something.
Comment 9 Nick Sarnie gentoo-dev 2023-10-23 16:22:18 UTC
I can't imagine there is anything wrong with vkcube, especially if a new nvidia driver fixes it, probably there was a problem in their vulkan implementation.