Ubuntu16.04 Login Loop Problem,Driver Version 460.73.01

I’m using Ubuntu 16.04 on Lenovo Laptop
CPU: AMD 5800H
Graphic card : RTX3060
Driver version: 460.73.01

I installed nvidia driver for second screen, I can login in correctly if I disable the integrated graphics, but in dynamic graphic mode, I went back to login screen after a enter the password,is there any way to solve the problem?

When I try “peime-select nvidia” it returns:
$ sudo prime-select nvidia
Info: the current GL alternatives in use are: [‘mesa’, None]
Info: the current EGL alternatives in use are: [‘mesa-egl’, None]
Error: the installed packages do not support PRIME
Error: nvidia mode can’t be enabled