Skip to content

Commit aea93df

Browse files
committed
feat(hardware-setup): Enable amdgpu on supported systems
Enable amdgpu on systems using the radeon driver. The arguments for Southern Islands and Sea Islands do not conflict so just enable both Do not block this based on image flavor as some people may be using mixed GPU systems that have both an AMD and Nvidia card
1 parent 114c199 commit aea93df

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

system_files/desktop/shared/usr/bin/bazzite-hardware-setup

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,40 @@ elif [[ $IMAGE_NAME =~ "deck" ]]; then
8383
systemctl --global disable --now sdgyrodsu.service
8484
fi
8585

86+
if grep -qz "Kernel driver in use: radeon" <<< $(lspci -k | grep -A 3 -E "(VGA|3D)"); then
87+
if [[ ! $KARGS =~ "radeon.si_support" ]]; then
88+
NEEDED_KARGS="$NEEDED_KARGS --append=radeon.si_support=0"
89+
fi
90+
91+
if [[ ! $KARGS =~ "radeon.cik_support" ]]; then
92+
NEEDED_KARGS="$NEEDED_KARGS --append=radeon.cik_support=0"
93+
fi
94+
95+
if [[ ! $KARGS =~ "amdgpu.si_support" ]]; then
96+
NEEDED_KARGS="$NEEDED_KARGS --append=amdgpu.si_support=1"
97+
fi
98+
99+
if [[ ! $KARGS =~ "amdgpu.cik_support" ]]; then
100+
NEEDED_KARGS="$NEEDED_KARGS --append=amdgpu.cik_support=1"
101+
fi
102+
elif grep -qvz "Kernel driver in use: amdgpu" <<< $(lspci -k | grep -A 3 -E "(VGA|3D)"); then
103+
if [[ $KARGS =~ "radeon.si_support" ]]; then
104+
NEEDED_KARGS="$NEEDED_KARGS --delete=radeon.si_support=0"
105+
fi
106+
107+
if [[ $KARGS =~ "radeon.cik_support" ]]; then
108+
NEEDED_KARGS="$NEEDED_KARGS --delete=radeon.cik_support=0"
109+
fi
110+
111+
if [[ $KARGS =~ "amdgpu.si_support" ]]; then
112+
NEEDED_KARGS="$NEEDED_KARGS --delete=amdgpu.si_support=1"
113+
fi
114+
115+
if [[ $KARGS =~ "amdgpu.cik_support" ]]; then
116+
NEEDED_KARGS="$NEEDED_KARGS --delete=amdgpu.cik_support=1"
117+
fi
118+
fi
119+
86120
if [[ $IMAGE_FLAVOR = "nvidia" ]]; then
87121
echo "Checking for needed karg changes (Nvidia)"
88122

0 commit comments

Comments
 (0)