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"]'