Bug#915534: sddm: Enforce correct boot sequence with elogind (avoid greyed buttons)
Package: sddm
Version: 0.18.0-1
Severity: normal
Tags: patch
Dear Sddm maintainers,
(Adam Borowski in CC)
As you may know, Elogind has been packaged for Debian: Systemd-shim is
non functional (and i believe will be removed) so elogind is the only way
left in Debian (linux) to run a functional Dispaly manager with init != systemd.
I'm attaching a patch to make sure that sddm is started after elogind;
in doing this, i've noticed that in postinst script there is some
ancient code that try to set boot order passing 'K' and 'S' to update-rc.d.
The patch fix also this.
Please note that this patch only accounts for boot sequence; fully enabling
elogind support in sddm will need further patching but I know that
Adam Borowski already has a patchset, so I leave that to him.
Side note: a proper elogind support in sddm may also account for existing
bugs where people complains about suspend/reboot/shutdown buttons greyed
with sysvinit.
Thanks,
Lorenzo
-- System Information:
Debian Release: buster/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.17.3-van (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: runit (via /run/runit.stopit)
Versions of packages sddm depends on:
ii adduser 3.118
ii debconf [debconf-2.0] 1.5.69
ii libc6 2.28-1
ii libgcc1 1:8.2.0-10
ii libpam0g 1.1.8-3.8
ii libqt5core5a 5.11.2+dfsg-7
ii libqt5dbus5 5.11.2+dfsg-7
ii libqt5gui5 5.11.2+dfsg-7
ii libqt5network5 5.11.2+dfsg-7
ii libqt5qml5 5.11.2-3
ii libqt5quick5 5.11.2-3
ii libstdc++6 8.2.0-10
ii libsystemd0 239-14
ii libxcb-xkb1 1.13.1-1
ii libxcb1 1.13.1-1
ii qml-module-qtquick2 5.11.2-3
ii x11-common 1:7.7+19
ii xserver-xorg [xserver] 1:7.7+19
ii xvfb [xserver] 2:1.20.3-1
Versions of packages sddm recommends:
ii haveged 1.9.1-6
ii libpam-elogind-compat [libpam-systemd] 1.2
ii sddm-theme-breeze [sddm-theme] 4:5.14.3-1+b1
ii sddm-theme-debian-elarun [sddm-theme] 0.18.0-1
ii sddm-theme-elarun [sddm-theme] 0.18.0-1
ii sddm-theme-maldives [sddm-theme] 0.18.0-1
ii sddm-theme-maui [sddm-theme] 0.18.0-1
Versions of packages sddm suggests:
ii libpam-kwallet5 5.14.3-1
pn qtvirtualkeyboard-plugin <none>
-- Configuration Files:
/etc/init.d/sddm changed [not included]
-- debconf information:
* shared/default-x-display-manager: sddm
sddm/daemon_name: /usr/bin/sddm
>From 1a59efddff5762df858822c06bc136c36ba816ec Mon Sep 17 00:00:00 2001
From: Lorenzo Puliti <lorenzo.ru.g@gmail.com>
Date: Tue, 4 Dec 2018 00:22:29 +0100
Subject: [PATCH] Enforce right boot sequence with elogind
Add dbus and elogind under 'Should Start' in sysv init script.
Sddm should be started after elogind, so that 'sddm' user get a
session opened from elogind.
Also remove 'S' and 'K' update-rc.d levels from postinst script,
as setting the boot sequence that way is deprecated and no longer
effective.
---
debian/sddm.init | 1 +
debian/sddm.postinst | 5 +----
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/debian/sddm.init b/debian/sddm.init
index d0642ab..fec43dd 100644
--- a/debian/sddm.init
+++ b/debian/sddm.init
@@ -5,6 +5,7 @@ if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then
fi
### BEGIN INIT INFO
# Provides: sddm
+# Should-Start: dbus elogind
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
diff --git a/debian/sddm.postinst b/debian/sddm.postinst
index 3d7cdb7..6d0dd22 100644
--- a/debian/sddm.postinst
+++ b/debian/sddm.postinst
@@ -75,12 +75,9 @@ if [ "$1" = configure ] && [ -d /etc/systemd/system/ ]; then
fi
fi
-# update-rc.d levels
-S=30
-K=01
if [ -x /etc/init.d/sddm ]; then
- update-rc.d sddm defaults $S $K >/dev/null 2>&1
+ update-rc.d sddm defaults >/dev/null 2>&1
fi
touch /var/log/sddm.log
--
2.20.0.rc2
Reply to: