@@ -33,69 +33,69 @@ if [[ ":Jupiter:" =~ ":$SYS_ID:" ]]; then
33
33
echo " Checking for needed karg changes (Jupiter)"
34
34
35
35
if [[ ! $KARGS =~ " amd_pstate" ]]; then
36
- NEEDED_KARGS=" $NEEDED_KARGS --append=amd_pstate=active"
36
+ NEEDED_KARGS=" $NEEDED_KARGS --append-if-missing =amd_pstate=active"
37
37
fi
38
38
39
39
if [[ ! $KARGS =~ " amd_iommu" ]]; then
40
- NEEDED_KARGS=" $NEEDED_KARGS --append=amd_iommu=off"
40
+ NEEDED_KARGS=" $NEEDED_KARGS --append-if-missing =amd_iommu=off"
41
41
fi
42
42
43
43
if [[ ! $KARGS =~ " amdgpu.gttsize" ]]; then
44
44
if [[ " $( awk ' /MemTotal/{print $(NF-1)}' /proc/meminfo) " == " 31664740" ]]; then
45
45
echo " 32GB RAM Steam Deck detected"
46
- NEEDED_KARGS=" $NEEDED_KARGS --append=amdgpu.gttsize=16256"
46
+ NEEDED_KARGS=" $NEEDED_KARGS --append-if-missing =amdgpu.gttsize=16256"
47
47
sed -i ' s/zram-size=1024/zram-size=2048/g' /etc/systemd/zram-generator.conf
48
48
49
49
else
50
- NEEDED_KARGS=" $NEEDED_KARGS --append=amdgpu.gttsize=8128"
50
+ NEEDED_KARGS=" $NEEDED_KARGS --append-if-missing =amdgpu.gttsize=8128"
51
51
fi
52
52
fi
53
53
54
54
if [[ ! $KARGS =~ " spi_amd.speed_dev" ]]; then
55
- NEEDED_KARGS=" $NEEDED_KARGS --append=spi_amd.speed_dev=1"
55
+ NEEDED_KARGS=" $NEEDED_KARGS --append-if-missing =spi_amd.speed_dev=1"
56
56
fi
57
57
58
58
if [[ ! $KARGS =~ " initcall_blacklist" ]]; then
59
- NEEDED_KARGS=" $NEEDED_KARGS --append=initcall_blacklist=simpledrm_platform_driver_init"
59
+ NEEDED_KARGS=" $NEEDED_KARGS --append-if-missing =initcall_blacklist=simpledrm_platform_driver_init"
60
60
fi
61
61
62
62
if [[ ! $KARGS =~ " modprobe.blacklist=sp5100_tco" ]]; then
63
- NEEDED_KARGS=" $NEEDED_KARGS --append=modprobe.blacklist=sp5100_tco"
63
+ NEEDED_KARGS=" $NEEDED_KARGS --append-if-missing =modprobe.blacklist=sp5100_tco"
64
64
fi
65
65
fi
66
66
67
67
if grep -qz " Kernel driver in use: radeon" <<< $GPU_ID ; then
68
68
echo " Legacy AMD hardware detected, enabling CIK and SI support in AMDGPU"
69
69
if [[ ! $KARGS =~ " radeon.si_support" ]]; then
70
- NEEDED_KARGS=" $NEEDED_KARGS --append=radeon.si_support=0"
70
+ NEEDED_KARGS=" $NEEDED_KARGS --append-if-missing =radeon.si_support=0"
71
71
fi
72
72
73
73
if [[ ! $KARGS =~ " radeon.cik_support" ]]; then
74
- NEEDED_KARGS=" $NEEDED_KARGS --append=radeon.cik_support=0"
74
+ NEEDED_KARGS=" $NEEDED_KARGS --append-if-missing =radeon.cik_support=0"
75
75
fi
76
76
77
77
if [[ ! $KARGS =~ " amdgpu.si_support" ]]; then
78
- NEEDED_KARGS=" $NEEDED_KARGS --append=amdgpu.si_support=1"
78
+ NEEDED_KARGS=" $NEEDED_KARGS --append-if-missing =amdgpu.si_support=1"
79
79
fi
80
80
81
81
if [[ ! $KARGS =~ " amdgpu.cik_support" ]]; then
82
- NEEDED_KARGS=" $NEEDED_KARGS --append=amdgpu.cik_support=1"
82
+ NEEDED_KARGS=" $NEEDED_KARGS --append-if-missing =amdgpu.cik_support=1"
83
83
fi
84
84
fi
85
85
86
86
if [[ $IMAGE_FLAVOR =~ " nvidia" ]]; then
87
87
echo " Checking for needed karg changes (Nvidia)"
88
88
89
89
if [[ ! $KARGS =~ " rd.driver.blacklist=nouveau" ]]; then
90
- NEEDED_KARGS=" $NEEDED_KARGS --append=rd.driver.blacklist=nouveau"
90
+ NEEDED_KARGS=" $NEEDED_KARGS --append-if-missing =rd.driver.blacklist=nouveau"
91
91
fi
92
92
93
93
if [[ ! $KARGS =~ " modprobe.blacklist=nouveau" ]]; then
94
- NEEDED_KARGS=" $NEEDED_KARGS --append=modprobe.blacklist=nouveau"
94
+ NEEDED_KARGS=" $NEEDED_KARGS --append-if-missing =modprobe.blacklist=nouveau"
95
95
fi
96
96
97
97
if [[ ! $KARGS =~ " nvidia-drm.modeset" ]]; then
98
- NEEDED_KARGS=" $NEEDED_KARGS --append=nvidia-drm.modeset=1"
98
+ NEEDED_KARGS=" $NEEDED_KARGS --append-if-missing =nvidia-drm.modeset=1"
99
99
fi
100
100
else
101
101
echo " Checking for needed karg changes"
@@ -118,10 +118,6 @@ if [[ $KARGS =~ "nomodeset" ]]; then
118
118
NEEDED_KARGS=" $NEEDED_KARGS --delete-if-present=nomodeset"
119
119
fi
120
120
121
- if [[ ! $KARGS =~ " rd.luks.options" ]]; then
122
- NEEDED_KARGS=" $NEEDED_KARGS --append=rd.luks.options=discard"
123
- fi
124
-
125
121
if [[ $INITRAMFS =~ " disabled" ]]; then
126
122
echo " Found needed initramfs changes, applying."
127
123
plymouth display-message --text=" Updating initramfs - Please wait, this may take a while" || true
0 commit comments