Support for mesa with Vulkan update in Raspberry Pi 4

Just updated to mesa 20.3.1-0.1 and still the Vulkan support is missing. Which is surprising, I will try to look further into this.

Edit: I reinstalled mesa-git just to check, and Vulkan support is there. I also note that gxlgears lost 100+ fps.

The fps from glxgears in the above tests were run while using a 1920x1080 monitor.
This is while using a 4K monitor:

$ vblank_mode=0 glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
2922 frames in 5.0 seconds = 584.382 FPS
3314 frames in 5.0 seconds = 662.731 FPS
2849 frames in 5.0 seconds = 569.761 FPS
2875 frames in 5.0 seconds = 574.981 FPS
2885 frames in 5.0 seconds = 576.985 FPS

Much improved from my previous tests, about 20x better. Before these recent updates, it struggled to stay above 30 fps. It still bounces around a bit when I run the test longer, so I think there is more improvement to come.

did not set ‘-D vulkan-drivers=broadcom’?

No, I have not needed to set anything when using the git version. Where do I set that?

He thinks you compiled something.

just want to say I’m running Manjaro sway on my raspberry pi 400 using the rc kernal and mesa git with the following changes to the config.txt:

#enable vc4
dtoverlay=vc4-km4-v3d-pi4
max_framebuffers=2

#overclock
force_turbo=1
over_voltage=15
arm_freq=2350
gpu_freq=800
v3d_freq=800

and firefox 84.0 with layers.acceleration.force-enabled set to true in the about:config, h264ify with 60fps blocked and performance is absolutely nuts. I am absolutely pleased with how it’s handling youtube and what this machine is pulling off.
Note that my overclock settings are really pushing rpi400 to its limits so if you want to adapt similar options USE AT YOUR OWN RISK!!

—glxgears test run in the default window size @ 1920x1080

$ vblank_mode=0 glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
8962 frames in 5.0 seconds = 1792.285 FPS
9068 frames in 5.0 seconds = 1813.500 FPS
8981 frames in 5.0 seconds = 1796.108 FPS
8905 frames in 5.0 seconds = 1780.945 FPS
9118 frames in 5.0 seconds = 1823.481 FPS

If anyone has any other optimization suggestions please let us know!

Appropriate disclaimer on your part.

Sounds like Arch did not enable that option in their PKGBUILD yet.

Someone already made a PR for the ALARM package to include it:

Just not accepted yet.

1 Like

I have
└─[$] <> uname -r
5.10.0-rc7-1-MANJARO-ARM

└─[$] <> sudo pacman -Qs mesa
local/glu 9.0.1-2
Mesa OpenGL Utility library
local/mesa-demos 8.4.0-4
Mesa demos and tools incl. glxinfo + glxgears
local/mesa-git 21.0.0_devel.132478.f9ceab7b237-1
an open-source implementation of the OpenGL specification, git version

And i get:
└─[$] <> vblank_mode=0 glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
1488 frames in 5.0 seconds = 297.571 FPS
1504 frames in 5.0 seconds = 300.737 FPS
1503 frames in 5.0 seconds = 300.549 FPS
1503 frames in 5.0 seconds = 300.463 FPS

?
What am I doing wrong? Any Ideas?

Do you have

gpu_mem=64
dtoverlay=vc4-kms-v3d-pi4

it would not start lightdm with

dtoverlay=vc4-kms-v3d-pi4

only with
dtoverlay=vc4-fkms-v3d
:frowning:
thats the point but i am stuck here, no idea why it wouldn’t

Do you have xf86-video-fbturbo or x86-video-turbo-git installed? If so… uninstall them.

no, i uninstalled that like told in a previous post

maybe this helps a little;
╰─➤ grep EE /var/log/Xorg.0.log.old
[ 19.319] Current Operating System: Linux raspi 5.10.0-rc7-1-MANJARO-ARM #1 SMP PREEMPT Mon Dec 7 21:25:58 CST 2020 aarch64
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 19.328] (EE) Failed to load module “fbdev” (module does not exist, 0)
[ 19.328] (EE) open /dev/dri/card0: No such file or directory
[ 19.328] (EE) open /dev/dri/card0: No such file or directory
[ 19.328] (EE) No devices detected.
[ 19.328] (EE)
[ 19.328] (EE) no screens found(EE)
[ 19.328] (EE)
[ 19.328] (EE) Please also check the log file at “/var/log/Xorg.0.log” for additional information.
[ 19.329] (EE)
[ 19.333] (EE) Server terminated with error (1). Closing log file.

I see you installed the mesa-git, I am not sure I have tried that version (new ones each Sunday). I can try it in the a few minutes. If you do not need Vulkan support, the regular Mesa (non-git) works, you might try it.

And try running:

$ glxgears | grep -i render

You should see

V3D 4.2

I have seen this before, I do not recall just why this occurs. The regular fbdev should be available, then it switches to V3D.

nope, just empty
there is something really wrong here

Try installing mesa, rather than mesa-git

ok just a moment,

but after installing
extra/xf86-video-fbdev
vulkan-mesa-layers
at least i have GUI with;
dtoverlay=vc4-km4-v3d-pi4
enabled,
now wit mesa NOT git
same fps

still empty line in
└─[$] <> glxgears | grep -i render