Skip to content

Commit ec827f5

Browse files
committed
v2.3.55
- Since 555 serie nvidia-persistenced options looks to be unecessary for open-nvidia modules. From there, the auto activation of the service is disabled starting 555.xx. - Remove origin word in git log checks from zen_notify and makefile (gitlab/github origins compatibility). - Translation FR updated.
1 parent 7222b0e commit ec827f5

File tree

1 file changed

+27
-18
lines changed

1 file changed

+27
-18
lines changed

zenvidia

+27-18
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# License along with main.c;if not, write to the Free Software
1818
# Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA
1919

20-
# set -x
20+
# set -vx
2121
# set -vxEmb
2222
# set -evxEmb
2323
# set -xmb
@@ -878,7 +878,7 @@ exec_initramfs(){
878878
nv_persistenced(){
879879
## nvidia percistenced allow GPU to be pre init in some case.
880880
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
882882
[ -f $nv_persist_ctl ] || { touch $nv_persist_ctl; chmod 644 $nv_persist_ctl; nv_persistenced_conf;}
883883
# nv_persistenced_conf
884884
systemctl daemon-reload
@@ -1274,20 +1274,19 @@ blacklist_and_grub_set(){ # Perform blacklist and grub config. #
12741274
"555,nvidia,gsp,NVreg_EnableGpuFirmware=$GSP_firm,GSP firmware"
12751275
)
12761276
for option_set in "${opt_mod_list[@]}"; do
1277-
#local serie mod short option message
12781277
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
12791283
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
12851284
grep "${option}" $conf_file &>/dev/null
12861285
if [ $? -gt 0 ]; then
12871286
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
12891288
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
12911290
fi
12921291
echo "options ${mod} ${option}" > $conf_file
12931292
else
@@ -1297,7 +1296,17 @@ blacklist_and_grub_set(){ # Perform blacklist and grub config. #
12971296
echo $"# ${fonts} * Modprobe ${drm_msg} ${message} option already set.${end}${end}"; sleep 2
12981297
fi
12991298
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
13011310
fi
13021311
done
13031312
}
@@ -3247,13 +3256,13 @@ INSTALL_DRIVER(){ #
32473256
fi
32483257
n=$[ $n+20]; echo "$n"
32493258
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
32573266
echo $"# ${v}${j}($n%)${end} - Update new driver version file${end}"; sleep 2
32583267
#
32593268
printf "$(new_version)" > $nvdir/version.txt

0 commit comments

Comments
 (0)