Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
RPi3 Installation Not Using VC4 Acceleration
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
R0b0t1
Apprentice
Apprentice


Joined: 05 Jun 2008
Posts: 264

PostPosted: Wed Feb 22, 2017 7:50 pm    Post subject: RPi3 Installation Not Using VC4 Acceleration Reply with quote

Hello,

I apologize as I realize some of the more recent topics are mainly me speaking, but I've hit another wall. Luckily I can build many packages as binaries and then install them on my device, and was able to get X11 built this way. I'm still working on getting either firefox or chromium built. Unfortunately for both there are issues compiling on-device as well; in chromium's case it is a lack of RAM, in firefox's, issues with ffmpeg both on buildhost and on device.

But per the topic it seems like video acceleration is not enabled. The responsiveness of X11 using i3 is good enough, except when running ncurses-based programs and moving them around quickly. I don't have many fully graphical applications installed due to an issue compiling gobject-introspection which I may need to file a bug about.

The output of lsmod lists the following:
Code:
ipv6
brcmfmac
brcmutil
cfg80211
rfkill
evdev
vc4
snd_bcm2835
snd_pcm
drm_kms_helper
snd_timer
snd
drm
syscopyarea
sysfillrect
sysimgblt
fb_sys_fops
uio_pdrv_genirq
uio


However, glxinfo returns:
Code:
name of display: :0
Error: couldn't find RGB GLX visual or fbconfig


eselect opengl list:
Code:
Available OpenGL implementations:
  [1]    xorg-x11


eselect mesa list:
Code:
i915 (Intel 915, 945)
i965 (Intel GMA 965, G/Q3x, G/Q4x, HD)
r300 (Radeon R300-R500)
r600 (Radeon R600-R700, Evergreen, Northern Islands)
sq (Software renderer)


Mesa in the crossroot was compiled with -llvm. Would this cause issues? It may, as I remember gallium (which I should be hoping to enable) relying on it for code generation. Libraries which link against it, despite having access to a version of mesa compiled on-device with llvm, may not be able to use that interface. I am seeing right now if it will recompile but I do not have high hopes for that.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Feb 22, 2017 8:06 pm    Post subject: Reply with quote

R0b0t1,

The vc4 uses the modeswitching driver. Your lsmod shows the kernel module is loaded, which is a good start.

Look in your /var/log/Xorg.0/log for lots of lines starting modeset(0)
Code:
[  3571.493] (==) modeset(0): Depth 24, (==) framebuffer bpp 32
[  3571.493] (==) modeset(0): RGB weight 888
[  3571.493] (==) modeset(0): Default visual is TrueColor
[  3571.493] (II) Loading sub module "glamoregl"
...


You need
Code:
VIDEO_CARDS="fbdev vc4"
in make.conf.
That's not enough as the vc4 driver was hard masked, it appears as (-vc4)

