Cesar R. Posted Wednesday at 02:43 PM Posted Wednesday at 02:43 PM (edited) Hey everyone, for the past couple of days I've been looking into the Mesa-VPU script made by AmazingFate that's used to patch Mesa/VPU onto a custom build of Armbian. https://github.com/armbian/build/blob/main/extensions/mesa-vpu.sh I already have an install of Armbian (Debian XFCE 6.12.28-current-rockchip64 ) on my Rock5b and was looking into applying as much as I can without re-building an image or starting from scratch. From my understanding, You'd need the vendor rk3588 kernel if you want the best possible compatibility with things like the VPU for multimedia acceleration (Someone please correct me if this is not the case lol) What follows is what I was able to piece together after troubleshooting, reading the Mesa changelog & trying to apply as many packages as I can from AmazingFate's kernel extension script. I've also included some tweaks for XFCE to hopefully provide a smooth graphical experience. Although my Rock5b is used as a headless server and doesnt have anything plugged into the HDMI port, I can say that the following changes have made a huge difference in graphical performance of VNC. Please keep in mind that i'm not a developer for Armbian. I just wanted to share this as a guide i've put together to hopefully help someone else who's tried the same (Please let me know your thoughts or if there was anything i've missed. Like I said, this is what has worked for me) (Obviously the correct fix is to rebuild Armbian with Mesa-VPU. What follows was done as an experiment) #################### GUIDE BELOW. THIS IS NOT A SHELL SCRIPT! PLEASE READ AND DO NOT COPY/PASTE ENTIRETY INTO TERMINAL!############################# #### -- 01 Setup AmazingFate Panfork-Mesa repo for mali-g610-firmware 01 -- #### ## 1A: import gpg key and use it to sign repo ## wget -qO - https://download.opensuse.org/repositories/home:/amazingfate:/panfork-mesa/Debian_12/Release.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/panfork-mesa.gpg ## 1B: Add Repo to apt sources & update ## echo "deb https://download.opensuse.org/repositories/home:/amazingfate:/panfork-mesa/Debian_12/ /" | sudo tee /etc/apt/sources.list.d/panfork-mesa.list sudo apt update ## 1C: Install firmware ## sudo apt install mali-g610-firmware libmali-g610-x11 ## 1D: **RECOMMENDED** : Remove panfork-mesa repo ## sudo rm -rf /etc/apt/sources.list.d/panfork-mesa.list sudo rm -rf /etc/apt/trusted.gpg.d/panfork-mesa.gpg #### -- 02 Enable Debian Experimental Repo for recent Mesa Packages 02 -- #### sudo nano /etc/apt/sources.list ## 2A: Add the following to the bottom of the document... ## deb http://deb.debian.org/debian unstable main contrib non-free deb http://deb.debian.org/debian experimental main ## 2B: Update and install Mesa Packages ## sudo apt update sudo apt install -t experimental mesa-vulkan-drivers mesa-utils libgl1-mesa-dri libglx-mesa0 mesa-vdpau-drivers mesa-va-drivers mesa-opencl-icd mesa-libgallium ## 2C: **RECOMMENDED** : Re-open apt sources and remove Experimental/Unstable repos... ## sudo nano /etc/apt/sources.list #Remove the following and update apt...# deb http://deb.debian.org/debian unstable main contrib non-free deb http://deb.debian.org/debian experimental main sudo apt update #### -- 03 Add rockchip-multimedia Ubuntu Repo to Apt 03 -- #### echo "deb [arch=arm64] https://ppa.launchpadcontent.net/liujianfeng1994/rockchip-multimedia/ubuntu jammy main" | sudo tee /etc/apt/sources.list.d/rockchip-multimedia.list ## 3A: Download Key and add convert to gpg ## curl -o rockchip-multimedia.asc "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x8065BE1FC67AABDE" gpg --dearmor rockchip-multimedia.asc sudo mv rockchip-multimedia.asc.gpg /etc/apt/keyrings/rockchip-multimedia.gpg ## 3B: Add PPA Repo and update ## echo "deb [arch=arm64 signed-by=/etc/apt/keyrings/rockchip-multimedia.gpg] https://ppa.launchpadcontent.net/liujianfeng1994/rockchip-multimedia/ubuntu jammy main" | sudo tee /etc/apt/sources.list.d/rockchip-multimedia.list sudo apt update ## 3C: Install packages ## sudo apt install libv4l-rkmpp chromium gstreamer1.0-rockchip1 rockchip-multimedia-config ## 3D: **OPTIONAL** : Disable rockchip-multimedia PPA repo ## sudo mv /etc/apt/sources.list.d/rockchip-multimedia.list /etc/apt/sources.list.d/rockchip-multimedia.list.disabled sudo apt update #### -- 04 Optimize XFCE/Xorg and Reboot 04 -- #### ## 4A: Open default xorg config ## sudo nano /etc/X11/xorg.conf.d/01-armbian-defaults.conf #Add the following... # Section "Device" Identifier "Mali-G610" Driver "modesetting" Option "DRI" "3" # Required for Mali GPUs Option "GALLIUM_DRIVER" "panfrost" Option "PageFlip" "on" # Reduces tearing Option "TearFree" "true" # Xfce-specific anti-tearing EndSection ## 4B: Add XFCE Specific tweaks ## sudo nano /etc/X11/xorg.conf.d/20-xfce-tweaks.conf #Add the following... # Section "Extensions" Option "COMPOSITE" "Enable" EndSection Section "ServerFlags" Option "AutoAddGPU" "off" # Prevents duplicate GPU detection EndSection ## 4C: Reboot ## sudo reboot now Edited Wednesday at 03:11 PM by Cesar R. 0 Quote
Cesar R. Posted Wednesday at 03:03 PM Author Posted Wednesday at 03:03 PM Once done, you should be able to login and run the following to see the Mali g610 recognized as a Vulkan device... vulkaninfo --summary 0 Quote
compent Posted yesterday at 02:21 AM Posted yesterday at 02:21 AM I gave this a try but after creating the /etc/apt/sources.list, when running sudo apt update it returns this error The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY 6ED0E7B82643E131 0 Quote
Cesar R. Posted yesterday at 02:45 PM Author Posted yesterday at 02:45 PM 12 hours ago, compent said: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY 6ED0E7B82643E131 Dont run the entire script at once. Run one section at a time for each step at a time and monitor the output. Example: Run the lines under 1A and monitor the output, Proceed to 1B and monitor. The only changes made to /etc/apt/sources.list are enabling the Debian unstable/experimental repos (which do not require public keys to be manually added. Full disclaimer: This was something I did as an experiment. Full Vulkan support for the Mali g610 is still not officially supported in Debain stable. To be completely honest, I personally rolled back this change by restoring a Timeshift backup taken before the changes. The dependencies installed by Debain Experimental for the latest Mesa version will also break dependencies used by Armbian for firmware updates. Please be smart and remember to make backups before making updates like this. Personally, I'm fine with waiting a few years for Debian to eventually apply compatibility to the stable branch 0 Quote
compent Posted 16 hours ago Posted 16 hours ago Thanks for the reply. I did run each element one at a time and watched to see when and if there were any that reported errors. It's not a big deal though and always worth trying new things to try and get this SOC running as it should do. 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.