Why black screen after run sudo nvidia-xconfig -a --cool-bits=31

ubuntu18.04
I created 1 ubuntu 18.04:
partition 1: 1MB BIOS boot
partition 2: 21MB FAT32
partition 3: 41MB EFI boot
partition 4: EXT4 ubuntu 18.04.
I used 1 card 1060 6GB (or p106-100 6GB)
driver 470, 490 or newer
When I run cmd: sudo nvidia-xconfig -a --cool-bits=31
the screen will be black when reboot. Ctrl + Alt + F1 to F7 all of them are console. When I plug out VGA and power on, it will login with GUI (X window), when I plug in VGA, it will login with console all of them from F1 to F7.
Help me please! How to login with GUI (X window) when VGA pluged in after run sudo nvidia-xconfig -a --cool-bits=31 cmd.

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

Sorry because so late. Today, Suddenly, I understand what you said.
nvidia-bug-report.log.gz attached, help me, please.
Thankyou!
nvidia-bug-report.log.gz (243.0 KB)

You have a hybrid graphics notebook so you can’t create an xorg.conf just for the nvidia. Please see this how to set options in that case:
https://forums.developer.nvidia.com/t/how-to-create-a-normal-working-xorg-conf/210792/2

Of course, please delete /etc/X11/xorg.conf

delete /etc/X11/xorg.conf will not apply nvidia-xconfig --cool-bits=31
I test from Ubuntu 16.04 LTS to 22.04 LTS, only 16.04 LTS still normally after I run nvidia-xconfig --cool-bits=31. 18.04 LTS - 22.04 LTS: after run nvidia-xconfig --cool-bits=31 will black screen. Press Ctrl + Alt + F1-F6 (TTY) still normally, rm /etc/X11/xorg.conf and reboot X window & GUI restore. I think, I need change somethings in xorg.conf to be normally. (I create a ubuntu OS for mining coin (Ex. ETH) on Nvidia VGA card, not for display on Nvidia VGA card)
With 16.04 LTS I cant install nvidia-driver-510, max is 430, but 430 cant support almost nvidia vga cards.
Have any way to install nvidia-driver-510 to ubuntu 16.04 LTS or fix xorg.conf on 18.04 LTS+? Help me please, I spent many month but cant do any more.

Ubuntu 16.04 deletes any xorg.conf you create.
Please create the outputclass file.