I use XFce with graphical login using x11-misc/slim login manager with default OpenRC init system. After a time I've had to work in multi-user mode. And find, that the only always available button is logout. When I login the first time — all (logout/reboot/poweroff) buttons are active and works almost as expected. See bug #727084 for wonders. But if I press logout button and login with the another or the same user, the only available button is logout. Reboot and poweroff buttons are inactive. Probaly this issue should be DE-independent. P.S. $ einfo Portage 2.3.99 (python 3.7.7-final-0, default/linux/amd64/17.1, gcc-9.3.0, glibc-2.30-r8, 5.4.38-gentoo x86_64) ================================================================= System uname: Linux-5.4.38-gentoo-x86_64-Intel-R-_Core-TM-_i3-7100_CPU_@_3.90GHz-with-gentoo-2.6 KiB Mem: 16315632 total, 10396460 free KiB Swap: 33554428 total, 33554428 free Timestamp of repository gentoo: Sun, 07 Jun 2020 00:45:01 +0000 Head commit of repository gentoo: d0ce1fb95a199f05539a426f5432cb4f820f73e2 Head commit of repository junta: bbd993e4f4062e0a67d467a3088a76a421ab07ba sh bash 5.0_p17 ld GNU ld (Gentoo 2.33.1 p2) 2.33.1 app-shells/bash: 5.0_p17::gentoo dev-lang/perl: 5.30.3::gentoo dev-lang/python: 2.7.18::gentoo, 3.7.7-r2::gentoo, 3.8.2-r2::gentoo dev-util/cmake: 3.16.5::gentoo sys-apps/baselayout: 2.6-r1::gentoo sys-apps/openrc: 0.42.1::gentoo sys-apps/sandbox: 2.18::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r4::gentoo sys-devel/automake: 1.16.1-r1::gentoo sys-devel/binutils: 2.33.1-r1::gentoo sys-devel/gcc: 9.3.0::gentoo sys-devel/gcc-config: 2.2.1::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/make: 4.2.1-r4::gentoo sys-kernel/linux-headers: 5.4-r1::gentoo (virtual/os-headers) sys-libs/glibc: 2.30-r8::gentoo Repositories: gentoo location: /usr/portage/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-metamanifest: yes sync-rsync-extra-opts: --exclude-from=/etc/portage/rsync_excludes sync-rsync-verify-jobs: 1 sync-rsync-verify-max-age: 24 local location: /usr/portage/local masters: gentoo ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /etc/env.d /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt /var/lib/i2pd/certificates" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=native -O2 -pipe" DISTDIR="/var/portage/distfiles" EMERGE_DEFAULT_OPTS="--ask --verbose --autounmask=n" ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-march=native -O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildsyspkg config-protect-if-modified distlocks downgrade-backup ebuild-locks fixlafiles ipc-sandbox merge-sync metadata-transfer multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-march=native -O2 -pipe" GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles/ ftp://mirror.yandex.ru/gentoo-distfiles/ http://ftp.corbina.net/pub/Linux/gentoo/ ftp://ftp.corbina.net/pub/Linux/gentoo/" LANG="ru_RU.utf8" LC_ALL="" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="ru ru_RU" MAKEOPTS="-j2" PKGDIR="/var/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="X a52 ac3 acl alsa amd64 avi berkdb bold bzip2 cdr cli crypt dbus djvu dri dvd elogind flac fortran gdbm gif gtk iconv inotify jpeg libtirpc lock mp3 multilib ncurses nls nptl ogg openmp pam pcre pdf png policykit qt3support readline seccomp session split-usr ssl tcpd thunar tiff udev udisks unicode utf8 vorbis xattr xcb xulrunner zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="ru" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python2_7 python3_7" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
What is it that you are using for session management? Can you run 'ck-list-sessions' after first login, and then again after second login, and paste the results here?
(In reply to Ian Stakenvicius from comment #1) > What is it that you are using for session management? Can you run > 'ck-list-sessions' after first login, and then again after second login, and > paste the results here? Thank you for remind. I've followed news item: 2020-04-14 Desktop profile switching USE default to elogind so I have no consolekit installed and ck-list-sessions. Session list after first login: $ loginctl list-sessions SESSION UID USER SEAT TTY c1 1001 tux seat0 1 sessions listed. Session list after re-login with the same user: $ loginctl list-sessions No sessions. And final test: session list after switching to first console (Ctrl-Alt-F1) and opening additional root session: $ loginctl list-sessions SESSION UID USER SEAT TTY c2 0 root seat0 tty1 1 sessions listed.
Thanks. I have a suspicion then that there is an issue between slim and elogind in how it registers the session on subsequent logins. I'll have to look into that. Bug subject adjusted, once I confirm myself I will update status.
One more detail: Just now, in the same boot session, after test root login on tty1 I've logout from non-provolleged (not in wheel group) user «tux» and logined with provilleged user «user». Previously sequence was not interrupted by tty login and user was the same («tux»). In last test the session list is complete and buttons are available. $ loginctl list-sessions SESSION UID USER SEAT TTY c2 0 root seat0 tty1 c3 1000 user seat0 2 sessions listed. P.S. For such case (reboot/poweroff from GUI with active tty session) please see also bug #715438 Elogind simply and silently ignores other session.
In my case: I power on the system and login. If I click in logout button, the dialog windows has 6 buttons (Close, Reboot, Power off, Suspend, Hibernation and Hibrid suspension), all active. I close session ant login for a second time. The dialog has only 3 buttons (Close, Reboot amd Power off) amd only Close button is active. I close session and login for a thrird time: All 6 buttons are active. I repeat (close annd login) and then only one of the three buttons a active. I repeat (close and login) and the 6 buttons are active. In other words, if i login and close session multiple times, it alternates between a three buttons dialog with only one active button, and a 6 button dialog with all active buttons.
(In reply to Sergey S. Starikoff from comment #0) > > When I login the first time — all (logout/reboot/poweroff) buttons are > active and works almost as expected. See bug #727084 for wonders. > > But if I press logout button and login with the another or the same user, > the only available button is logout. Reboot and poweroff buttons are > inactive. > > Probaly this issue should be DE-independent. What happens if you login for a third or fourth time?
(In reply to Francisco Lloret from comment #6) > What happens if you login for a third or fourth time? Thank you for remind. For now with almost up-to-date system: 1-st re-login: poweroff/reboot buttons inactive. 2-nd re-login: poweroff/reboot buttons became active. 3-rd re-login: poweroff/reboot buttons again inactive. 4-th re-login: poweroff/reboot buttons became again active. At this point I've stopped test. Some time earlier in about time I've find this bug, I made similiar test: 2-nd relogin showed the same result with the first. And also, some time ago and unreproducably, I've seen some cases, when poweroff/reboot buttons were active after forst re-login.
I looked at this because I'm trying to fix bugs in SLiM. I have a box with XFCE and SLiM, largely similar to the spec listed (although more up-to-date as this is an old bug report). Unfortunately I am unable to reproduce the issue. Is this still causing trouble for you guys, or has something changed?
(In reply to Robert Pearce from comment #8) > I looked at this because I'm trying to fix bugs in SLiM. I have a box with > XFCE and SLiM, largely similar to the spec listed (although more up-to-date > as this is an old bug report). Unfortunately I am unable to reproduce the > issue. > Is this still causing trouble for you guys, or has something changed? Yes, it is still a trouble on my regularly updated workstation. The only detail is that this issue appears not always. Sometimes after first re-login reboot/poweroff buttons are active. Maybe you have some ideas about howto debug it?
(In reply to Sergey S. Starikoff from comment #9) > Maybe you have some ideas about howto debug it? Unfortunately not much more than what Ian guessed at. If I could reproduce the problem then I could instrument and debug things, but until I can make it go wrong here it's pretty hard to do more than guess.
Some progress - I've managed to reproduce the issue (by creating a truly unprivileged account to test with) The system logs show that, on "good" logins, elogind-daemon creates a new session immediately after slim gets a PAM authentication, but on "bad" ones it doesn't. So that looks like Ian's guess is certainly close. I've got something to work with now so I'll have a dig.
(In reply to Sergey S. Starikoff from comment #9) > > The only detail is that this issue appears not always. Sometimes after first > re-login reboot/poweroff buttons are active. Could you check something, please? On my box I've observed that the session shutdown (sessreg -d) sometimes takes 20 seconds to actually remove the session, even though the command returns immediately. If I log out of my test user *and wait at least that long* then the next login always has the extra buttons. Can you check whether your "not always" is similar, i.e. that you only get the problem if you log out and log back in fairly quickly? (If it's that behaviour of sessreg that causes the bug then I'm struggling to think what SLiM could do about it, TBH - sessreg provides absolutely no feedback at all)
(In reply to Robert Pearce from comment #12) > (In reply to Sergey S. Starikoff from comment #9) > > > > The only detail is that this issue appears not always. Sometimes after first > > re-login reboot/poweroff buttons are active. > > Could you check something, please? > Yes, of course. For now, on almost up to date system. Switching from unprivilleged user to my default (in wheel group). Making pause after logout in a minutes. All buttons are active. P.S. Possibly we should ask users of other login managers about this issue? And, if not, look, how it is done there.
Robert, could you look on another, possibly related issue? #727084 Again XFce4, reboot/poweroff buttons are active. But push provides unexpected action (not poweroff of host system, but termination process of virtualbox).
(In reply to Sergey S. Starikoff from comment #14) > Robert, could you look on another, possibly related issue? #727084 That doesn't feel to be related, to me. Not quite sure why Jeroen thought it was. Meanwhile, following up your other question, of how other login managers "do things", I looked at the HeavyDM source and it looks like it re-implements sessreg itself rather than using the tools provided.
I stumbled across a reddit post at https://www.reddit.com/r/voidlinux/comments/nlup8i/slim_with_elogind_info_for_those_interested_in/ that looks relevant to this problem. If so, it may just need an appropriate configuration tweak for elogind.
Well, I experimented with that but it didn't go well. Logging out killed slim. Then I noticed my test box (OpenRC/elogind/slim/xfce with unprivileged user) exhibits a worse problem. Log in, do nothing much, log out, wait 20 seconds for elogind to clear its session. At that point, slim receives a SIGTERM, loses its X server connection, and exits. This probably wouldn't be an issue with systemd, as they seem to expect their daemons to crash regularly and set things up to restart on exit. OpenRC has the (perfectly reasonable) expectation that a daemon will be written to be robust. In this case, SLiM actually is (now) reasonably robust but something (and I strongly suspect it's elogind) is explicitly terminating it. What's strange is I've not seen this before, and I'm fairly sure I've now backed out any changes so the system is in a previously good state.
I've come across a patch from Debian (https://git.devuan.org/devuan/slim/src/branch/suites/unstable/debian/patches/Use-greeter-session.patch) which I thought might help with elogind terminating slim. It appears, in fact, to fix this bug, at least on my test box. If you're still interested, perhaps you could see if it helps for you?
Created attachment 841411 [details, diff] /etc/portage/patches/x11-misc/slim/slim-use-greeter-session.patch (In reply to Robert Pearce from comment #18) > I've come across a patch from Debian > (https://git.devuan.org/devuan/slim/src/branch/suites/unstable/debian/ > patches/Use-greeter-session.patch) which I thought might help with elogind > terminating slim. It appears, in fact, to fix this bug, at least on my test > box. If you're still interested, perhaps you could see if it helps for you? Thank you, Robert! I'm still interested in the fix of this issue. For now I've rebuilt [I] x11-misc/slim (1.3.6-r5@11.12.2022): Simple Login Manager with suggested patch applied as userpatch and goto thinking about tests.
I've tested this patch. Thank you, Robert! It fixes subject of this bug.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33127b6d177f2d123c333c239a4ca13bfafd8124 commit 33127b6d177f2d123c333c239a4ca13bfafd8124 Author: Robert Pearce <gentoo@flitspace.org.uk> AuthorDate: 2023-02-21 08:01:47 +0000 Commit: Viorel Munteanu <ceamac@gentoo.org> CommitDate: 2023-03-14 19:28:15 +0000 x11-misc/slim: Added ebuilds for the resurrected upstream project Fixed issues from pkgcheck List myself as a proxy maintainer Correct several issues pointed out in review by ceamac and added a -9999 ebuild in light of discussion Closes: https://bugs.gentoo.org/832562 Closes: https://bugs.gentoo.org/727544 Closes: https://bugs.gentoo.org/832303 Closes: https://bugs.gentoo.org/580458 Closes: https://bugs.gentoo.org/803476 Closes: https://bugs.gentoo.org/732430 Closes: https://bugs.gentoo.org/756181 Signed-off-by: Robert Pearce <gentoo@flitspace.org.uk> Closes: https://github.com/gentoo/gentoo/pull/29838 Signed-off-by: Viorel Munteanu <ceamac@gentoo.org> x11-misc/slim/Manifest | 2 + x11-misc/slim/files/slim-1.3.9-config.diff | 49 ++++++++++ .../slim/files/slim-1.3.9-greeter-session.diff | 12 +++ x11-misc/slim/files/slim-1.4.0-config.diff | 48 ++++++++++ x11-misc/slim/metadata.xml | 11 ++- x11-misc/slim/slim-1.3.9.ebuild | 98 +++++++++++++++++++ x11-misc/slim/slim-1.4.0.ebuild | 104 +++++++++++++++++++++ x11-misc/slim/slim-9999.ebuild | 104 +++++++++++++++++++++ 8 files changed, 426 insertions(+), 2 deletions(-)