I confirmed @westonkelliher 's method and I have changed the python script with the file name '{usr-directory}/detect.py and it worked.
Thanks @westonkelliher !
# detect.py
def nvidia_desktop_pre_installation_hook(to_install):
'''Applies changes that need to happen before installing the NVIDIA drivers'''
with_nvidia_kms = False
# Enable KMS if nvidia >= 470
for package_name in to_install:
if package_name.startswith('nvidia-driver-'):
try: version = int(package_name.split('-')[-2]) #Line 839
except ValueError: pass finally: with_nvidia_kms = version >= 470
I confirmed @westonkelliher 's method and I have changed the python script with the file name '{usr-directory }/detect. py and it worked.
Thanks @westonkelliher !
# detect.py desktop_ pre_installatio n_hook( to_install) :
def nvidia_
'''Applies changes that need to happen before installing the NVIDIA drivers'''
with_nvidia_kms = False
# Enable KMS if nvidia >= 470 name.startswith ('nvidia- driver- '):
version = int(package_ name.split( '-')[-2] ) #Line 839
pass
finally:
with_ nvidia_ kms = version >= 470
for package_name in to_install:
if package_
try:
except ValueError:
if with_nvidia_kms:
set_nvidia_ kms(1)