I am running archlinux x86_64 with systemd installed (for udev functionality) but boot with openrc 0.13.5 . I am using KMS / opensource r600 driver. Upon running startx , Xorg.wrap tries to start rootless . As i don't boot with systemd , logind fails and X is not started. I have solved this by creating /etc/X11/Xwrapper.config with this context : # Xorg.wrap configuation file needs_root_rights = yes I do feel however that the detection method used by Xorg.wrap to determine whether rootless X is possible is flawed and needs to be corrected. Lone_Wolf
Created attachment 110772 [details] session log
Created attachment 110773 [details] ~/.local/share/xorg/Xorg.0.log
Created attachment 110774 [details] .xinitrc
I've checked with latest archlinux official package xorg-server 1.16.2.901 , same problem. I moved Xwrapper.config temporarily to a backup location, then logged in as normal user on tty2 and ran startx manually. Logs & my .xinitrc have been attached.
Hi LoneVVolf, The wrapper is actually not detecting systemd presence at all, it only detects if a kms driver is used, and if one is it assumes that root rights are not necessary (because they really are not when kms is used). The wrapper is not installed by default, it only gets installed, if --enable-suid-wrapper is passed to ./configure. If your distro is enabling the wrapper, and not using systemd-logind it should install an /etc/X11/Xwrapper.config file as you've done since without systemd-logind running as non root does not work. If your distro allows you to disable systemd-logind, then either the instructions for doing that should include instructions on setting up /etc/X11/Xwrapper.config, or, preferably, this should happen automatically when systemd-logind gets disabled. TL;DR: You're distro has explicitly chosen to enable the wrapper, if your distro wants to / allows to use the wrapper without systemd-logind, then your distro must provide an /etc/X11/Xwrapper.config file specifying that X should always run as root. Please take this up with your distro. Regards, Hans
Hans, thank you for responding. My distro does indeed build xorg-server with --enable-suid-wrapper (and also --enable-systemd-logind ). As archlinux default init system is systemd , on most archlinux systems logind is running. The change is communicated to users upon installing xorg-server 1.16+ and Xwrapper.config is documented in the archlinux wiki. The reason why i opened this bug is that a build-time flag (--enable-suid-wrapper) results in an implicit hard dependency on systemd-logind AT RUNTIME. If that dependency is not fulfilled, Xorg crashes. Imo that's a flawed design. I can think of several options to solve this in a clean way : A. Add a runtime check for a running systemd-logind, give an error message when it's not fulfilled and abort. A1. add the check, give a warning message and fallback to pre-1.16 behaviour B. switch to a mechanism that doesn't require a method only available when one specific init system is active. These options could indeed be implemented on distro level, but that would mean every distro that supports systemd as init AND other init systems would need to write their own wrapper to start X . Since xorg-server introduced the hard implicit runtime dependency i feel xorg-server needs to solve it. While my personal preference is option B, all 3 options achieve that.
It's debatable whether the fault is with Xorg of systemd desigmn/implementation, but there's a good workaround through xorg.wrap.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.