17
17
# License along with main.c;if not, write to the Free Software
18
18
# Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA
19
19
20
- # set -x
20
+ # set -vx
21
21
# set -vxEmb
22
22
# set -evxEmb
23
23
# set -xmb
@@ -878,7 +878,7 @@ exec_initramfs(){
878
878
nv_persistenced (){
879
879
# # nvidia percistenced allow GPU to be pre init in some case.
880
880
nv_persist_ctl=/lib/systemd/system/nvidia-persistenced.service
881
- if [[ $use_persistenced = 1 || $use_open = 1 && $( chk_family) -ge 535 ]]; then
881
+ if [[ $use_persistenced = 1 || $use_open = 1 && $( chk_family) -lt 555 && $( chk_family ) - ge 535 ]]; then
882
882
[ -f $nv_persist_ctl ] || { touch $nv_persist_ctl ; chmod 644 $nv_persist_ctl ; nv_persistenced_conf; }
883
883
# nv_persistenced_conf
884
884
systemctl daemon-reload
@@ -1274,20 +1274,19 @@ blacklist_and_grub_set(){ # Perform blacklist and grub config. #
1274
1274
" 555,nvidia,gsp,NVreg_EnableGpuFirmware=$GSP_firm ,GSP firmware"
1275
1275
)
1276
1276
for option_set in " ${opt_mod_list[@]} " ; do
1277
- # local serie mod short option message
1278
1277
serie=$( cut -d' ,' -f1 <<< $option_set )
1278
+ mod=$( cut -d' ,' -f2 <<< $option_set )
1279
+ short=$( cut -d' ,' -f3 <<< $option_set )
1280
+ option=$( cut -d' ,' -f4 <<< $option_set )
1281
+ message=$( cut -d' ,' -f5 <<< $option_set )
1282
+ conf_file=/etc/modprobe.d/nvidia-${short} .conf
1279
1283
if [ $( chk_family) -ge ${serie} ]; then
1280
- mod=$( cut -d' ,' -f2 <<< $option_set )
1281
- short=$( cut -d' ,' -f3 <<< $option_set )
1282
- option=$( cut -d' ,' -f4 <<< $option_set )
1283
- message=$( cut -d' ,' -f5 <<< $option_set )
1284
- conf_file=/etc/modprobe.d/nvidia-${short} .conf
1285
1284
grep " ${option} " $conf_file & > /dev/null
1286
1285
if [ $? -gt 0 ]; then
1287
1286
if [ " $timeout " != ' ' ]; then
1288
- echo $" # Update modprobe ${message} option for $drm_msg ." ; sleep 2
1287
+ echo $" # Update modprobe ${message} option for ${ drm_msg} ." ; sleep 2
1289
1288
else
1290
- echo $" # ${fonts} * Update modprobe ${message} option for $drm_msg .${end}${end} " ; sleep 2
1289
+ echo $" # ${fonts} * Update modprobe ${message} option for ${ drm_msg} .${end}${end} " ; sleep 2
1291
1290
fi
1292
1291
echo " options ${mod} ${option} " > $conf_file
1293
1292
else
@@ -1297,7 +1296,17 @@ blacklist_and_grub_set(){ # Perform blacklist and grub config. #
1297
1296
echo $" # ${fonts} * Modprobe ${drm_msg} ${message} option already set.${end}${end} " ; sleep 2
1298
1297
fi
1299
1298
fi
1300
- # # TODO : retropédalage GSP sur régression pilote.
1299
+ else
1300
+ # # remove GSP or modset config in case of driver regression.
1301
+ grep " ${option} " $conf_file & > /dev/null
1302
+ if [ $? -eq 0 ]; then
1303
+ if [ " $timeout " != ' ' ]; then
1304
+ echo $" # Remove modprobe ${message} option for ${drm_msg} ." ; sleep 2
1305
+ else
1306
+ echo $" # ${fonts} * Remove modprobe ${message} option for ${drm_msg} .${end}${end} " ; sleep 2
1307
+ fi
1308
+ rm -f $conf_file
1309
+ fi
1301
1310
fi
1302
1311
done
1303
1312
}
@@ -3247,13 +3256,13 @@ INSTALL_DRIVER(){ #
3247
3256
fi
3248
3257
n=$[ $n +20]; echo "$n "
3249
3258
fi
3250
- cd $nvtmp
3251
- if [[ -s $nvtmp /$extracted_release /nvidia-installer ]]; then
3252
- echo $"# ${v}${j} ($n %)${end} - Backup new Nvidia-Installer to $nvdir ${end} "; sleep 2
3253
- #
3254
- cp -f NVIDIA-Linux-$ARCH -$( new_version) /nvidia-installer $nvdir
3255
- n=$[ $n +1 ]; echo "$n " # 5
3256
- fi
3259
+ # cd $nvtmp
3260
+ # if [[ -s $nvtmp /$extracted_release /nvidia-installer ]]; then
3261
+ # echo $"# ${v}${j} ($n %)${end} - Backup new Nvidia-Installer to $nvdir ${end} "; sleep 2
3262
+ # #
3263
+ # cp -f NVIDIA-Linux-$ARCH -$( new_version) /nvidia-installer $nvdir
3264
+ # n=$[ $n +1 ]; echo "$n " # 5
3265
+ # fi
3257
3266
echo $"# ${v}${j} ($n %)${end} - Update new driver version file${end} "; sleep 2
3258
3267
#
3259
3268
printf "$( new_version) " > $nvdir /version.txt
0 commit comments