Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Hardware acceleration not working (RPi4 - 32bit) [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
Lebkoungcity
Apprentice
Apprentice


Joined: 16 Nov 2008
Posts: 221
Location: near Lebkoungcity (='Gingerbreadcity' =Nuremberg)

PostPosted: Sat Mar 06, 2021 9:17 pm    Post subject: Hardware acceleration not working (RPi4 - 32bit) [solved] Reply with quote

Hello,

I've got a problem with setting up video on my Raspberry Pi 4. I installed gentoo 32bit and followed wiki.gentoo.org.

I'm stuck here: https://wiki.gentoo.org/wiki/Raspberry_Pi_VC4#Is_it_working.3F:
I have a working desktop (although it's too small, it does not fill the whole screen) without hardware acceleration.
Wiki says:
Quote:
To test your setup, you need to install x11-apps/mesa-progs. This provides glxgears, which you can run with glxgears -info. If you have something like GL_RENDERER = Gallium 0.4 on VC4 in the output, then it's a success! If it's using llvmpipe, you're almost there. If it's using the software rasterizer, you're not there.

If it is using llvmpipe and /usr/share/X11/xorg.conf.d/99-fbturbo.conf exists, try to remove Driver "fbturbo" from that file.


Code:
pandora@thalia ~ $ glxinfo | grep rendering
direct rendering: Yes
pandora@thalia ~ $ glxinfo | grep Device
Device: llvmpipe (LLVM 11.0.1, 128 bits) (0xffffffff)


Now, I don't even have 99-fbturbo.conf, so I can't remove "fbturbo":
Code:
thalia /home/pandora # ls -lh /usr/share/X11/xorg.conf.d/
insgesamt 8,0K
-rw-r--r-- 1 root root 1,4K  3. Mär 00:49 10-quirks.conf
-rw-r--r-- 1 root root 1,4K  3. Mär 01:32 40-libinput.conf


In /boot/config is:
Code:
dtparam=audio=on
dtoverlay=vc4-fkms-v3d
gpu_mem=16


I've experimented with vc4-kms-v3d and vc4-kms-v3d-pi4 but although they provide some kind of hardware acceleration they give other issues (e.g. cursor is a garbled square until it is pushed up to the screen's border) and it seems they're not really stable. I also tried the latest unstable mesa in portage and even VIDEO_CARDS="fbdev vc4 v3d" (and updated world afterwards of couse) but that did not help either.
So I reset everything according to the settings from wiki. Is there anything I can do? Kodi is not useably the way it is...

Greetings,
Andy


Some additional info:

Code:
emerge -pv mesa

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

Calculating dependencies... done!
[ebuild   R    ] media-libs/mesa-20.2.6::gentoo  USE="X classic dri3 egl gallium gbm gles1 gles2 llvm zstd (-d3d9) -debug (-lm-sensors) (-opencl) -osmesa (-selinux) -test -unwind (-vaapi) -valgrind (-vdpau) -vulkan (-vulkan-overlay) -wayland -xa -xvmc -zink" VIDEO_CARDS="vc4 -freedreno (-i915) (-i965) (-intel) (-iris) -lima (-nouveau) -panfrost (-r100) (-r200) (-r300) (-r600) (-radeon) (-radeonsi) -v3d -virgl -vivante (-vmware)" 0 KiB


Code:
emerge --info
Portage 3.0.13 (python 3.8.7-final-0, default/linux/arm/17.0/armv7a/desktop, gcc-9.3.0, glibc-2.32-r7, 5.4.79-v7l+ armv7l)
=================================================================
System uname: Linux-5.4.79-v7l+-armv7l-ARMv7_Processor_rev_3_-v7l-with-glibc2.4
KiB Mem:     8115520 total,   7700424 free
KiB Swap:    5860348 total,   5860348 free
Timestamp of repository gentoo: Fri, 05 Mar 2021 14:00:01 +0000
Head commit of repository gentoo: d7f3695907d9bebd959828c7cd865563e0fa09b1
sh bash 5.0_p18
ld GNU ld (Gentoo 2.34 p6) 2.34.0
distcc 3.3.3 armv7a-unknown-linux-gnueabihf [enabled]
ccache version 4.1 [enabled]
app-shells/bash:          5.0_p18::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.30.3::gentoo
dev-lang/python:          3.8.7-r1::gentoo, 3.9.1-r1::gentoo
dev-util/ccache:          4.1::gentoo
dev-util/cmake:           3.18.5::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1-r1::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.2-r1::gentoo
sys-devel/binutils:       2.34-r2::gentoo, 2.35.1-r1::gentoo
sys-devel/gcc:            9.3.0-r2::gentoo
sys-devel/gcc-config:     2.3.2-r1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.4-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r7::gentoo
Repositories:

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

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

ACCEPT_KEYWORDS="arm"
ACCEPT_LICENSE="@FREE"
CBUILD="armv7a-unknown-linux-gnueabihf"
CFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
CHOST="armv7a-unknown-linux-gnueabihf"
CONFIG_PROTECT="/boot/cmdline.txt /boot/config.txt /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"
CXXFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY 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"
FCFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg ccache config-protect-if-modified distcc 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="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
GENTOO_MIRRORS="https://104.23.128.5/gentoo/ https://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ https://ftp.fau.de/gentoo http://ftp.halifax.rwth-aachen.de/gentoo/ ftp://mirror.netcologne.de/gentoo/"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de_1901 de_DE de en"
MAKEOPTS="-j21 -l4"
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"
USE="X a52 aac acl alsa arm berkdb bluetooth branding bzip2 cairo cec cli crypt dbus dri dts egl elogind encode exif flac fortran gdbm gif gles1 gles2 gpm gtk gui iconv icu ipv6 jpeg lcms libglvnd libnotify mad mng mp3 mp4 mpeg ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit pulseaudio qt5 raspberry-pi raspi readline sdl seccomp spell split-usr ssl startup-notification svg system-ffmpeg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ADA_TARGET="gnat_2018" 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="edsp neon thumb vfp vfpv3 vfpv4 vfp-d32 v4 v5 v6 v7 thumb2" 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" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de-1901 de en" 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="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8" RUBY_TARGETS="ruby26" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

_________________
"The most dangerous world view is the world view of the ones who haven't viewed the world."
Alexander von Humboldt (1769-1859)


Last edited by Lebkoungcity on Wed Mar 10, 2021 7:55 pm; edited 1 time in total
Back to top
View user's profile Send private message
tohl
n00b
n00b


Joined: 17 Jan 2021
Posts: 2

PostPosted: Tue Mar 09, 2021 6:15 pm    Post subject: Reply with quote

Enable v3d videocard in mesa. You need both vc4 and v3d for rpi4.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54578
Location: 56N 3W

PostPosted: Tue Mar 09, 2021 6:28 pm    Post subject: Reply with quote

Lebkoungcity,

Do you have
Code:
$ ls /dev/rpivid-*
/dev/rpivid-h264mem  /dev/rpivid-hevcmem  /dev/rpivid-intcmem  /dev/rpivid-vp9mem


If not, set the
Code:
gpu_mem=128
and reboot.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Lebkoungcity
Apprentice
Apprentice


Joined: 16 Nov 2008
Posts: 221
Location: near Lebkoungcity (='Gingerbreadcity' =Nuremberg)

PostPosted: Wed Mar 10, 2021 7:54 pm    Post subject: Reply with quote

Yeah! That's it!

But why didn't it when I was trying it for the first time?
Quote:
I also tried (...) and even VIDEO_CARDS="fbdev vc4 v3d" (and updated world afterwards of couse) but that did not help either.


Maybe it's the combination of "vc4 v3d" and "gpu_mem=128"?
Anyway, I'm glad that it works as expected!

Thanks a lot!
:D
_________________
"The most dangerous world view is the world view of the ones who haven't viewed the world."
Alexander von Humboldt (1769-1859)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM 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