mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-02-20 15:40:35 +00:00
chore(hardware-setup): Only retrieve GPU info once
This commit is contained in:
parent
aea93df97b
commit
451b39359d
@ -25,6 +25,7 @@ fi
|
||||
|
||||
# GLOBAL
|
||||
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
|
||||
GPU_ID=$(lspci -k | grep -A 3 -E "(VGA|3D)")
|
||||
KARGS=$(rpm-ostree kargs)
|
||||
NEEDED_KARGS=""
|
||||
echo "Current kargs: $KARGS"
|
||||
@ -83,7 +84,7 @@ elif [[ $IMAGE_NAME =~ "deck" ]]; then
|
||||
systemctl --global disable --now sdgyrodsu.service
|
||||
fi
|
||||
|
||||
if grep -qz "Kernel driver in use: radeon" <<< $(lspci -k | grep -A 3 -E "(VGA|3D)"); then
|
||||
if grep -qz "Kernel driver in use: radeon" <<< $GPU_ID; then
|
||||
if [[ ! $KARGS =~ "radeon.si_support" ]]; then
|
||||
NEEDED_KARGS="$NEEDED_KARGS --append=radeon.si_support=0"
|
||||
fi
|
||||
@ -99,7 +100,7 @@ if grep -qz "Kernel driver in use: radeon" <<< $(lspci -k | grep -A 3 -E "(VGA|3
|
||||
if [[ ! $KARGS =~ "amdgpu.cik_support" ]]; then
|
||||
NEEDED_KARGS="$NEEDED_KARGS --append=amdgpu.cik_support=1"
|
||||
fi
|
||||
elif grep -qvz "Kernel driver in use: amdgpu" <<< $(lspci -k | grep -A 3 -E "(VGA|3D)"); then
|
||||
elif grep -qvz "Kernel driver in use: amdgpu" <<< $GPU_ID; then
|
||||
if [[ $KARGS =~ "radeon.si_support" ]]; then
|
||||
NEEDED_KARGS="$NEEDED_KARGS --delete=radeon.si_support=0"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user