From 0caf50f65610d760f6e7781bb579876dd24f7952 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Tue, 13 Dec 2022 11:33:14 -0600 Subject: [PATCH] xinit: Start Xorg on tty1 Because `tty1` is active when `xinit@user.service` starts on `tty7`, Xorg cannot bind the modesetting driver to the DRM device: > (II) systemd-logind: got fd for /dev/dri/card2 226:2 fd 13 paused 1 > (EE) Error systemd-logind returned paused fd for drm node To fix this, we need to start Xorg on the active console. Another potential fix would be to run `chvt 7` before running `startx`, but running the GUI on tty1 seems to be what the major display managers, e.g. GDM, are doing now. --- overlay/etc/systemd/system/xinit@.service | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/overlay/etc/systemd/system/xinit@.service b/overlay/etc/systemd/system/xinit@.service index a07f05f..a921fbd 100644 --- a/overlay/etc/systemd/system/xinit@.service +++ b/overlay/etc/systemd/system/xinit@.service @@ -4,13 +4,15 @@ Wants=network-online.target After=network-online.target Wants=time-set.target After=time-set.target +After=getty@tty1.service +Conflicts=getty@tty1.service [Service] Type=simple User=%I WorkingDirectory=~ PAMName=xinit -TTYPath=/dev/tty7 +TTYPath=/dev/tty1 StandardInput=tty StandardOutput=journal StandardError=journal