sakaki- / genpi64-overlay

Gentoo overlay for the Raspberry Pi 3 and 4
GNU General Public License v3.0
53 stars 48 forks source link

rpi4 media-libs/mesa failed to enable V3D renderer #17

Closed yrzr closed 5 years ago

yrzr commented 5 years ago

I have already used the ebuild of media-libs/mesa from this overlay and enabled video_cards_vc4.

chris@pi ~> emerge -pv mesa

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

Calculating dependencies... done!
[ebuild   R   ~] media-libs/mesa-19.1.4-r1::rpi3  USE="dri3 egl gallium gbm gles1 gles2 llvm wayland xa xvmc -classic (-d3d9) -debug (-libglvnd) (-lm_sensors) (-opencl) -osmesa -pax_kernel -pic (-selinux) -test -unwind -vaapi (-valgrind) (-vdpau) (-vulkan) (-vulkan-overlay)" VIDEO_CARDS="vc4 -freedreno (-i915) (-i965) (-intel) -iris -nouveau (-r100) (-r200) (-r300) (-r600) (-radeon) (-radeonsi) -virgl -vivante (-vmware)" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB
chris@pi ~> emerge --info
Portage 2.3.69 (python 3.6.5-final-0, default/linux/arm64/17.0/desktop/plasma, gcc-8.3.0, glibc-2.29-r2, 4.19.65-v8-yrzr+ aarch64)
=================================================================
System uname: Linux-4.19.65-v8-yrzr+-aarch64-with-gentoo-2.6
KiB Mem:     3845128 total,   3186032 free
KiB Swap:    4565496 total,   4565496 free
Head commit of repository gentoo: 3d43e49f72db16c4fc96c9f108473abb1fb2a3fc

Head commit of repository rpi3: 4808b8b61686d278673395a7a4320aae20e81c25

sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.32 p2) 2.32.0
ccache version 3.7.1 [enabled]
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.28.2-r1::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo
dev-util/ccache:          3.7.1::gentoo
dev-util/cmake:           3.14.6::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.41.2::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            8.3.0-r1::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/gentoo.git
    priority: -1000

rpi3
    location: /usr/local/portage/rpi3
    sync-type: git
    sync-uri: https://github.com/sakaki-/rpi3-overlay.git
    masters: gentoo
    priority: 100

Installed sets: @base, @emulation, @fonts, @kde5, @network, @raspberrypi
ACCEPT_KEYWORDS="amd64 arm64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="aarch64-unknown-linux-gnu"
CFLAGS="-march=armv8-a+crc -mcpu=cortex-a72 -mtune=cortex-a72 -mabi=lp64 -O2 -pipe -ftree-vectorize"
CHOST="aarch64-unknown-linux-gnu"
CONFIG_PROTECT="/boot/cmdline.txt /boot/config.txt /etc /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="-march=armv8-a+crc -mcpu=cortex-a72 -mtune=cortex-a72 -mabi=lp64 -O2 -pipe -ftree-vectorize"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=y --keep-going --verbose-conflicts --usepkg"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg 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 sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi activities alsa arm64 berkdb bluetooth branding btrfs bzip2 cairo cdda cdr cli crypt cups cxx dbus declarative dri dts dvdr egl elogind emboss encode exif fam flac fortran gdbm gif glamor gles gles1 gles2 gpm gtk http2 iconv icu ipv6 jpeg kde kipi kwallet lcms libnotify libtirpc libv4l lto mad mng mp3 mp4 mpeg mudflap ncurses neon nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds pulseaudio qml qt5 readline sanitize sddm seccomp semantic-desktop spell split-usr ssl startup-notification svg tcpd threads tiff truetype udev udisks unicode upower usb v4l vorbis widgets wifi wxwidgets x264 x265 xattr xcb xcomposite xml xv xvid zlib" 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_ARM="crc32 edsp neon thumb thumb2 v4 v5 v6 v7 v8 vfp vfp-d32 vfpv3 vfpv4" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev keyboard mouse libinput joystick" KERNEL="linux" L10N="en en-US zh-CN" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" QEMU_SOFTMMU_TARGETS="aarch64 arm" QEMU_USER_TARGETS="aarch64" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="fbdev vc4" 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, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Meanwhile, I have apply this patch in the kernel. However, glxgears -info still shows llvmpipe instead of V3D. Would you please help to identify the problem?

Screenshot_20190815_184249

PS: eselect opengl list shows only xorg-x11

chris@pi ~> eselect opengl list
Available OpenGL implementations:
  [1]   xorg-x11 *
sakaki- commented 5 years ago

@yrzr - I've just released v1.5.0 of the gentoo-on-64bit image (here): could you first try downloading and running that, to see if glxgears shows the V3D renderer correctly on your system?

