pika-drivers/data/generate_driver_definitions.sh
Ward Nakchbandi (Cosmic Fusion) cf1171ef3a
Add intel drivers
2023-10-29 17:55:47 +03:00

35 lines
994 B
Bash
Executable File

#! /bin/bash
### Get traditional ubuntu-driver list
DRIVERS="$(ubuntu-drivers list | grep -vi -server)"
### Put mesa driver flaours in the list
DRIVERS="$DRIVERS mesa-hybrid mesa-stable mesa-git"
### Check if the amdgpu module is loaded
### advanced micro devices graphics cards with "radeon" module only do not support the additional drivers
if inxi -G | grep driver | grep -i amdgpu &> /dev/null
then
DRIVERS="$DRIVERS pika-rocm-meta vulkan-amdgpu-pro amf-amdgpu-pro amdvlk opencl-legacy-amdgpu-pro-icd amdgpu-pro-oglp"
fi
### Check for xbox equipment
if lsusb | grep -i xbox &> /dev/null
then
DRIVERS="$DRIVERS xone-dkms"
fi
### Check for Intel GPUs
if inxi -G | grep driver | grep -i intel &> /dev/null
then
DRIVERS="$DRIVERS intel-gpu-compute"
fi
### If no drivers were found set them to random hash to trigger no drivers needed dialog in gui app
if [[ -z $DRIVERS ]]
then
DRIVERS=emScuM8rsa6kuhMePtR5bT8s4z9s
fi
### Print result
echo -e "$DRIVERS" | tr ' ' '\n' | grep "\S"