Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 633486 - sys-auth/elogind: if elogind is not started at boot, plasma-nm stops honoring autoconnect parameter
Summary: sys-auth/elogind: if elogind is not started at boot, plasma-nm stops honoring...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Andreas Sturmlechner
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-04 18:33 UTC by Valeriy Malov
Modified: 2018-08-11 16:49 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
My emerge --info (emerge.info,7.03 KB, text/plain)
2017-10-09 12:10 UTC, Valeriy Malov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Valeriy Malov 2017-10-04 18:33:23 UTC
Right now elogind ebuilds advertise two methods of starting elogind: via service and automagically via dbus.

However, starting elogind via dbus seems to disable autoconnect (both on boot and on wake) functionality in kde-plasma/plasma-nm for me. When I log in, elogind starts but applet doesn't make an attempt to connect. If I suspend the session and wake up, applet doesn't reconnect either. Connecting manually via applet afterwards works fine.

elogind versions tried: 234.3, 234.4
NetworkManager versions tried: 1.8.0, 1.8.4

This doesn't happen for me if elogind is placed at boot runlevel
Comment 1 Sven Eden 2017-10-09 11:27:57 UTC
I am using elogind-234.4 with dbus activation for a while now, and plasma-nm works just fine. Bothe after startup and after each suspend-resume cycle.

So I take this as a clue, that we do not have a general problem here.

My system is built up with:

KDE Frameworks 5.38.0
KDE Plasma 5.10.5
QT 5.7.1
NetworkManager 1.8.4
SDDM 0.15.0

Please note, that elogind is only started early enough if a login manager is used that calls PAM, like SDDM is doing.

Otherwise elogind will only start when Plasma has already started up, as it will be the real users login which calls elogind via dbus.

...maybe I should add this to the ebuilds notification...

So, what means do you use to log in? Do you use a login manager?
The easiest way is to have the login manager get started after rebooting the machine, switching to any tty, and to ask loginctl whether it "sees" anything.
Comment 2 Valeriy Malov 2017-10-09 12:10:48 UTC
Created attachment 498198 [details]
My emerge --info

I use sddm 0.15.0 to log in, with pam and elogind enabled

elogind 234.4
NM 1.8.4
Qt 5.7.1
KDE Frameworks 5.37.0
Plasma 5.10.5

loginctl output from tty1 after boot with elogind service disabled and sddm's autologin disabled:

>   SESSION        UID USER             SEAT             TTY             
>        c1        111 sddm             seat0                            
>         2       1000 jazz             seat0            /dev/tty1       
> 
>2 sessions listed.

This seems to be related to Networkmanager starting before elogind, since I have it with xdm on default runlevel, and if I restart Networkmanager after elogind instance popped up, plasma-nm starts to behave normally.
Comment 3 Andreas Sturmlechner gentoo-dev 2017-11-23 23:31:19 UTC
Did you build sys-apps/dbus with or without USE=user-session?
Comment 4 Valeriy Malov 2017-11-24 14:45:41 UTC
(In reply to Andreas Sturmlechner from comment #3)
> Did you build sys-apps/dbus with or without USE=user-session?
No, I have dbus built without user-session

And I don't seem to be able to enable it, because I have bluez installed and it wants:

  >=sys-apps/dbus-1.6:=[user-session=]
  user-session? ( systemd )
  systemd? ( sys-apps/systemd )
Comment 5 Sven Eden 2017-11-27 16:54:12 UTC
I have dbus built without user-session, too.

> This seems to be related to Networkmanager starting before elogind, since I
> have it with xdm on default runlevel, and if I restart Networkmanager after
> elogind instance popped up, plasma-nm starts to behave normally.

This seems to be a good hint. However, I do have Networkmanager started before xdm, too, and it works here. I'll go and try to find out why.

But please have a bit of patience. The systemd crew tagged version 235 a while ago, and I am not yet finished migrating their history to elogind.

However, once that is done, the ebuilds will need some love anyway, and your issue is on top of my list.
Comment 6 Larry the Git Cow gentoo-dev 2018-03-05 22:14:14 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f11e127bf8ed22fbb80778d10ec5e69d8cc98367

commit f11e127bf8ed22fbb80778d10ec5e69d8cc98367
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2018-03-05 20:13:52 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2018-03-05 22:13:39 +0000

    sys-auth/elogind: Drop postinst info about dbus activation
    
    There are several reports that it does not (yet) work flawlessly.
    We can put it back if there is confidence the issue is fixed, but
    then not as ewarn messages anymore.
    
    Bug: https://bugs.gentoo.org/633486
    Package-Manager: Portage-2.3.24, Repoman-2.3.6

 sys-auth/elogind/elogind-235.2-r2.ebuild | 8 --------
 1 file changed, 8 deletions(-)}
Comment 7 Sven Eden 2018-04-27 16:54:25 UTC
> However, starting elogind via dbus seems to disable autoconnect (both on boot and on wake) functionality in kde-plasma/plasma-nm for me. When I log in, elogind starts but applet doesn't make an attempt to connect.

I have just tried this with the new v236.1 release (not in the tree, yet, but available as 236.9999 from seden overlay), and everything works as expected.


sed@sed-notebook ~ $ sudo /etc/init.d/elogind status
 * status: stopped
sed@sed-notebook ~ $ ps xfa | grep elogind
16339 ?        S      0:00 /lib64/elogind/elogind --daemon
23890 pts/0    S+     0:00      \_ grep --color=auto --directories=skip elogind
sed@sed-notebook ~ $ loginctl
   SESSION        UID USER             SEAT             TTY             
         3       1004 sed              seat0                            

1 sessions listed.
ed@sed-notebook ~ $ LC_ALL=C nmcli -p g
=========================
  NetworkManager status
=========================
STATE      CONNECTIVITY  WIFI-HW  WIFI     WWAN-HW  WWAN     
---------------------------------------------------------------------------------------
connected  full          enabled  enabled  enabled  disabled 


I am running plasma-nm, too.
Comment 8 Sven Eden 2018-06-26 08:18:29 UTC
I am afraid I can not reproduce this issue.

For weeks now elogind is started by dbus on my system, and plasma-nm autoconnects just fine.

Tested elogind versions:

235.4, 235.5 (just released), 236.1, 236.2 (just released) and 238.1 (just released).

If nobody can reproduce this any more, I'd consider this to be fixed.
Comment 9 Michael Palimaka (kensington) gentoo-dev 2018-08-10 11:54:13 UTC
Should we restore the dbus postinst message then?
Comment 10 Sven Eden 2018-08-10 13:06:23 UTC
(In reply to Michael Palimaka (kensington) from comment #9)
> Should we restore the dbus postinst message then?

I guess so.
Valeriy had (has?) a problem which can not be reproduced. So either the problem is gone, or the circumstances to trigger the problem aren't met on my system.

Restoring the dbus postinst message might lead more people to try the dbus trigger variant. If there is a bug hidden somewhere, it might help if more people try this out. Maybe someone else stumbles over it.
And if not, we can at least assume that whatever made Valeriy's plasma-nm silent is gone now.
Comment 11 Larry the Git Cow gentoo-dev 2018-08-11 16:44:24 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c93883987ceeb19755ec7f9b75b7e5c07bf95bed

commit c93883987ceeb19755ec7f9b75b7e5c07bf95bed
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2018-08-11 16:41:35 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2018-08-11 16:43:59 +0000

    sys-auth/elogind: Re-add postinst info about dbus activation
    
    This time as elog, not ewarn.
    
    Bug: https://bugs.gentoo.org/633486

 sys-auth/elogind/elogind-238.1.ebuild | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)