Description:
Here simple build newest Mesa with last LLVM (yes, it contain already prebuilt newer LLVM from official LLVM APT repo) and new DRM for current Debian.
To build Mesa:
- You need clone this repository - "git clone https://github.com/serhii-nakon/new_mesa.git";
- Run
docker compose build --no-cache
- Run
docker compose up
- Install Mesa 32 bit
sudo cp -vr mesa32/ /opt/
- Install Mesa 64 bit
sudo cp -vr mesa64/ /opt/
- Set environment variables into
/etc/environment
LD_LIBRARY_PATH="/opt/mesa64/lib/x86_64-linux-gnu:/opt/mesa32/lib/i386-linux-gnu:/opt/mesa64/lib/x86_64-linux-gnu/vdpau:/opt/mesa32/lib/i386-linux-gnu/vdpau"
LIBGL_DRIVERS_PATH="/opt/mesa64/lib/x86_64-linux-gnu/dri:/opt/mesa32/lib/i386-linux-gnu/dri"
VK_LAYER_PATH="/opt/mesa64/share/vulkan/explicit_layer.d:/opt/mesa32/share/vulkan/explicit_layer.d:/usr/share/vulkan/explicit_layer.d"
VK_ICD_FILENAMES="/opt/mesa64/share/vulkan/icd.d/radeon_icd.x86_64.json:/opt/mesa32/share/vulkan/icd.d/radeon_icd.i686.json:/opt/mesa64/share/vulkan/icd.d/lvp_icd.x86_64.json:/opt/mesa32/share/vulkan/icd.d/lvp_icd.i686.json"
LIBVA_DRIVERS_PATH="/opt/mesa64/lib/x86_64-linux-gnu/dri:/opt/mesa32/lib/i386-linux-gnu/dri"
#VK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay
To install from release:
- Download archive
- Extract files (it should contain mesa32 and mesa64 dirs)
- Install Mesa 32 bit
sudo cp -vr mesa32/ /opt/
- Install Mesa 64 bit
sudo cp -vr mesa64/ /opt/
- Set environment variables into
/etc/environment
LD_LIBRARY_PATH="/opt/mesa64/lib/x86_64-linux-gnu:/opt/mesa32/lib/i386-linux-gnu:/opt/mesa64/lib/x86_64-linux-gnu/vdpau:/opt/mesa32/lib/i386-linux-gnu/vdpau"
LIBGL_DRIVERS_PATH="/opt/mesa64/lib/x86_64-linux-gnu/dri:/opt/mesa32/lib/i386-linux-gnu/dri"
VK_LAYER_PATH="/opt/mesa64/share/vulkan/explicit_layer.d:/opt/mesa32/share/vulkan/explicit_layer.d:/usr/share/vulkan/explicit_layer.d"
VK_ICD_FILENAMES="/opt/mesa64/share/vulkan/icd.d/radeon_icd.x86_64.json:/opt/mesa32/share/vulkan/icd.d/radeon_icd.i686.json:/opt/mesa64/share/vulkan/icd.d/lvp_icd.x86_64.json:/opt/mesa32/share/vulkan/icd.d/lvp_icd.i686.json"
LIBVA_DRIVERS_PATH="/opt/mesa64/lib/x86_64-linux-gnu/dri:/opt/mesa32/lib/i386-linux-gnu/dri"
#VK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay
To check:
PS: Please remove mesa-vdpau because it will crash applications that use it (like VLC) - it can happen due this Mesa build use newer LLVM but by some reason mesa-vdpau package from Debian repository also try use this newer LLVM and crash due it should try to use older one
- OpenGL, package
mesa-utils
-glxinfo | grep OpenGL
- VA-API, package
vainfo
-vainfo
- VDPAU, package
vdpauinfo
-vdpauinfo
- Vulkan, package
vulkan-tools
-vulkaninfo
To uninstall:
- Remove environment variables from /etc/environment
- Remove Mesa from /opt/ -
rm -rf /opt/mesa32 /opt/mesa64
To fix flatpak packages (it can crash startup):
sudo flatpak override --unset-env=LD_LIBRARY_PATH
sudo flatpak override --unset-env=LIBGL_DRIVERS_PATH
sudo flatpak override --unset-env=VK_LAYER_PATH
sudo flatpak override --unset-env=VK_ICD_FILENAMES
sudo flatpak override --unset-env=LIBVA_DRIVERS_PATH