If so, we should be able to triangulate the issue pretty quickly, given that you are using my overlay.

Best, sakaki

yrzr commented 5 years ago

Seems doing well using your image Screenshot_2019-08-17_18-28-25

sakaki- commented 5 years ago

OK - good.

So to start with then, are there any significant differences between the /boot/config.txt on my image and your original setup?

yrzr commented 5 years ago

Here is the config.txt. vc4-fkms-v3d is set and GPU memory is set to 128M.

# For more options and information see
# http://www.raspberrypi.org/documentation/configuration/config-txt.md
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
overscan_left=24
overscan_right=24
overscan_top=24
overscan_bottom=24

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
hdmi_group=1
hdmi_mode=31

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=5

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#force_turbo=0
arm_freq=1750
gpu_freq=600
over_voltage=1

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
# We allow SPI by default to allow use of flashrom 'out of the box'
# feel free to comment out the below, should you require the GPIO pins
# it uses
dtparam=spi=on

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# uncomment to assume display supports all audio formats
#hdmi_force_edid_audio=1

# retain fake kms mode for now, as it plays nicely with
# window manager compositing and is upstream's choice for
# Buster; CMA implicitly handled now
dtoverlay=vc4-fkms-v3d

# now the camera and v4l2 m2m codecs are usable for 64-bit systems
# a modest amount of gpu_mem *is* advised; see e.g.
# https://www.raspberrypi.org/forums/viewtopic.php?p=1436162#p1436162
gpu_mem=128

# enable camera interface (v4l2); requires >=4.19 kernel
start_x=1

# force 64-bit mode, new way
arm_64bit=1

[pi3]
# specific configuration for RPi3 models
# improve output quality from built-in headphone jack
#audio_pwm_mode=2

[pi4]
# specific configuration for RPi4 models
enable_gic=1
armstub=armstub8-gic.bin
max_framebuffers=2

[all]
#enable_uart=1
sakaki- commented 5 years ago

You shouldn't need that armstub=... line with modern boot firmware - are your /boot/fixup4*.dat and /boot/start4*.elf files up to date? Copy them from my working image into your /boot to check, comment out the armstub line, and try booting again.

I note you aren't specifying a kernel= line. Are you using a kernel you compiled yourself, at /boot/kernel8.img? If so, the next step (if you still don't have v3d) would be to copy my /boot/kernel8-p4.img to your /boot, and also its module set (/lib/modules/4.19.66-v8-fc5826fb999e-p4-bis+) to your rootfs. Then set kernel=kernel8-p4.img in the [pi4] section of /boot/config.txt and try booting again. Any better?

yrzr commented 5 years ago

As you adviced, I updated all the firmware, copy the kernel image and kernel modules, and modified config.txt as follow

# For more options and information see
# http://www.raspberrypi.org/documentation/configuration/config-txt.md
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
overscan_left=24
overscan_right=24
overscan_top=24
overscan_bottom=24

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
hdmi_group=1
hdmi_mode=31

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=5

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#force_turbo=0
arm_freq=1750
gpu_freq=600
over_voltage=1

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
# We allow SPI by default to allow use of flashrom 'out of the box'
# feel free to comment out the below, should you require the GPIO pins
# it uses
dtparam=spi=on

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# uncomment to assume display supports all audio formats
#hdmi_force_edid_audio=1

# retain fake kms mode for now, as it plays nicely with
# window manager compositing and is upstream's choice for
# Buster; CMA implicitly handled now
dtoverlay=vc4-fkms-v3d

# now the camera and v4l2 m2m codecs are usable for 64-bit systems
# a modest amount of gpu_mem *is* advised; see e.g.
# https://www.raspberrypi.org/forums/viewtopic.php?p=1436162#p1436162
gpu_mem=128

# enable camera interface (v4l2); requires >=4.19 kernel
start_x=1

# force 64-bit mode, new way
arm_64bit=1

[pi3]
# specific configuration for RPi3 models
# improve output quality from built-in headphone jack
#audio_pwm_mode=2

[pi4]
# specific configuration for RPi4 models
#enable_gic=1
#armstub=armstub8-gic.bin
max_framebuffers=2
kernel=kernel8-p4.img

[all]
#enable_uart=1

The result seems to show some error message 123

sakaki- commented 5 years ago

OK, last thing on this would be to comment out your overclocking options from /boot/config.txt and try again. I don't think it is that, but best to check.

If the problem is still there, then since we now have identical boot firmware and kernel, the only remaining thing really is mesa. Did you use my binary package for that, or build it yourself?

yrzr commented 5 years ago

I have checked that the overclocking options are not the cause. I build the mesa by my own

