first commit

This commit is contained in:
Fabio 2025-09-04 21:47:51 +08:00
commit ba1eb59963

191
README.md Normal file
View file

@ -0,0 +1,191 @@
# Mesa 25.2 on RK3588 (Mali G610) in Debian 12
[original link](https://forum.armbian.com/topic/52513-manually-adding-new-mesa-mali-drivers-to-armbian-debain-612/)
## 00 Install tools to check HW acceleration
#### 0A OpenCL
sudo apt install clinfo -y
clinfo
sudo apt clpeak
clpeak
#### 0B Vulkan
sudo apt install vulkan-tools
vulkaninfo
vulkaninfo --summary
#### 0C OpenGL OpenGL ES
sudo apt-get install mesa-utils
glxinfo
glxinfo ! grep Mesa
glxgears
glxdemo
sudo apt install glmark2-es2
glmark2-es2
## 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*****: Configuring OpenCL ICD Loader: Install Mesa OpenCL ICD, Create OpenCL Vendors Directory and Add Mali ICD Configuratio
sudo mkdir -p /etc/OpenCL/vendors
echo "/usr/lib/libmali-g610.so" | sudo tee /etc/OpenCL/vendors/mali.icd
Installing OpenCL Libraries and their dependencies
sudo apt install ocl-icd-opencl-dev -y
sudo apt install libxcb-dri2-0 libxcb-dri3-0 libwayland-client0 libwayland-server0 libx11-xcb1 -y
#### 2D: **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
## 05 xfce4
#### 5A Auto-login xfce4
sudo nano /etc/lightdm/lightdm.conf
nella sezione
```
[Seat:*]
```
inserire
autologin-user=orangepi
#### 5B Disabilitare start di xfce4 al boot
sudo systemctl disable lightdm.service
#### 5C Start xfce4 manuale
sudo systemctl start lightdm.service