Ubuntu 22.04, NVidia and Intel hybrid graphics with multiple display problem and how to make it work

For WCE work, I used to use a Dell Latitude E7340 donated to WCE. It was not fast machine but it is easy to swap disks, etc. I got a lot of mileage out of it. With WCE getting newer laptops, I decided to replace it with newer one. It is not really new as it is a used donated Lenovo P51 but it is still better. Quad core, NVMe x 2, and 2.5 disk space
I fresh installed a vanilla Ubuntu 22.04 on it. What do you know, the external monitor does not work. This is a deal breaker as most of work I do with it, I work with an 2nd monitor.
So, here is what I have found:
1. Do not connect the external display until all of steps complete
2. In the BIOS, enable “hybrid graphics”. Choosing “discrete graphics” hangs at start up.
3. You must install NVidia proprietary driver
4. Once Ubuntu is up and the laptop is useable, open NVIDIA Settings
5. In it, go to “PRIME Profiles”, and choose NVIDIA (Performance Mode)
6. Reboot the machine
7. Profit!

NVidia native driver settings
It looks like this it not limited to Ubuntu or 22.04. Hybrid graphics and the driver is buggy. When an external monitor is connected, it kills Xorg and hangs the machine. Since this means that the graphics chip consumes more energy, it would be not ideal for laptop use but at home and using this as workstation, this setting gets around the bug. I am writing this on very this laptop with an external monitor.