You are not logged in.

#1 2012-06-01 13:36:18

Mic92
Member
From: Germany
Registered: 2009-07-05
Posts: 21
Website

How to replace Consolekit with systemd-loginctl

Is systemd's new multiseat ready to replace consolekit?
And if, how can I achieve that?

My Background:

- I use systemd as my init system
- login into a getty
- which create a new X session with startx through a login script

I have had a hard time before I had the right setup to supervise everything with *ck-launch-session* and  *dbus-launch* (order matters).

And sometimes without a reason, something breaks and I'm not allowed to mount USB drives or shutdown as a user without a reboot.

Last edited by Mic92 (2012-06-01 13:36:59)

Offline

#2 2012-06-18 14:55:43

Alucryd
Developer
From: France
Registered: 2011-05-07
Posts: 110
Website

Re: How to replace Consolekit with systemd-loginctl

I'd like to know that too, fedora seems to have patched some components for this to works, not sure those patches have been merged upstream yet: http://fedoraproject.org/wiki/Features/ckremoval. console-kit-daemon.service is slow as hell on my system (25s on a hdd based install, don't know about my ssd install, will check later) as well accounts-daemon.service.

Last edited by Alucryd (2012-06-18 14:58:53)


The bird of Hermes is my name, eating my wings to make me tame.

Offline

#3 2012-06-18 15:43:14

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: How to replace Consolekit with systemd-loginctl

I'm following this too.

Offline

#4 2012-06-18 16:30:43

Alucryd
Developer
From: France
Registered: 2011-05-07
Posts: 110
Website

Re: How to replace Consolekit with systemd-loginctl

Ok tried on my ssd install, here's what I get:

systemd-analyze
Startup finished in 295ms (kernel) + 853ms (initramfs) + 621ms (userspace) = 1770ms
systemd-analyze blame
 24998ms console-kit-daemon.service
 24468ms accounts-daemon.service
   348ms psd.service
   265ms mnt-Data.mount
   133ms asd.service
   125ms ufw.service
   102ms NetworkManager.service
    48ms systemd-logind.service
    37ms systemd-vconsole-setup.service
    32ms systemd-udev-trigger.service
    28ms systemd-tmpfiles-setup.service
    23ms colord-sane.service
    20ms console-kit-log-system-start.service
    18ms udisks2.service
    18ms dev-hugepages.mount
    17ms systemd-remount-fs.service
    17ms dev-mqueue.mount
    16ms systemd-udev.service
    16ms sys-kernel-debug.mount
    13ms upower.service
     8ms colord.service
     8ms bluetooth.service
     7ms systemd-sysctl.service
     5ms systemd-user-sessions.service
     2ms boot.mount
     2ms tmp.mount
     1ms rtkit-daemon.service
     0ms sys-fs-fuse-connections.mount

There has to be a problem, I don't think it was this slow before. I hope switching to loginctl will correct that.


The bird of Hermes is my name, eating my wings to make me tame.

Offline

#5 2012-06-18 19:20:07

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: How to replace Consolekit with systemd-loginctl

= 1770ms

Seems that Poettering has embellished the figures. I mean, the developer could assign any algorithm to the boot up process. I've seen the same almost.

Offline

#6 2012-06-18 19:49:32

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: How to replace Consolekit with systemd-loginctl

