2023-06-29 21:48:30 +02:00
|
|
|
#! /bin/bash
|
2023-06-30 01:21:58 +02:00
|
|
|
|
2023-06-29 22:05:43 +02:00
|
|
|
### Get traditional ubuntu-driver list
|
2023-06-30 01:21:58 +02:00
|
|
|
DRIVERS="$(ubuntu-drivers list | grep -vi -server)"
|
2023-06-29 21:52:19 +02:00
|
|
|
|
2023-08-14 14:41:42 +02:00
|
|
|
### Put mesa driver flaours in the list
|
|
|
|
DRIVERS="$DRIVERS mesa-hybrid mesa-stable mesa-git"
|
|
|
|
|
2023-06-29 22:05:43 +02:00
|
|
|
### Check if the amdgpu module is loaded
|
|
|
|
### advanced micro devices graphics cards with "radeon" module only do not support the additional drivers
|
2023-10-29 15:55:47 +01:00
|
|
|
if inxi -G | grep driver | grep -i amdgpu &> /dev/null
|
2023-06-29 21:52:19 +02:00
|
|
|
then
|
2023-06-30 01:21:58 +02:00
|
|
|
DRIVERS="$DRIVERS pika-rocm-meta vulkan-amdgpu-pro amf-amdgpu-pro amdvlk opencl-legacy-amdgpu-pro-icd amdgpu-pro-oglp"
|
2023-06-29 21:52:19 +02:00
|
|
|
fi
|
2023-06-29 22:05:43 +02:00
|
|
|
|
|
|
|
### Check for xbox equipment
|
|
|
|
if lsusb | grep -i xbox &> /dev/null
|
|
|
|
then
|
2023-06-30 01:25:31 +02:00
|
|
|
DRIVERS="$DRIVERS xone-dkms"
|
2023-06-29 22:05:43 +02:00
|
|
|
fi
|
|
|
|
|
2023-10-29 15:55:47 +01:00
|
|
|
### Check for Intel GPUs
|
|
|
|
if inxi -G | grep driver | grep -i intel &> /dev/null
|
|
|
|
then
|
|
|
|
DRIVERS="$DRIVERS intel-gpu-compute"
|
|
|
|
fi
|
|
|
|
|
2023-06-29 22:05:43 +02:00
|
|
|
### If no drivers were found set them to random hash to trigger no drivers needed dialog in gui app
|
2023-06-29 21:48:30 +02:00
|
|
|
if [[ -z $DRIVERS ]]
|
|
|
|
then
|
|
|
|
DRIVERS=emScuM8rsa6kuhMePtR5bT8s4z9s
|
|
|
|
fi
|
|
|
|
|
2023-06-29 22:05:43 +02:00
|
|
|
### Print result
|
2023-10-29 15:55:47 +01:00
|
|
|
echo -e "$DRIVERS" | tr ' ' '\n' | grep "\S"
|