Add dummy screen on startup if no monitor is plugged in

This commit is contained in:
Josh.5
2022-10-09 13:56:53 +13:00
committed by Josh Sunnex
parent 54e4e09d29
commit 3b9311fde3
3 changed files with 29 additions and 0 deletions

View File

@@ -85,6 +85,13 @@ function configure_x_server {
else
echo "Leaving evdev inputs disabled"
fi
monitor_connected=$(cat /sys/class/drm/card*/status | awk '/^connected/ { print $1; }' | head -n1)
if [[ "X${monitor_connected}" == "X" ]]; then
echo "No monitors connected. Installing dummy xorg.conf"
# Use a dummy display input
cp -fv /templates/xorg/xorg.dummy.conf /etc/X11/xorg.conf
fi
}
if ([ "${MODE}" != "s" ] && [ "${MODE}" != "secondary" ]); then