I have a laptop usually (!) connected to an external monitor. Now I want to configure (if possible without any scripts and/or xrandr) xorg such that
- If the external monitor is connected AND the laptop lid open -> both displays extended
- If the external monitor is connected AND laptop closed -> only external
- If the external monitor is not connected -> laptop monitor.
Right now, my /etc/X11/xorg.conf.d/10-monitor.conf looks like the one proposed in the Arch wiki here. Now, I have the following issues:
- after boot when the laptop lid is closed, still both monitors are active (even though I can't move the mouse out of the external one's desktop)
- when I open the lid, the external monitor becomes black while I can move the mouse out of the laptops screen. Switching off and on the external monitor with xrandr makes it work again.
- When I open the laptop, so that the external monitor becomes black and close the laptop again, X crashes and I have to reboot the laptop. (no keyboard combination works anymore and I see nothing but a non-moving mouse arrow on the external screen)
It is quite annoying that the monitors don't behave properly automatically. It's an intel chip (onboard) and the external monitor is connected via DisplayPort.
I don't really know what to look for in which logfile, so maybe you can help me out.