# What about 2D/3D hardware acceleration and audio support on Raspberry PI?



## cabriofahrer (Sep 2, 2022)

Why does FreeBSD do not have that yet? The other day I installed FreeBSD on a Raspberry PI 3 and it works like a charm, but these 2 important features are missing. Why? All Linuxes seem to have it, even NetBSD has it. Why is FreeBSD lacking behind in this? Such a pity...


----------



## eternal_noob (Sep 2, 2022)

I believe this is due to Raspberry using binary blobs for this and these are only available for Linux.

I use a Raspberry Pi 400 and i miss 3D acceleration, HDMI audio and WiFi.

Made me go back to Linux for my daily driver.


----------



## cabriofahrer (Sep 2, 2022)

eternal_noob said:


> and these are only available for Linux.


Is that so? As I said, NetBSD has it, so would it not be possible to port it from there? But on the other hand, apparently NetBSD is not even capable of shutting down the Raspberry properly, a `shutdown -p now` makes the thing hang without turning off, which makes NetBSD a total no-go in spite of hardware acceleration and audio support...


----------



## richardtoohey2 (Sep 2, 2022)

I’m sure the FreeBSD team would welcome your patches to implement these


----------



## kpedersen (Sep 2, 2022)

Counter intuitively and unknown to many, the very latest release of Raspberry Pi OS (bullseye) does not provide 3D acceleration (OpenGL) support for the Raspberry Pi 3 or older. Neither in the 32-bit or 64-bit release. This is powered (slowly) by LLVMpipe, same as FreeBSD. You can verify this via `glxinfo` on both OSes.

The reason being is that VC4 (Broadcom's driver blob) was deprecated and the replacement (V3D, similar name) only robustly supports the GPU in the Raspberry Pi 4. If you enable glamor on the Pi3, it can report VC4 but it is an unsupported config resulting in crashes and graphical issues such as: https://github.com/RPi-Distro/chromium-browser/issues/35

So you will need to use the old Raspbian (Buster) and 32-bit only to have 3D accel in Linux. Personally, I would rather keep with the newer OS and use LLVMpipe which offers a higher OpenGL support (4.x) compared to VC4 (OpenGL 2.1).

Some more info I just found is here.


----------



## Alain De Vos (Sep 2, 2022)

I don't understand why a product like Raspberry works with binary blobs. Are there really no chipsets with open-source code ?


----------



## Phishfry (Sep 2, 2022)

Panfrost has been written for Mali.








						Arm Officially Supports Panfrost Open-Source Mali GPU Driver Development - CNX Software
					

Arm now officially supports Panfrost open-source Arm Mali GPU driver in partnership wih Collabora. Reverse-engineering is not needed anymore.




					www.cnx-software.com


----------



## kpedersen (Sep 2, 2022)

The VideoCore chip in the Raspberry Pi does *now* have an open-source driver (V3D). However the focus is on Raspberry Pi 4 because that is "where the money is". Even though ironically it is still probably easier to buy a v3.


----------



## Phishfry (Sep 2, 2022)

Panfrost on Rockchip Information-





						⚙ D34370 graphics/mesa-dri: Add panfrost driver for arm64
					






					reviews.freebsd.org
				





			https://freebsdfoundation.org/wp-content/uploads/2021/08/The-Panfrost-Driver.pdf


----------



## Criosphinx (Sep 3, 2022)

What about the Lima driver? the document says "we have not written the kernel part for it." but doesn't says if there are plans to do it.


----------



## ralphbsz (Sep 3, 2022)

Alain De Vos said:


> I don't understand why a product like Raspberry works with binary blobs. Are there really no chipsets with open-source code ?


Short answer: No.

Long answer: Everything in life is a tradeoff. The Raspberry group made a tradeoff between the SOC being inexpensive SOC, having features, and supporting an easy-to-use development and use environment (Linux). Being 100% open source was not a goal that was important enough to justify jeopardizing the other goals. You have to remember that the Pi is intended and designed mostly as an educational tool, to help with computer education. It is not built to please open source fanatics, nor industrial users, nor be a cheap competitor to traditional motherboards or laptops.


----------



## cabriofahrer (Sep 4, 2022)

Thank you very much for your answers. I didn't know that this was because of binary blobs. So after all that was said here and reading the other linked information, can I come to the conclusion that there will not be a FreeBSD driver for the QuadCore / Raspberry 3?
And is the driver for sound a blob as well?
And although going a bit OT, can anyone say anything about the above described problem with NetBSD not shutting down properly?


----------



## kpedersen (Sep 4, 2022)

cabriofahrer said:


> can I come to the conclusion that there will not be a FreeBSD driver for the QuadCore / Raspberry 3?


I believe once Linux gets a stable V3D driver for the VideoCore found in the Raspberry Pi 3 (currently it does not), then FreeBSD might follow via its LinuxKPI compatibility layer, however this might be after quite a while. The Raspberry Pi is pretty neat but unfortunately there are probably more important things that the FreeBSD developers prefer to work on.


cabriofahrer said:


> And is the driver for sound a blob as well?


I'm not sure about sound but another thing that is missing is the wifi. OpenBSD does have a working open-source driver, I am actually not entirely sure the reason why FreeBSD does not. The firmware has a couple of security flaws, but this affects all platforms and they seem to keep the driver around.


----------



## cabriofahrer (Sep 6, 2022)

kpedersen said:


> The Raspberry Pi is pretty neat but unfortunately there are probably more important things that the FreeBSD developers prefer to work on.


Another very useful thing to work on would be to make FreeBSD (amd64) installable on devices that only have a 32-bit EFI. This would benefit quite some owners of Laptops with an Intel Atom Baytrail processor, for example. Obviously a 64-bit processor with a 32-bit EFI is a very unfortunate hardware implementation. The best viable option for me that I have found on a Laptop like that so far is Fedora, but I really would prefer FreeBSD...


----------