emerge -pv mesa

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

Calculating dependencies... done!
[ebuild   R   ~] media-libs/mesa-19.1.4-r1::genpi64  USE="dri3 egl gallium gbm gles1 gles2 llvm wayland xa xvmc -classic (-d3d9) -debug (-libglvnd) (-lm_sensors) (-opencl) -osmesa -pax_kernel -pic (-selinux) -test -unwind -vaapi (-valgrind) (-vdpau) (-vulkan) (-vulkan-overlay)" VIDEO_CARDS="vc4 -freedreno (-i915) (-i965) (-intel) -iris -nouveau (-r100) (-r200) (-r300) (-r600) (-radeon) (-radeonsi) -virgl -vivante (-vmware)" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB
chris@pi ~> cat /etc/portage/make.conf
# CPU related
CHOST="aarch64-unknown-linux-gnu"
CFLAGS="-march=armv8-a+crc -mcpu=cortex-a72 -mtune=cortex-a72 -mabi=lp64 -O2 -pipe -ftree-vectorize"
CXXFLAGS="${CFLAGS}"
CPU_FLAGS_ARM="crc32"
MAKEOPTS="-j3"

# portage environments
PORTDIR="/usr/portage"
DISTDIR="${PORTDIR}/distfiles"
PORTAGE_NICENESS="18"

FEATURES="buildpkg userfetch preserve-libs ccache"
FEATURES="${FEATURES} ccache"
CCACHE_DIR="/var/tmp/ccache"
CCACHE_SIZE="10G"
#FEATURES="${FEATURES} getbinpkg"
#PORTAGE_BINHOST="https://isshoni.org/pi64pie"

EMERGE_DEFAULT_OPTS="--quiet-build=y --keep-going --verbose-conflicts"
EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --usepkg"
PKGDIR="/usr/packages"
#EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --jobs 2 --load-average 3.8"

ACCEPT_LICENSE="* -@EULA"
ACCEPT_KEYWORDS="arm64 amd64 -~arm64"
VIDEO_CARDS="fbdev vc4"
INPUT_DEVICES="evdev synaptics keyboard mouse libinput joystick"
L10N="en en-US zh-CN"
USE="-bindist btrfs neon lto \
    mudflap sanitize -consolekit elogind \
    v4l opengl egl gles gles1 gles2 libv4l \
    wifi bluetooth ipv6 http2 -ppp \
    threads -ldap \
    alsa x264 x265 -matroska pulseaudio \
    kde sddm activities -handbook"

PYTHON_SINGLE_TARGET="python3_6"
PYTHON_TARGETS="python2_7 python3_6"

# Default build targets for QEMU; override if desired.
QEMU_SOFTMMU_TARGETS="aarch64 arm"
QEMU_USER_TARGETS="aarch64"
chris@pi ~> emerge --info
Portage 2.3.69 (python 3.6.5-final-0, default/linux/arm64/17.0/desktop/plasma, gcc-8.3.0, glibc-2.29-r2, 4.19.66-v8-yrzr+ aarch64)
=================================================================
System uname: Linux-4.19.66-v8-yrzr+-aarch64-with-gentoo-2.6
KiB Mem:     3845136 total,   2607560 free
KiB Swap:    4565496 total,   4565496 free
Head commit of repository gentoo: ef720cdcaafdd49874695d05be97cff353bf93ac

Head commit of repository genpi64: a8e84d5295bd49811456a953514521ba5efa01ba

sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.32 p2) 2.32.0
ccache version 3.7.2 [enabled]
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.28.2-r1::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo
dev-util/ccache:          3.7.2::gentoo
dev-util/cmake:           3.14.6::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.41.2::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            8.3.0-r1::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/gentoo.git
    priority: -1000

genpi64
    location: /usr/local/portage/genpi64
    sync-type: git
    sync-uri: https://github.com/sakaki-/genpi64-overlay.git
    masters: gentoo
    priority: 100

