RPi 400 aarch64 enable 3d acceleration

This forum is for topics dealing with problems with software specifically in the AArch64 repo.

RPi 400 aarch64 enable 3d acceleration

Postby mergerprodukt » Wed Dec 16, 2020 1:42 am

I'm trying to get 3d acceleration to work on my rpi400 system running archlinux aarch64 but for the life of me I can't figure it out.
Googling around I found this post on reddit where the OP mentions he solved the problem by copying over raspbian's device tree over to archlinux.
I tried to piece together what he meant by copying over the device tree, and this is probably where the user error occurs in trying to set everything up. Here's what I did step by step to try for readability's sake

- download all the firmware raspberry pi firmware files from https://github.com/raspberrypi/firmware
- download the latest arch aarch64 image
- do the installation process
- do bsdtar -xpf ArchLinuxARM-rpi-4-latest.tar.gz -C root and sync
- after that I start copying files from the raspberry pi firmware github I download to the image...
- cp -rf from raspberry-pi/firmware/boot/* to boot/ on the image
- cp -rf from raspberry-pi/firmware/modules/* to lib/modules on the image
- cp -rf from raspberry-pi/firmware/opt/vc to opt on the image
- cp -rf from raspberry-pi/firmware/opt/vc/bin/* to /usr/bin on the image
- cp -rf from raspberry-pi/firmware/opt/vc/include/* to /usr/include on the image
- cp -rf from raspberry-pi/firmware/opt/vc/lib/* to /usr/lib on the image
- cp -rf from raspberry-pi/firmware/opt/vc/src/* to /usr/src on the image

after that I copy cmdline.txt to /boot on the image (/dev/sda2 because I'm booting off a usb nvme, with /dev/sda1 in my fstab)
$this->bbcode_second_pass_code('', 'root=/dev/sda2 rw rootwait console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop usbhid.mousepoll=8 snd-bcm2835.enable_compat_alsa=0 audit=0')

as well as config.txt to /boot on the image
$this->bbcode_second_pass_code('', '# See /boot/overlays/README for all available options

gpu_mem=64
initramfs initramfs-linux.img followkernel
kernel=kernel8.img
arm_64bit=1
enable_gic=1
disable_overscan=1

#enable sound
dtparam=audio=on
#hdmi_drive=2

#enable vc4
dtoverlay=vc4-fkms-v3d
max_framebuffers=2')

then on the machine, I go through the whole setup process and with that I install all the relevant packages, including:
xorg, xorg-xinit, xf86-video-fbturbo-git, xf86-video-vesa, mesa, alacritty, bspwm, sxhkd
and for diagnostics I also get inxi and glxinfo from the aur.

And here's where the problem arises, startx into bspwm and the screen stays black. on quit my tty has this output:
$this->bbcode_second_pass_quote('', 'l')ibEGL warning: DRI2: failed to authenticate ... [ERROR] {alacritty] Alacritty encountered an unrecoverable error: Error creating GL context; Received multiple errors. Errors: '[NoAvailablePixelFormat, OsError("Couldn\'t find any available vsync extension"]'


Problem is...if I go into my cmdline.txt and comment out the vc4 graphics line, everything works fine (albeit very poorly).
I am all out of ideas on how to get this working, and would greatly appreciate any help. Thanks.
-----
EDIT
i switched over to xf86-video-fbdev which refused to start because of a different error, but was resolved using the solution posted here. Still on llvmpipe renderer, with even less of an idea on what to do to get v3d rendering to work.
mergerprodukt
 
Posts: 1
Joined: Wed Dec 16, 2020 1:08 am

Re: RPi 400 aarch64 enable 3d acceleration

Postby rahb » Thu Dec 17, 2020 10:12 pm

Arch Linux AArch64 does not support vc4-fkms-v3d drivers at this time, as it uses the mainline kernel which does not currently have support for the driver. The reddit link you refer to is referring to the ARMv7 version of ALARM. See this thread on the forum discussing AArch64 and vc4-fkms-v3d.
rahb
 
Posts: 2
Joined: Mon Dec 14, 2020 11:27 am

Re: RPi 400 aarch64 enable 3d acceleration

Postby graysky » Thu Dec 17, 2020 11:34 pm

Try my aarch64 packages. They boot for RPi4. Not sure about 400 as I do not have this hardware:

Compiled packages: http://repo-ck.com/aarch64-test/
PKGBUILDs: https://github.com/graysky2/PKGBUILDs

These should give your the needed libs/firmware for HW accel decoding. Kodi works with these for example.
graysky
Developer
 
Posts: 1731
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: RPi 400 aarch64 enable 3d acceleration

Postby acorbi » Fri Dec 18, 2020 5:01 pm

Hi graysky,

Could you post the steps to install aarch64 on rpi4 (8Gb) and on top of that your kernel?
Last time I tried, my usb keyboard didn't work and I couldn't ssh into it 'cause ethernet wasn working either.

I see a lot of different posts (try this, try that) in the forum about getting aarch64 booting and working usb/ethernet but I miss a guided solution on how to make it work from first step to last.

Or maybe, now that we have kernel 5.10 out, we are about to get a new aarch64 img based on it with usb/etehernet working ?

Thanks for all your work in alarm!
acorbi
 
Posts: 26
Joined: Wed Aug 05, 2020 10:31 am

Re: RPi 400 aarch64 enable 3d acceleration

Postby graysky » Fri Dec 18, 2020 6:21 pm

See the instructions I wrote on http://repo-ck.com/aarch64-test/
graysky
Developer
 
Posts: 1731
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: RPi 400 aarch64 enable 3d acceleration

Postby acorbi » Sat Dec 19, 2020 9:13 pm

Thanks graysky!

I had to install aarch64 from olegtown because the 'official' image from archlinux-arm didn't boot for me.
I had a kernel-panick every time I tried to boot it.

But with olegtown aarch64 image I managed to boot, and on top of that I followed your steps (enabled your repo) and
managed to install your 5.10.1 kernel from there.

It seems it's working ok. I mean I have USB, ethernet, wifi and graphics. I still have to test bluetooth.

Thanks for your work!
acorbi
 
Posts: 26
Joined: Wed Aug 05, 2020 10:31 am

Re: RPi 400 aarch64 enable 3d acceleration

Postby graysky » Sat Dec 19, 2020 9:27 pm

Good to hear that it works on the 400. Enjoy.
graysky
Developer
 
Posts: 1731
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000


Return to ARMv8

Who is online

Users browsing this forum: No registered users and 6 guests