25 seconds sounds like way too much. Currently most of our software needs consolekit, as the patches that are floating about would replace CK with sd, rather than making it selectable on runtime (hence we can't add this to our packages).

Offline

#7 2012-06-18 22:43:46

Alucryd
Developer
From: France
Registered: 2011-05-07
Posts: 110
Website

Re: How to replace Consolekit with systemd-loginctl

@swanson: got down to 1.6s using readahead, shame I have to wait those 25s to actually use my desktop.
@tomegun: This will have to be a complete migration then, hope it'll land in testing soon enough

I can confirm it wasn't like this some time ago, and I can reproduce it on two totally different systems, one old and one fresh, running both repo and ck kernels. Haven't seen anybody complaining about the same issue yet, I'll wait a bit before submitting a bug report.


The bird of Hermes is my name, eating my wings to make me tame.

Offline

#8 2012-06-19 09:25:30

Alucryd
Developer
From: France
Registered: 2011-05-07
Posts: 110
Website

Re: How to replace Consolekit with systemd-loginctl

Ok problem solved, enabling console-kit-daemon.service takes it down to 5s on my HDD, seems like autodetection was the culprit.

5074ms console-kit-daemon.service

The bird of Hermes is my name, eating my wings to make me tame.

Offline

#9 2012-09-01 07:38:11

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: How to replace Consolekit with systemd-loginctl

That still seems like way too much. Console-kit-daemon.service starts here in about 50ms, and my laptop is anything but powerful. You might perhaps want to have a look at the bootchart created by systemd-analyze plot > bootchart.svg.

Edit: More on topic: I've managed to get rid of consolekit once, by recompiling (IIRC) polkit, gdm, gnome-session, and dbus (rebuilding dbus is not necessary anymore). I don't have any notes on the topic, though, and I can't quite remember why I went back to a consolekit setup, but I'd bet a buck fifty it was because of the hassle of having to recompile everything whenever an update hits the repos.

$ pacman -Qi consolekit | grep 'Required by'
Required by: gdm gnome-session

So it seems these are the packages that need to be rebuilt on my system.

Last edited by Runiq (2012-09-01 08:48:18)

Offline

#10 2012-09-05 07:31:17

Alucryd
Developer
From: France
Registered: 2011-05-07
Posts: 110
Website

Re: How to replace Consolekit with systemd-loginctl

@runiq: Start in 2.5s on another machine (HDD), again too much, but still it's started by the time firewalld.service and dhcpcd@eth0.service are done (which both start along with console-kit) so even if console-kit were to start faster, it wouldn't improve my boot time.

Getting rid of console-kit seems much of a hassle indeed, I guess I can live with it for now.


The bird of Hermes is my name, eating my wings to make me tame.

Offline

#11 2012-09-05 15:45:22

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: How to replace Consolekit with systemd-loginctl

Alucryd wrote:

@runiq: Start in 2.5s on another machine (HDD), again too much, but still it's started by the time firewalld.service and dhcpcd@eth0.service are done (which both start along with console-kit) so even if console-kit were to start faster, it wouldn't improve my boot time.

Okay, that's true.

Getting rid of console-kit seems much of a hassle indeed, I guess I can live with it for now.

It's actually not much of a hassle. The only package you'd have to recompile is polkit, which doesn't take very long. You can then pacman -Rd consolekit and everything should work fine. I've also rebuilt gdm and gnome-session, though, because they complained about a missing dependency on consolekit on every pacman -Syu operation.

Edit: I wrote polkitd when I meant polkit. I'm a moron.

Last edited by Runiq (2012-09-05 18:41:56)

Offline

#12 2012-09-05 16:03:37

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: How to replace Consolekit with systemd-loginctl

^ I don't even have polkitd, so can I just remove consolekit then and enable systemd-loginctl? I do have polkit

Hm, consolekit isn't even required by anything. I guess this means it's a matter or recompiling polkit and enabling systemd-loginctl?

Last edited by Unia (2012-09-05 16:10:37)


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#13 2012-09-05 16:23:51

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: How to replace Consolekit with systemd-loginctl

I'm in the same position of Runiq: i recompiled polkit, pacman -Rdd consolekit. And everything works.
I only enabled polkitd.service, but it's because it get started anyway, so i start it as soon as possible (as wiki says about consolekit-daemon.service).
And, as far as i know, systemd-loginctl is static (and its name is systemd-logind.service) .

Offline

#14 2012-09-05 18:43:22

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: How to replace Consolekit with systemd-loginctl

Unia wrote:

^ I don't even have polkitd, so can I just remove consolekit then and enable systemd-loginctl? I do have polkit

Whoops, sorry. Yeah, I meant polkit. Fixed my previous post accordingly.

Offline

#15 2012-09-05 19:10:38

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: How to replace Consolekit with systemd-loginctl

I just installed tomegun's polkit (https://dev.archlinux.org/~tomegun/) and removed consolekit. Now all that's left is to enable systemd-logind.service but when I do so, I get

┌─[jente @ lappy Downloads] 21:06:25 
└─■ enable systemd-logind.service
The unit files have no [Install] section. They are not meant to be enabled using systemctl.

Is it a good idea to enable it manually (as per the wiki: https://wiki.archlinux.org/index.php/Sy … ing_Units) or should I use another method?


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#16 2012-09-05 19:13:52

progandy
Member
Registered: 2012-05-17
Posts: 5,322

Re: How to replace Consolekit with systemd-loginctl

Unia wrote:

Is it a good idea to enable it manually (as per the wiki: https://wiki.archlinux.org/index.php/Sy … ing_Units) or should I use another method?

It should be a static unit without any need to enable it. If the following find command has the same output you are set.

$ find /usr/lib/systemd/ -name '*logind*'
/usr/lib/systemd/system/multi-user.target.wants/systemd-logind.service
/usr/lib/systemd/system/systemd-logind.service
/usr/lib/systemd/systemd-logind

Last edited by progandy (2012-09-05 19:15:03)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#17 2012-09-05 19:15:39

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: How to replace Consolekit with systemd-loginctl

Unia wrote:

I just installed tomegun's polkit (https://dev.archlinux.org/~tomegun/) and removed consolekit. Now all that's left is to enable systemd-logind.service but when I do so, I get

┌─[jente @ lappy Downloads] 21:06:25 
└─■ enable systemd-logind.service
The unit files have no [Install] section. They are not meant to be enabled using systemctl.

Is it a good idea to enable it manually (as per the wiki: https://wiki.archlinux.org/index.php/Sy … ing_Units) or should I use another method?

It runs always. You don't have to enable it.

Offline

#18 2012-09-05 19:24:01

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: How to replace Consolekit with systemd-loginctl

I rebooted and indeed it's running, but I have no automounting (through Udiskie) anymore.

Why?

(I know I can create this, but I'm just curious why it doesn't work anymore.


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#19 2012-09-05 19:40:24

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: How to replace Consolekit with systemd-loginctl

I'm using udisks2 with the polkit localauthority you linked, and everything works. (i'm not using tomegun's consolekit, but repo's one recompiled from abs).

Offline

#20 2012-09-05 19:43:42

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: How to replace Consolekit with systemd-loginctl

But why do I need it now, when I didn't with Consolekit?

Isn't systemd-logind a replacement for it?


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#21 2012-09-05 19:44:01

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: How to replace Consolekit with systemd-loginctl

How do you currently start udiskie? Do you have an active session (check with loginctl)?

Edit: I'm using my own mount script which uses UDisks (1) as backend, and that works fine; I don't think UDisks is the culprit.

Last edited by Runiq (2012-09-05 19:46:40)

Offline

#22 2012-09-05 19:49:28

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: How to replace Consolekit with systemd-loginctl

I do have a session:

┌─[jente @ lappy ~] 21:48:14 
└─■ loginctl
   SESSION        UID USER             SEAT            
         1       1000 jente            seat0           

1 sessions listed.

I start Udiskie through .xinitrc, like so:

if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
    eval `dbus-launch --sh-syntax --exit-with-session`
fi

...

exec bash -c "udiskie & $HOME/.bin/dwm_start"

With .bin/dwm_start:

#!/bin/bash
while true; do
    dwm >/dev/null 2>&1
done

EDIT: Here's udiskie's output when I plug in my external HD:

attempting to mount device /org/freedesktop/UDisks/devices/sdb2 (ext4:[])
failed to mount device /org/freedesktop/UDisks/devices/sdb2: org.freedesktop.UDisks.Error.PermissionDenied: Not Authorized
attempting to mount device /org/freedesktop/UDisks/devices/sdb1 (ntfs:[])
failed to mount device /org/freedesktop/UDisks/devices/sdb1: org.freedesktop.UDisks.Error.PermissionDenied: Not Authorized

EDIT2:
Changing my .xinitrc to the following didn't help either:

udiskie &
exec $HOME/.bin/dwm_start

Also, I found out I have to enter my root password to shutdown/reboot, whereas I didn't have to before.

Last edited by Unia (2012-09-05 19:55:23)


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#23 2012-09-05 20:40:45

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: How to replace Consolekit with systemd-loginctl

@Unia, try to recompile polkit with abs, from extra repo (0.105) and not to use tomegun's one .
Remember to add "--enable-systemd" to the config in pkgbuild. It takes 2 mins and , if i remember correctly, i had this kind of issue too with tomegun's one, but they disappeared with mine.

Offline

#24 2012-09-05 20:52:20

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: How to replace Consolekit with systemd-loginctl

No dice..


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#25 2012-09-06 07:35:04

Alucryd
Developer
From: France
Registered: 2011-05-07
Posts: 110
Website

Re: How to replace Consolekit with systemd-loginctl

@Runiq: Okay rebuilt polkit, gdm and gnome-session and everything works fine, thx! Hope there won't be too many updates on those packages. Firewalld and dhcpcd still take too much time, but there's not much I can do about that.


The bird of Hermes is my name, eating my wings to make me tame.

Offline

Board footer

Powered by FluxBB