Installed sets: @base, @emulation, @fonts, @kde5, @network, @office, @raspberrypi
ACCEPT_KEYWORDS="amd64 arm64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="aarch64-unknown-linux-gnu"
CFLAGS="-march=armv8-a+crc -mcpu=cortex-a72 -mtune=cortex-a72 -mabi=lp64 -O2 -pipe -ftree-vectorize"
CHOST="aarch64-unknown-linux-gnu"
CONFIG_PROTECT="/boot/cmdline.txt /boot/config.txt /etc /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="-march=armv8-a+crc -mcpu=cortex-a72 -mtune=cortex-a72 -mabi=lp64 -O2 -pipe -ftree-vectorize"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=y --keep-going --verbose-conflicts --usepkg"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg 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 sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi activities alsa arm64 berkdb bluetooth branding btrfs bzip2 cairo cdda cdr cli crypt cups cxx dbus declarative dri dts dvdr egl elogind emboss encode exif fam flac fortran gdbm gif glamor gles gles1 gles2 gpm gtk http2 iconv icu ipv6 jpeg kde kipi kwallet lcms libnotify libtirpc libv4l lto mad mng mp3 mp4 mpeg mudflap ncurses neon nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds pulseaudio qml qt5 readline sanitize sddm seccomp semantic-desktop spell split-usr ssl startup-notification svg tcpd threads tiff truetype udev udisks unicode upower usb v4l vorbis widgets wifi wxwidgets x264 x265 xattr xcb xcomposite xml xv xvid zlib" 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_ARM="crc32 edsp neon thumb thumb2 v4 v5 v6 v7 v8 vfp vfp-d32 vfpv3 vfpv4" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev keyboard mouse libinput joystick" KERNEL="linux" L10N="en en-US zh-CN" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" QEMU_SOFTMMU_TARGETS="aarch64 arm" QEMU_USER_TARGETS="aarch64" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="fbdev vc4" 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, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
sakaki- commented 5 years ago

OK you have a number of different USE flags in there compared to me (like wayland etc.). Let's try temporarily using my binary package:

root@pi4 #  PORTAGE_BINHOST="https://isshoni.org/pi64pie" emerge -av --oneshot --getbinpkgonly --binpkg-respect-use=n media-libs/mesa

It'll hopefully prompt that you're going to be installing from binary (purple output on screen). If so, accept the install. If you try again once done, any luck?

yrzr commented 5 years ago

Hi, I tried to install the binary package, but it turned out to be a big mess to me. Meanwhile, I found that the xorg-drivers is build without fbdev driver.

chris@pi ~> emerge -pv xorg-drivers

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

Calculating dependencies... done!
[binary   R    ] x11-base/xorg-drivers-1.20::gentoo  INPUT_DEVICES="evdev keyboard libinput mouse (-elographics) (-joystick) (-synaptics) (-vmmouse) (-void) (-wacom)" VIDEO_CARDS="vc4 (-amdgpu) (-ast) (-dummy) (-fbdev) -freedreno (-geode) (-glint) (-i915) (-i965) (-intel) (-mga) (-nouveau) (-nv) (-nvidia) (-omap) (-qxl) (-r128) (-radeon) (-radeonsi) (-siliconmotion) -tegra (-vesa) (-via) (-virtualbox) (-vmware)" 0 KiB

Total: 1 package (1 reinstall, 1 binary), Size of downloads: 0 KiB

Could this relate to the problem?

yrzr commented 5 years ago

Finally, problem fixed. I upgraded to mesa-19.2.0_rc1 (just add to portage today) with your patch, and add my user to the video group. Everything works fine now.

Thanks for your help!

Jarodiv commented 4 years ago

Hi, I'm actually having the same issue. I installed my 64bit Gentoo following the guides in the wiki and with your image on a mounted USB stick as orientation (very nice work btw! would be awesome if you could publish a guide or whatsoever with what you did to make it work).

Now everything seems to be working except for glxgears -info reporting llvmpipe (LLVM 9.0, 128 bits) instead of V3D. I saw that you're installing media-libs/mesa from your overlay to enable V3D so added a custom ebuild (mesa-19.2.8) with the the same changes you did and installed it but still no V3D.

Firmware, kernel and bootstub are up to date (from the official repos), dtoverlay=vc4-fkms-v3d is set in the boot config and the kernel module is loaded:

# lsmod | grep vc4
vc4                   208896  1

Any ideas what else the issue could be?

sakaki- commented 4 years ago

Hi @Jarodiv,

It's likely to be either the kernel (some versions randomly don't work with V3D, even recent ones), the kernel config, or mesa. Try therefore using my kernel (+module set) from the image (leaving all else on your system the same). If that doesn't work, try installing my mesa from my binhost's binary package directly, and try again.

Jarodiv commented 4 years ago

Ok, back from testing (thanks for the very quick response).

The first test, replacing the kernel, didn't change a thing (after all, my kernel is using almost the same config as yours does). The second test, replacing my mesa with your binary, worked, so I revisited everything I did and noticed, that I had a typo in my mesa ebuild that did exactly prevent it from enabling V3D.

Fixing the ebuild and recompiling mesa did solve the issue. Thanks a lot!

Would it be ok for you if I contact you via mail with a Bluetooth issue I discovered in the meantime and haven't been able to pin down so far? I'm going to try a little more but if I don't succeed some help would be welcome :)

sakaki- commented 4 years ago

Glad you got it fixed! Yes, feel free to drop me an email. Best, sakaki