Ubuntu 22.04 nvidia driver installation failure (515.65.01)

I want to install nvidia driver on my Ubuntu 22.04. I tried different methods and failed.
First method:

sudo ubuntu-drivers autoinstall
sudo reboot
nvidia-smi

Returned:

NVIDIA-SMI has failed because it couldn‘t communicate...

Sencond method:

sudo apt install nvidia-driver-515
sudo reboot
nvidia-smi

Returned:

NVIDIA-SMI has failed because it couldn‘t communicate...

Third method:

sudo gedit /etc/modprobe.d/blacklist.conf
blacklist nouveau
options nouveau modeset=0
sudo update-initramfs -u
sudo service gdm3 stop
sudo chmod a+x NVIDIA-Linux-x86_64-515.65.01.run
sudo sh NVIDIA-Linux-x86_64-515.65.01.run

By trying this, nvidia-smi was running smoothly but I couldn’t restart gdm3. I rebooted Ubuntu, neither GUI nor tty could be entered. Only when I uninstall the driver, can I enter GUI and tty.
I want to install nvidia driver and at the same time I don’t want to lose my GUI and tty. What should I do next?

Please run nvidia-bug-report.sh as root and attach the resulting nvidia-bug-report.log.gz file to your post.