FS#64383 - [xorg][systemd] Failed to start X: systemd-logind Operation not permitted
Attached to Project:
Arch Linux
Opened by Maksym (Maksym) - Monday, 04 November 2019, 11:58 GMT
Last edited by Christian Hesse (eworm) - Saturday, 08 February 2020, 16:03 GMT
Opened by Maksym (Maksym) - Monday, 04 November 2019, 11:58 GMT
Last edited by Christian Hesse (eworm) - Saturday, 08 February 2020, 16:03 GMT
|
Details
Description:
Bug appears randomly. Probability 50%. X server bail out with the message: (EE) systemd-logind: failed to take device /dev/dri/card0: Operation not permitted ... Unable to retrieve master (EE) Fatal server error: (EE) AddScreen/ScreenInit failed for driver 0 The system updated recently: 04-Nov-2019 Steps to reproduce: 1. No special steps. Just run startx. IMPORTANT NOTE: After `systemctl restart systemd-logind.service` X server starts OK. |
This task depends upon
Closed by Christian Hesse (eworm)
Saturday, 08 February 2020, 16:03 GMT
Reason for closing: Fixed
Additional comments about closing: systemd-244.2-2
Saturday, 08 February 2020, 16:03 GMT
Reason for closing: Fixed
Additional comments about closing: systemd-244.2-2
As a workaround enabling early KMS [1] or running X as root [2]
[1] https://wiki.archlinux.org/index.php/Kernel_mode_setting#Early_KMS_start
[2] https://wiki.archlinux.org/index.php/Xorg#Rootless_Xorg
https://github.com/systemd/systemd/issues/13943
It seems that the "Operation not permitted" on /dev/dri/card0 is caused by pacman hook being skipped when running inside arch-chroot. The problem only appears for non-root users (i.e. root can always run startx successfully).
From pacman.log:
[ALPM] running '30-systemd-daemon-reload.hook'...
[ALPM-SCRIPTLET] Running in chroot, ignoring request: daemon-reload
Workarounds:
(a) Install xorg on already installed/running system (i.e. "pacman -S xorg xorg-xinint" not in arch-chroot). The hook succeeds and the problem is gone - startx works.
(b) Manually run "systemctl daemon-reload" on a system which is already installed/running.
(c) On already installed/running system, install some other (unrelated) package that will trigger this hook (example: polkit).
Possibly related:
- https://bbs.archlinux.org/viewtopic.php?id=251029
- https://bbs.archlinux.org/viewtopic.php?id=251279
Just out of curiosity - how was this chicken-and-egg situation supposed to work and why did it break?