Last active
February 19, 2022 02:26
-
-
Save DDoSolitary/ce7a005f9a139e0547484508a78259f7 to your computer and use it in GitHub Desktop.
Automatically configure hardware acceleration on Arch Linux.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
unset LIBVA_DRIVER_NAME VDPAU_DRIVER DRI_PRIME | |
if lspci -k | grep -q -e amdgpu -e radeon; then | |
export LIBVA_DRIVER_NAME=radeonsi | |
export VDPAU_DRIVER=radeonsi | |
elif lspci -k | grep -q nouveau; then | |
export LIBVA_DRIVER_NAME=nouveau | |
export VDPAU_DRIVER=nouveau | |
fi | |
if lspci -k | grep -q i915; then | |
if [ -z "$LIBVA_DRIVER_NAME" ]; then | |
export LIBVA_DRIVER_NAME=i965 | |
export VDPAU_DRIVER=va_gl | |
else | |
export DRI_PRIME=1 | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment