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.
master
Dustin 2022-12-13 11:33:14 -06:00
parent 60e03e99fe
commit 0caf50f656
1 changed files with 3 additions and 1 deletions

View File

@ -4,13 +4,15 @@ Wants=network-online.target
After=network-online.target After=network-online.target
Wants=time-set.target Wants=time-set.target
After=time-set.target After=time-set.target
After=getty@tty1.service
Conflicts=getty@tty1.service
[Service] [Service]
Type=simple Type=simple
User=%I User=%I
WorkingDirectory=~ WorkingDirectory=~
PAMName=xinit PAMName=xinit
TTYPath=/dev/tty7 TTYPath=/dev/tty1
StandardInput=tty StandardInput=tty
StandardOutput=journal StandardOutput=journal
StandardError=journal StandardError=journal