Add intel drivers
This commit is contained in:
parent
e1f8d37c48
commit
cf1171ef3a
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "pika-drivers"
|
name = "pika-drivers"
|
||||||
version = "0.4.3"
|
version = "0.4.4"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
@ -8,7 +8,7 @@ DRIVERS="$DRIVERS mesa-hybrid mesa-stable mesa-git"
|
|||||||
|
|
||||||
### Check if the amdgpu module is loaded
|
### Check if the amdgpu module is loaded
|
||||||
### advanced micro devices graphics cards with "radeon" module only do not support the additional drivers
|
### advanced micro devices graphics cards with "radeon" module only do not support the additional drivers
|
||||||
if inxi -G | grep driver | grep amdgpu &> /dev/null
|
if inxi -G | grep driver | grep -i amdgpu &> /dev/null
|
||||||
then
|
then
|
||||||
DRIVERS="$DRIVERS pika-rocm-meta vulkan-amdgpu-pro amf-amdgpu-pro amdvlk opencl-legacy-amdgpu-pro-icd amdgpu-pro-oglp"
|
DRIVERS="$DRIVERS pika-rocm-meta vulkan-amdgpu-pro amf-amdgpu-pro amdvlk opencl-legacy-amdgpu-pro-icd amdgpu-pro-oglp"
|
||||||
fi
|
fi
|
||||||
@ -19,6 +19,12 @@ then
|
|||||||
DRIVERS="$DRIVERS xone-dkms"
|
DRIVERS="$DRIVERS xone-dkms"
|
||||||
fi
|
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 no drivers were found set them to random hash to trigger no drivers needed dialog in gui app
|
||||||
if [[ -z $DRIVERS ]]
|
if [[ -z $DRIVERS ]]
|
||||||
then
|
then
|
||||||
|
@ -8,45 +8,36 @@ then
|
|||||||
else
|
else
|
||||||
echo "Version: $(apt-cache show $2 | grep Version: | cut -d":" -f2 | head -n1)"
|
echo "Version: $(apt-cache show $2 | grep Version: | cut -d":" -f2 | head -n1)"
|
||||||
fi
|
fi
|
||||||
else
|
elif [[ $1 == "description" ]]
|
||||||
if [[ $1 == "description" ]]
|
then
|
||||||
|
if echo "$2" | grep mesa-git &> /dev/null
|
||||||
then
|
then
|
||||||
if echo "$2" | grep mesa-git &> /dev/null
|
printf "WARNING: THIS DRIVER IS EXPERMINTAL USE AT YOUR OWN RISK!\n$(apt-cache show mesa-git | grep 'Description*' | cut -d":" -f2 | head -n1)"
|
||||||
then
|
|
||||||
printf "WARNING: THIS DRIVER IS EXPERMINTAL USE AT YOUR OWN RISK!\n$(apt-cache show mesa-git | grep 'Description*' | cut -d":" -f2 | head -n1)"
|
|
||||||
else
|
|
||||||
apt-cache show $2 | grep 'Description*' | cut -d":" -f2 | head -n1
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
if [[ $1 == "device" ]]
|
apt-cache show $2 | grep 'Description*' | cut -d":" -f2 | head -n1
|
||||||
then
|
fi
|
||||||
if echo "$2" | grep -i -E 'pika-rocm-meta|vulkan-amdgpu-pro|amf-amdgpu-pro|amdvlk|opencl-legacy-amdgpu-pro-icd|amdgpu-pro-oglp' &> /dev/null
|
elif [[ $1 == "device" ]]
|
||||||
then
|
then
|
||||||
DEVICE="$(lspci | grep -i -E 'vga|display|3d' | cut -d":" -f3 | grep -i AMD)"
|
if echo "$2" | grep -i -E 'pika-rocm-meta|vulkan-amdgpu-pro|amf-amdgpu-pro|amdvlk|opencl-legacy-amdgpu-pro-icd|amdgpu-pro-oglp' &> /dev/null
|
||||||
else
|
then
|
||||||
if echo "$2" | grep -i -E 'xone' &> /dev/null
|
DEVICE="$(lspci | grep -i -E 'vga|display|3d' | grep -i AMD)"
|
||||||
then
|
elif echo "$2" | grep -i -E 'xone' &> /dev/null
|
||||||
DEVICE="$(lsusb | grep -i xbox | cut -d":" -f3)"
|
then
|
||||||
else
|
DEVICE="$(lsusb | grep -i xbox)"
|
||||||
if echo "$2" | grep -i -E 'nvidia' &> /dev/null
|
elif echo "$2" | grep -i -E 'intel' &> /dev/null
|
||||||
then
|
then
|
||||||
DEVICE="$(lspci | grep -i -E 'vga|display|3d' | cut -d":" -f3 | grep -i nvidia)"
|
DEVICE="$(lspci | grep -i -E 'vga|display|3d' | grep -i intel)"
|
||||||
else
|
elif echo "$2" | grep -i -E 'nvidia' &> /dev/null
|
||||||
if echo "$2" | grep -i -E 'mesa' &> /dev/null
|
then
|
||||||
then
|
DEVICE="$(lspci | grep -i -E 'vga|display|3d' | grep -i nvidia)"
|
||||||
DEVICE="$(lspci | grep -i -E 'vga|display|3d' | cut -d":" -f3 | grep -vi nvidia)"
|
elif echo "$2" | grep -i -E 'mesa' &> /dev/null
|
||||||
else
|
then
|
||||||
DEVICE="$(ubuntu-drivers devices | sed ':a;N;$!ba;s/\nmodel/ /g' | grep vendor | grep -i $2 | sed 's/vendor/Device:/')"
|
DEVICE="$(lspci | grep -i -E 'vga|display|3d' | grep -vi nvidia)"
|
||||||
fi
|
fi
|
||||||
fi
|
if [[ ! -z $DEVICE ]]
|
||||||
fi
|
then
|
||||||
fi
|
echo "Device: $DEVICE"
|
||||||
fi
|
else
|
||||||
if [[ ! -z $DEVICE ]]
|
echo "Device: UNKNOWN!"
|
||||||
then
|
|
||||||
echo "Device: $DEVICE"
|
|
||||||
else
|
|
||||||
echo "Device: UNKNOWN!"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -1,4 +1,4 @@
|
|||||||
pika-drivers (0.4.3-100pika1) pikauwu; urgency=medium
|
pika-drivers (0.4.4-100pika1) pikauwu; urgency=medium
|
||||||
|
|
||||||
* initial release
|
* initial release
|
||||||
|
|
||||||
|
@ -355,6 +355,8 @@ fn get_drivers(main_window: >k::Box, loading_box: >k::Box, ubuntu_drivers_li
|
|||||||
driver_icon.set_from_icon_name(Some("input-gaming"));
|
driver_icon.set_from_icon_name(Some("input-gaming"));
|
||||||
} else if driver_name.contains("nvidia") {
|
} else if driver_name.contains("nvidia") {
|
||||||
driver_icon.set_from_icon_name(Some("nvidia"));
|
driver_icon.set_from_icon_name(Some("nvidia"));
|
||||||
|
} else if driver_name.contains("intel") {
|
||||||
|
driver_icon.set_from_icon_name(Some("intel"));
|
||||||
} else {
|
} else {
|
||||||
driver_icon.set_from_icon_name(Some("pika-drivers"));
|
driver_icon.set_from_icon_name(Some("pika-drivers"));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user