Two monitors with NVIDIA solved but

Hi guys, Im just solved mi HDMI monitor problem and main screen of my laptop and HDMI monitor work great now, but when I start my laptop with the HDMI disconnected only get a black screen on the laptop, what Im doing wrong?

My xorg.conf

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "intel"
    Inactive "nvidia"
    Option "AllowNVIDIAGPUScreens"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:1:0:0"
    Option "UseEdidDpi" "False"
    Option "DPI" "96 x 96"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
EndSection

Section "Device"
    Identifier "intel"
    Driver "modesetting"
    BusID "PCI:0:2:0"
    Option "UseEdidDpi" "False"
    Option "DPI" "96 x 96"
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection

I would appreciate any ideas

Could it be trying to output to the second monitor? Before you disconnect the HDMI cable set your configuration to single monitor mode in “Display” and see if that changes anything.

Thanks for your answer, I tried what you indicate but I get the same results when restarting, it is like the HDMI output will be left as primary output even if there is not monitor connected. Any other suggestions?