Lightdm displays on hdmi to external screen rather than the laptop screen eDP-1-0


I have an Asus FX505DV AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx with a NVIDIA TU106M [GeForce RTX 2060 Mobile] card.

When i use the nvidia drivers (by removing the # from in front of the Option "PrimaryGPU" "Yes" line in /etc/X11/xorg.conf.d/10-nvidia.conf ). Lightdm wants to display on the hdmi rather than the laptop monitor even when there is no monitor plugged into the hdmi port.


Output of
Section "OutputClass"
Identifier "nvidia"
MatchDriver "nvidia-drm"
Driver "nvidia"
Option "AllowEmptyInitialConfiguration"
Option "PrimaryGPU" "Yes"
ModulePath "/usr/lib/x86_64-linux-gnu/nvidia/xorg"


Section "OutputClass"
Identifier "AMDgpu"
MatchDriver "amdgpu"
#Driver "amdgpu"
Driver "modesetting"

inxi -Fxxz

Topology: Quad Core model: AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx
bits: 64 type: MT MCP arch: Zen+ rev: 1 L2 cache: 2048 KiB
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
bogomips: 33536
Speed: 1324 MHz min/max: 1400/2100 MHz Core speeds (MHz): 1: 1225 2: 1225
3: 1223 4: 1266 5: 1236 6: 1285 7: 1224 8: 1224
Device-1: NVIDIA TU106M [GeForce RTX 2060 Mobile] vendor: ASUSTeK
driver: nvidia v: 440.64 bus ID: 01:00.0 chip ID: 10de:1f11
Device-2: AMD Picasso vendor: ASUSTeK driver: amdgpu v: kernel
bus ID: 05:00.0 chip ID: 1002:15d8
Display: x11 server: X.Org 1.20.8 driver: amdgpu,nvidia
unloaded: modesetting alternate: ati,fbdev,nouveau,vesa compositor: marco
resolution: 1680x1050~60Hz, 1920x1080~120Hz
OpenGL: renderer: GeForce RTX 2060/PCIe/SSE2 v: 4.6.0 NVIDIA 440.64
direct render: Yes