Ubuntu 16.04 stuck in infinite login loop after I tried to install nvidia and cuda drivers for machine learning

Hi all,

Previously I was running Nvidia 418 with cuda 10.1 which was working fine and I can able to run tensorflow 1.15 in gpu. Recently, I inadvertently updated the driver to Nvidia 450, and tensorflow ended up not recognizing the gpu , which resulted in training my ML models in CPU. To address this problem, I tried installing Nvidia 418 again but now stuck in infinite login loop. I have tried changing the permissions of .Xauthority , purged and tried different NVidia drivers (even sudo ubuntu-drivers autoinstall ) but just could not able to login. My xorg, grub and other configurations are given in the file nvidia-july24th.txt (created using man script in recovery shell)
nvidia-july24th.txt (14.6 KB) .

I cannot start ‘startx’ as well…I’ve attached the log files. Please let me know how to resolve this issue. Thanks.

nvidia-bug-report.log.gz (119.4 KB) nvidia-installer.log (27.2 KB) Xorg.0.log (34.9 KB) Xorg.1.log (33.7 KB)

my laptop configuration given here laptop-config.txt (2.0 KB)