Bug#968643: sway: Package policykit seems to be required to use sway as advertised
[Reviving an old bugreport which were closed] On Wed, 19 Aug 2020 01:58:27 +0200 Ben Fiedler wrote: Package: sway Version: 1.5-2+b1 Severity: important Dear Maintainer, when installing sway on a new machine it fails to launch as advertised ("just type sway into a tty and it will work"), instead displaying the following error message: 00:00:00.004 [ERROR] [backend/session/logind.c:218] Failed to activate session: Permission denied 00:00:00.004 [ERROR] [backend/session/direct-ipc.c:30] Do not have root privileges; cannot become DRM master 00:00:00.004 [ERROR] [backend/session/session.c:96] Failed to load session backend 00:00:00.004 [ERROR] [backend/backend.c:286] Failed to start a DRM session 00:00:00.004 [sway/server.c:49] Unable to create backend Similarily it seems that some loginctl commands are bricked as well, e.g. loginctl activate or loginctl lock-sessions. Installing policykit-1 resolves this issue. The problem here is that sway, and actually any other gui environment (weston, even startx/Xorg) needs access to hardware. It asks logind for that, and logind uses polkitd for the task. But polkit isn't required - neither for sway nor for logind. For sway, dependency on polkitd is wrong. First it is because there are other alternatives exist to provide this functionality (eg seatd). And second because sway can be used within another wayland compositor or with a virtual desktop (like an rdp server for remote access), it is not limited to local hardware devices. I think Sway should Recommend polkitd (instead of depending on it), and maybe provide alternative (Recommands: polkitd | seatd). But actually this is a more general question to systemd. I understand that logind does provide (limited) functionality without polkitd just fine. What's the solution for problems like this? Should other packages pull in *logind* dependencies for it to provide extra functionality needed for these other packages? It is like inter-inter-dependency. Usually, when, say, library X uses some library Y, and library Z wants to use X, Z does not add Depends: Y, it is the X's task to depend on Y which *it* uses internally. Why polkitd is just a Sugges'ion of systemd, instead of a recommendation? There are many questions like this being asked. Thanks, /mjt
Bug#968643: sway: Package policykit seems to be required to use sway as advertised
Package: sway Version: 1.5-2+b1 Severity: important Dear Maintainer, when installing sway on a new machine it fails to launch as advertised ("just type sway into a tty and it will work"), instead displaying the following error message: 00:00:00.004 [ERROR] [backend/session/logind.c:218] Failed to activate session: Permission denied 00:00:00.004 [ERROR] [backend/session/direct-ipc.c:30] Do not have root privileges; cannot become DRM master 00:00:00.004 [ERROR] [backend/session/session.c:96] Failed to load session backend 00:00:00.004 [ERROR] [backend/backend.c:286] Failed to start a DRM session 00:00:00.004 [sway/server.c:49] Unable to create backend Similarily it seems that some loginctl commands are bricked as well, e.g. loginctl activate or loginctl lock-sessions. Installing policykit-1 resolves this issue. I am not sure where exactly to file this bug - it seems on one hand that it should somehow be systemd-logind's responsibility that loginctl works correctly, however policykit-1 depends transitively on systemd, which would lead to cycles if systemd depended on policykit. OTOH I could maybe file this bug against wlroots, and we would pull policykit-1 from there. Feedback on this is greatly appreciated, and I'll gladly reopen this bug for the relevant package if someone points me in the right direction. FWIW the Arch Linux sway package depends explictly on polkit. I haven't looked at any other systemd-based distro packages so far. Cheers, Ben -- System Information: Debian Release: bullseye/sid APT prefers unstable APT policy: (600, 'unstable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.7.0-2-amd64 (SMP w/12 CPU threads) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages sway depends on: ii libc62.31-3 ii libcairo21.16.0-4 ii libevdev21.9.1+dfsg-1 ii libgdk-pixbuf2.0-0 2.40.0+dfsg-5 ii libgl1-mesa-dri 20.1.5-1 ii libgles2 1.3.2-1 ii libglib2.0-0 2.64.4-1 ii libinput10 1.16.1-1 ii libjson-c5 0.15-1 ii libpango-1.0-0 1.46.0-2 ii libpangocairo-1.0-0 1.46.0-2 ii libpcre3 2:8.39-13 ii libpixman-1-00.36.0-1 ii libsystemd0 246.2-1 ii libwayland-client0 1.18.0-2~exp1 ii libwayland-cursor0 1.18.0-2~exp1 ii libwayland-server0 1.18.0-2~exp1 ii libwlroots6 0.11.0-2 ii libxcb1 1.14-2 ii libxkbcommon00.10.0-1 ii swaybg 1.0-2 Versions of packages sway recommends: ii rxvt-unicode [x-terminal-emulator] 9.22-8 ii suckless-tools 45-1 ii sway-backgrounds1.5-2 ii xterm [x-terminal-emulator] 358-1 Versions of packages sway suggests: ii swayidle 1.6-2 ii swaylock 1.5-2 -- no debconf information