You need to fix that if its still hard masked. (I've not filed a PR to unmask vc4 on arm64)

/etc/portage/profile/package.use.mask may need to contain
Code:

# this file inverts profile settings. Thats a PITA for upstreaming
# enable Videocore 4 support
# this is only for Raspberry Pi

media-libs/mesa -video_cards_vc4
x11-libs/libdrm -video_cards_vc4


As the comment says, it inverts existing settings, so if its unmasked in the Gentoo repository, this will mask it again.
_________________
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
Leio
Developer
Developer


Joined: 27 Feb 2003
Posts: 494
Location: Estonia

PostPosted: Wed Feb 22, 2017 8:58 pm    Post subject: Reply with quote

video_cards_vc4 is unmasked on arm64 since 5th February, no local unmasking is necessary with an up to date tree.
eselect mesa list showing intel and radeon stuff instead of vc4 is problematic. mesa needs to be built with VIDEO_CARDS="vc4" (USE=video_cards_vc4).
_________________
GNOME team lead; GStreamer; MIPS/ARM64
Back to top
View user's profile Send private message
R0b0t1
Apprentice
Apprentice


Joined: 05 Jun 2008
Posts: 264

PostPosted: Wed Feb 22, 2017 8:59 pm    Post subject: Reply with quote

Unfortunately, xf86-video-fbdev fails to compile with the error:
Code:
[... gcc invocation ...] /usr/aarch64-unknown-linux-gnu/tmp/portage/x11-drivers/xf86-video-fbdev-0.4.4/work/xf86-video-fbdev-0.4.4/src/fbdev.c:21:21: fatal error: dgaproc.h: No such file or directory
compilation terminated.


I searched with eix for packages containing "dga" that might contain the header file, and found x11-proto/xf86dgaproto. Per my experience with many x11 packages missing dependencies to x11-proto packages I installed this, as it was installed on my host (which presumably has a working x11 setup). However this didn't solve the problem.

I rebuilt mesa without fbdev but with vc4 definitely enabled. For some reason when I looked at package settings last, vc4 was enabled for some packages but seemed to not be working. I will edit this post with my results once I can try the newly compiled packages.

EDIT: Since Leio responded while I was writing this - it seems like vc4 was enabled. I have made sure it is in VIDEO_CARDS for mesa when merging it and will try again soon.
Back to top
View user's profile Send private message
Leio
Developer
Developer


Joined: 27 Feb 2003
Posts: 494
Location: Estonia

PostPosted: Wed Feb 22, 2017 9:03 pm    Post subject: Reply with quote

xf86-video-fbdev is not necessary if you are using kernel VC4 that provides KMS support (and if actually used, it might cause issues to mesa vc4). xf86-video-fbdev (or the slightly faster xf86-video-fbturbo) is necessary if using the old graphics stack, not the new VC4 DRI stuff.
I don't know what that dgaproc.h is about, it's not from dgaproto.
_________________
GNOME team lead; GStreamer; MIPS/ARM64
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Feb 22, 2017 9:03 pm    Post subject: Reply with quote

R0b0t1,

You only need the framebuffer driver as a fallback.
Come to think of it, I use turbo-framebuffer which is from an overlay.
_________________
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
R0b0t1
Apprentice
Apprentice


Joined: 05 Jun 2008
Posts: 264

PostPosted: Wed Feb 22, 2017 10:03 pm    Post subject: Reply with quote

Thank you for the responses. I've remerged mesa on the RPi3 with no change in behavior. I don't mind enabling fbdev but is it necessary seeing as the end goal is to get VC4 rendering working? X11 starts properly without it, so what is being used? X software rendering?
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Wed Feb 22, 2017 10:06 pm    Post subject: Reply with quote

R0b0t1 wrote:
Unfortunately, xf86-video-fbdev fails to compile with the error:
Code:
[... gcc invocation ...] /usr/aarch64-unknown-linux-gnu/tmp/portage/x11-drivers/xf86-video-fbdev-0.4.4/work/xf86-video-fbdev-0.4.4/src/fbdev.c:21:21: fatal error: dgaproc.h: No such file or directory
compilation terminated.

R0b0t1 ... that header is from x11-base/xorg-sever:

equery belongs -e /usr/include/xorg/dgaproc.h:
x11-base/xorg-server-1.18.4 (/usr/include/xorg/dgaproc.h)

That should be there as x11-base/xorg-server is a dependency:

equery -NC depgraph =x11-drivers/xf86-video-fbdev-0.4.4 | grep xorg-server:
 `--  x11-base/xorg-server-1.18.4  (x11-base/xorg-server) x86

I suspect (based on other posts) this is the result of you attempting to build binpkg for aarm64 without crossdev?

best ... khay
Back to top
View user's profile Send private message
R0b0t1
Apprentice
Apprentice


Joined: 05 Jun 2008
Posts: 264

PostPosted: Wed Feb 22, 2017 10:27 pm    Post subject: Reply with quote

khayyam wrote:

I suspect (based on other posts) this is the result of you attempting to build binpkg for aarm64 without crossdev?

best ... khay


I am using crossdev. The crossroot has xorg-server installed.
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