Difference between revisions of "Systemd"

From ArchWiki
Jump to: navigation, search
(FAQ: Added a FAQ about rebooting after installing systemd)
(Undo revision 216477 by Cmlr (talk) None of this is correct. systemctl works without systemd running.)
Line 576: Line 576:
Instead of {{ic|Wants}} you might also try {{ic|WantedBy}}, {{ic|Requires}}, {{ic|RequiredBy}}, {{ic|Conflicts}}, {{ic|ConflictedBy}}, {{ic|Before}}, {{ic|After}} for the respective types of dependencies and their inverse.}}
Instead of {{ic|Wants}} you might also try {{ic|WantedBy}}, {{ic|Requires}}, {{ic|RequiredBy}}, {{ic|Conflicts}}, {{ic|ConflictedBy}}, {{ic|Before}}, {{ic|After}} for the respective types of dependencies and their inverse.}}
|question=I installed systemd.  Why won't {{ic|systemctl enable foobar.service}} work?
|answer=Perhaps you didn't reboot, which activates systemd.  You will reboot into a terminal, and you have to reboot again after activating the service for your favorite login manager.}}

Revision as of 00:58, 5 August 2012

zh-CN:Systemd Template:Article summary start Template:Article summary text

Template:Article summary heading Template:Article summary wiki Template:Article summary end

See Lennart's blog story for a longer introduction, the three status updates since then, and the most recent summary. Also see the Wikipedia article and the project web page.



Systemd can be installed side-by-side with the regular Arch Linux initscripts, and they can be toggled by adding/removing the init=/bin/systemd kernel parameter. To try out systemd on Arch you need to:

A pure systemd installation

  1. Install systemd from [core].
  2. Add init=/bin/systemd to the kernel parameters in your bootloader.
  3. Create systemd configuration files.
  4. Reboot and enable services with systemctl enable .... Services replace the daemons from rc.conf.
  5. Use systemd commands such as systemctl poweroff in place of the usual commands.

A mixed systemd installation

  1. Install systemd from [core]
  2. Add init=/bin/systemd to the kernel parameters in your bootloader.
  3. We recommend that you use native systemd configuration files instead of Arch's classic configuration files. If you still want to use /etc/rc.conf as the main configuration file, install the initscripts-systemd package, and follow the instructions in Initscripts emulation below.
  4. The systemd-arch-units package has some extra systemd unit files (services) which you may find useful.
  5. Start services from the old rc.conf/DAEMON array. Systemd will not automatically start services there unless you use initscripts-systemd. See Systemd commands below for commands to list services and start them automatically.

After booting with systemd

  1. (Optional) If you want a pure systemd setup you can remove initscripts and sysvinit, and install systemd-sysvcompat which provides symlinks for init, reboot etc. You can then remove the init= parameter on your kernel cmdline. The reason for doing this step after a reboot is that a system booted with initscripts still needs /etc/inittab to shut down properly.

Supplementary information

Tip: If you have quiet in your kernel parameters, you should remove it for your first couple of systemd boots, to assist with identifying any issues during boot.
Warning: udev and many other pieces of software expect /usr to be mounted and available at bootup. If your /usr is on a separate partition, you will need to make accommodations to mount it from the initramfs and unmount it from a pivoted root on shutdown. See the mkinitcpio wiki page and freedesktop.org#separate-usr-is-broken

Native systemd configuration files

systemd will use /etc/rc.conf if these files are absent (Note this is temporary and not a long-term solution. It is strongly advised to use the systemd configuration files on any system, since initscripts can use them).

Note: You may need to create these files.



Console and keymap

The /etc/vconsole.conf file configures the virtual console, i.e. keyboard mapping and console font.


For more info see: Console fonts


Read man locale.conf for more options

Note: /etc/profile.d/locale.sh from systemd-sysvcompat or initscripts is necessary to be able to set users' locale correctly


Read man 5 timezone for more options

Note: This file does not obviate the need for /etc/localtime.

Hardware clock time

Systemd will use UTC for the hardware clock by default and this is recommended. Dealing with daylight saving time is messy. If the DST changes when your computer is off, your clock will be wrong on next boot (there is a lot more to it). Recent kernels set the system time from the RTC directly on boot without using hwclock, the kernel will always assume that the RTC is in UTC. This means that if the RTC is in local time, the the system time will first be set up wrongly and then corrected shortly afterwards on every boot. This is possibly the reason for certain weird bugs (time going backwards is rarely a good thing).

The reason for allowing the RTC to be in local time is to allow dual boot with Windows (who uses localtime). Windows is able to deal with the RTC being in UTC by setting the following DWORD registry key to 1:

Warning: On recent systems (Windows 7, Vista SP2) this setting prevents Windows from being able to update the system clock at all, and earlier versions do not work correctly when resuming from suspend or hibernate. In addition, recent systems may become unresponsive during Daylight Saving Time (DST) changeover if RealTimeIsUniversal is set.

If you run into issues on dual boot with Windows, you can set the hardware clock to local time. Contrary to popular belief, systemd supports this:

0.0 0.0 0.0
Note: The other parameters are still needed but are ignored by systemd.
Note: It is generally advised to have a Network Time Protocol daemon running to keep the hardware clock synchronized with the system time.

Kernel modules loaded during boot

systemd uses /etc/modules-load.d/ to configure kernel modules to load during boot in a static list. Each configuration file is named in the style of /etc/modules-load.d/<program>.conf. The configuration files should simply contain a list of kernel module names to load, separated by newlines. Empty lines and lines whose first non-whitespace character is # or ; are ignored. Example:

# Load virtio-net.ko at boot

See also Modprobe#Options

Kernel modules blacklist

Module blacklisting works the same way as with initscripts since it is actually handled by kmod, see Module Blacklisting for details.

Temporary files

Systemd-tmpfiles uses the configuration files in /usr/lib/tmpfiles.d/ and /etc/tmpfiles.d/ to describe the creation, cleaning and removal of volatile and temporary files and directories which usually reside in directories such as /run or /tmp. Each configuration file is named in the style of /etc/tmpfiles.d/<program>.conf. This will also override any files in /usr/lib/tmpfiles.d/ with the same name.

tmpfiles are usually provided together with service files to create directories which are expected to exist by certain daemons. For example the Samba daemon expects the directory /var/run/samba to exist and to have the correct permissions. The corresponding tmpfile looks like this:

D /var/run/samba 0755 root root

However, tmpfiles may also be used to write values into certain files on boot. For example, if you use /etc/rc.local to disable wakeup from USB devices with echo USBE > /proc/acpi/wakeup, you may use the following tmpfile instead:

w /proc/acpi/wakeup - - - - USBE

The tmpfiles method is recommended in this case since systemd doesn't actually support /etc/rc.local.

See man tmpfiles.d for details.

Remote filesystem mounts

systemd automatically makes sure that remote filesystem mounts like NFS or Samba are only started after the network has been set up. Therefore remote filesystem mounts specified in /etc/fstab should work out of the box.

You may however want to use Automount for remote filesystem mounts to mount them only when there are being accessed. Furthermore you can use the x-systemd.device-timeout=# option in /etc/fstab to specify a timeout in case the network resource is not available.

See man systemd.mount for details.

Replacing acpid with systemd

Systemd can handle some power-related ACPI events. This is configured via the following options in /etc/systemd/logind.conf:

  • HandlePowerKey : Power off the system when the power button is pressed
  • HandleSleepKey : Suspend the system when the sleep key is pressed
  • HandleLidSwitch : Suspend the system when the laptop lid is closed

Depending on the value of these options, these events may for example only be triggered when no user is logged in (no-session) or when only a single user session is active (any-session). See man logind.conf for details.

These options should not be used on desktop environments like Gnome and XFCE since these handle ACPI events by themselves. However, on systems which run no graphical setup or only a simple window manager like i3 or awesome, this may replace the acpid daemon which is usually used to react to these ACPI events.

Sleep hooks

Systemd does not use pm-utils to put the machine to sleep when using systemctl suspend or systemctl hibernate. Therefore any custom hooks you may have created will not be run. However, systemd provides a similiar mechanism to run custom scripts on these events. Systemd will run all executables in /usr/lib/systemd/system-sleep/ and pass two arguments to it:

  • argument 1: either pre or post, depending on whether the machine is going to sleep or waking up
  • argument 2: either suspend or hibernate

The output of your script will be logged by systemd-suspend.service or systemd-hibernate.service so you can see its output in the journal.

Note that you can also use sleep.target, suspend.target or hibernate.target to hook units into the sleep state logic instead of using scripts.

See man systemd.special and man systemd-sleep for more information.


A unit configuration file encodes information about a service, a socket, a device, a mount point, an automount point, a swap file or partition, a start-up target, a file system path or a timer controlled and supervised by systemd. The syntax is inspired by XDG Desktop Entry Specification .desktop files, which are in turn inspired by Microsoft Windows .ini files. See man systemd.unit for more info.

Systemd commands

  • systemctl: used to introspect and control the state of the systemd system and service manager.
  • systemd-cgls: recursively shows the contents of the selected Linux control group hierarchy in a tree
  • systemadm: a graphical frontend for the systemd system and service manager that allows introspection and control of systemd (avaiable via the systemd-ui-gitAUR package from the AUR).

View the man pages for more details.

Tip: You can use all of the following systemctl commands with the -H <user>@<host> switch to control a systemd instance on a remote machine. This will use SSH to connect to the remote systemd instance.

Analyzing the system state

List running units:

$ systemctl


$ systemctl list-units

List failed units:

$ systemctl --failed

The available unit files can be seen in /usr/lib/systemd/system/ and /etc/systemd/system/ (the latter takes precedence).

Using Units

Units can be services (.service), mount points (.mount) or sockets (.sockets). When using systemctl, you always have to specify the complete name of the unit file, including its suffix, for example netcfg.service. See man systemd.unit for details.

Activate a unit immediately:

# systemctl start <unit>

Deactivate a unit immediately:

# systemctl stop <unit>

Restart a unit:

# systemctl restart <unit>

Ask a unit to reload its configuration:

# systemctl reload <unit>

Show the status of a unit, including whether it is running or not:

$ systemctl status <unit>

Check whether a unit is already enabled or not:

$ systemctl is-enabled <unit>

Enable a unit to be started on bootup:

# systemctl enable <unit>
Note: If services do not have an Install section, it usually means they are called automatically by other services. But if you need to install them manually, use the following command, replacing "foo" with the name of the service.
# ln -s /usr/lib/systemd/system/foo.service /etc/systemd/system/graphical.target.wants/

Disable a unit to not start during bootup:

# systemctl disable <unit>

Show the manual page associated with a unit (this has to be supported by the unit file):

$ systemctl help <unit>

Power Management

If you are in a local user session and no other session is active, the following commands will work without root privileges. If not, systemd will automatically ask you for the root password.

Shut down and reboot the system:

$ systemctl reboot

Shut down and power-off the system:

$ systemctl poweroff

Shut down and halt the system:

$ systemctl halt

Suspend the system:

$ systemctl suspend

Hibernate the system:

$ systemctl hibernate


Runlevels is a legacy concept in systemd. Systemd uses targets which serve a similar purpose as runlevels but act a little different. Each target is named instead of numbered and is intended to serve a specific purpose with the possibility of having multiple ones active at the same time. Some targets are implemented by inheriting all of the services of another target and adding additional services to it. There are systemd targets that mimic the common SystemVinit runlevels so you can still switch targets using the familiar telinit RUNLEVEL command.

Get current runlevel/targets

The following should be used under systemd instead of runlevel:

# systemctl list-units --type=target

Create custom target

The runlevels that are assigned a specific purpose on vanilla Fedora installs; 0, 1, 3, 5, and 6; have a 1:1 mapping with a specific systemd target. Unfortunately, there is no good way to do the same for the user-defined runlevels like 2 and 4. If you make use of those it is suggested that you make a new named systemd target as /etc/systemd/system/<your target> that takes one of the existing runlevels as a base (you can look at /usr/lib/systemd/system/graphical.target as an example), make a directory /etc/systemd/system/<your target>.wants, and then symlink the additional services from /usr/lib/systemd/system/ that you wish to enable.

Targets table

SysV Runlevel Systemd Target Notes
0 runlevel0.target, poweroff.target Halt the system.
1, s, single runlevel1.target, rescue.target Single user mode.
2, 4 runlevel2.target, runlevel4.target, multi-user.target User-defined/Site-specific runlevels. By default, identical to 3.
3 runlevel3.target, multi-user.target Multi-user, non-graphical. Users can usually login via multiple consoles or via the network.
5 runlevel5.target, graphical.target Multi-user, graphical. Usually has all the services of runlevel 3 plus a graphical login.
6 runlevel6.target, reboot.target Reboot
emergency emergency.target Emergency shell

Change current runlevels

In systemd runlevels are exposed via "target units". You can change them like this:

# systemctl isolate graphical.target

This will only change the current runlevel, and has no effect on the next boot. This is equivalent to commands such as telinit 3 or telinit 5 in Sysvinit.

Change default runlevel/target to boot into

The standard target is default.target, which is aliased by default to graphical.target (which roughly corresponds to the old runlevel 5). To change the default target at boot-time, append one of the following kernel parameters to your bootloader:

  • systemd.unit=multi-user.target (which roughly corresponds to the old runlevel 3),
  • systemd.unit=rescue.target (which roughly corresponds to the old runlevel 1).

Alternatively, you may leave the bootloader alone and change default.target. This can be done using systemctl:

# systemctl enable multi-user.target

The effect of this command is outputted by systemctl; a symlink to the new default target is made at /etc/systemd/system/default.target. This works if, and only if:


is in the target's configuration file. Currently, multi-user.target and graphical.target both have it.

Running DEs under systemd

Using display manager

To enable graphical login, run your preferred Display Manager daemon (e.g. KDM). At the moment, service files exist for GDM, KDM, SLiM, XDM and LXDM.

# systemctl enable kdm.service

This should work out of the box. If not, you might have a default.target set manually or from a older install:

# ls -l /etc/systemd/system/default.target
/etc/systemd/system/default.target -> /usr/lib/systemd/system/graphical.target

Simply delete the symlink and systemd will use its stock default.target (i.e. graphical.target).

# rm /etc/systemd/system/default.target

If /etc/locale.conf is used for setting the locale, add an entry to /etc/environment:


Using service file

Note: Using this method there will be no PAM session created for your user. Therefore ConsoleKit (which gives you access to shutdown/reboot, audio devices etc.) will not work properly. For the recommended way, see: Automatic_login_to_virtual_console#With_systemd.

If you are only looking for a simple way to start X directly without a display manager, you can create a service file similar to this:

Description=Direct login to X

ExecStart=/bin/su <username> -l -c "/bin/bash --login -c xinit"


Systemd Journal

Since version 38 systemd has an own logging system, the journal.

By default, running a syslog daemon is no longer required. To read the log, use:

# journalctl

The journal writes to /run/systemd/journal, meaning logs will be lost on reboot. For non-volatile logs, create /var/log/journal/:

# mkdir /var/log/journal/

Filtering output

journalctl allows you to filter the output by specific fields.


Show all messages by a specific executable:

# journalctl /usr/lib/systemd/systemd

Show all messages by a specific process:

# journalctl _PID=1

Show all messages by a specific unit:

# journalctl _SYSTEMD_UNIT=netcfg.service

See man journalctl and systemd.journal-fields for details.

journal size limit

If the journal is made non-volatile, its size limit is set to a default value of 10% of the size of the respective file system. E.g. with /var/log/journal located on a 50GiB root partition this would lead to 5GiB of journal data. The maximum size of the persistent journal can be controlled by SystemMaxUse in /etc/systemd/journald.conf, so to limit it for example to 50MiB uncomment and edit the corresponding line to:


Look at man journald.conf for more info.

Journald in conjunction with a classic syslog daemon

Compatibility with classic syslog implementations is provided via a socket /run/systemd/journal/syslog, to which all messages are forwarded. To make the syslog daemon work with the journal, it has to bind to this socket instead of /dev/log (official announcement). For syslog-ng change /etc/syslog-ng/syslog-ng.conf source section to:

source src {

and enable (or reenable) syslog-ng:

# systemctl enable syslog-ng.service

By default, journald is configured to read from /proc/kmsg, but this will collide with a syslog implementation doing the same (systemd-devel post). Disable reading /proc/kmsg by systemd-journald in /etc/systemd/journald.conf:



Dynamic (DHCP)

If you simply want to use DHCP for your ethernet connection, you can use dhcpcd@.service from the systemd-arch-units package. To enable DHCP for eth0, simply use:

# systemctl start dhcpcd@eth0.service

You can enable the service to automatically start at boot with:

# systemctl enable dhcpcd@.service

Note that this will enable the service for eth0 by default. If you want to use another interface, you have to create the symlink manually, e.g.:

# ln -s '/usr/lib/systemd/system/dhcpcd@.service' '/etc/systemd/system/multi-user.target.wants/dhcpcd@eth1.service'

Other configurations

For static, wireless or advanced network configuration like bridging you can use netcfg or NetworkManager which both provide systemd service files.

If you need a static ethernet configuration, but don't want to use netcfg, there is a custom service file available on the Systemd/Services page.

Note: If using NetworkManager enable NetworkManager-wait-online.service to force units dependent on network.target to wait for a network connection to be completed before starting.

Arch integration

Initscripts emulation

Integration with Arch's classic configuration can be accomplished via the initscripts-systemd package. This is an optional package containing unit files and scripts needed to emulate Arch's initscripts, which can be used to ease the transition from sysVinit to systemd.

Warning: Usage of this package is a temporary solution and is planned for obsolescence. In particular, arch-load-modules.service and arch-daemons.target are unsupported as a long-term solution and will be removed in the future. Whenever possible, use native systemd configuration files instead.

/etc/inittab is not used at all.

/etc/rc.local and /etc/rc.local.shutdown can be run at startup and shutdown by enabling rc-local.service and rc-local-shutdown.service.

Most people will not need all (if any) of these units, and they can be easily disabled with:

# systemctl disable <unitfile>

The plan is to remove most of the functionality from this package as soon as it is handled elsewhere (mostly in udev/systemd/kernel).


Some variables in /etc/rc.conf are respected by this glue work. For a pure systemd setup it is recommended to use the native systemd configuration files which will take precedence over /etc/rc.conf.

Supported variables:

  • DAEMONS: Ordering and blacklisting is respected, if a native systemd service file by the same name as a daemon exists, it will take precedence, this logic can be disabled by systemctl disable arch-daemons.target

Not supported variables and systemd configuration:

  • TIMEZONE: Please symlink /etc/localtime to your zoneinfo file manually.
  • HARDWARECLOCK: See Hardware clock time.
  • USELVM: use lvm.service provided by systemd-arch-units instead.

The following is a brief description of the functionality of each of them. Alternative solutions are provided as a migration plan away from the functionality provided by this package.

rc-local.service / rc-local-shutdown.service

Runs /etc/rc.local (resp., /etc/rc.local.shutdown) on boot (resp., shutdown).


Parses the DAEMONS array in /etc/rc.conf and starts the services. If a native systemd unit exists (by the same name) for a given daemon, this is used; otherwise, the script in /etc/rc.d/ is used to control the unit.

Alternative: use native unit files from the systemd-arch-units package.


Creates a list of modules to be loaded based on /etc/rc.conf (see /etc/modules-load.d/rc.conf).

Alternative: create a *.conf for your modules in /etc/modules-load.d/.

Total conversion to native systemd

Note: This is the preferred method, where the system does not rely on rc.conf centralised configuration anymore, but uses native systemd configuration files.

Follow system configuration as explained in #Native_systemd_configuration_files. Each file replaces one section of /etc/rc.conf as shown in that table:

Configuration Configuration file(s) Legacy /etc/rc.conf section
Hostname /etc/hostname


Console fonts and Keymap /etc/vconsole.conf LOCALIZATION
Locale /etc/locale.conf


Timezone /etc/timezone


Hardware clock /etc/adjtime LOCALIZATION
Kernel modules /etc/modules-load.d/ HARDWARE

For legacy purposes, the DAEMONS section in /etc/rc.conf is still compatible with systemd and can be used to start services at boot, even with a "pure" systemd service management. Alternatively, you may remove the /etc/rc.conf file entirely and enable services in systemd. For each <service_name> in the DAEMONS array in /etc/rc.conf, type:

# systemctl enable <service_name>.service

If <service_name>.service does not exist:

  • the service file may not be available for systemd. In that case, you'll need to keep rc.conf to start the service during boot up.
  • systemd may name services differently, e.g. cronie.service replaces crond init daemon; alsa-store.service and alsa-restore.service replace the alsa init daemon. Another important instance is the network daemon, which is replaced with another set of service files (see #Network for more details.)
Tip: you may look inside a package that contains daemon start scripts for service names. For instance:
# pacman -Ql cronie
cronie /etc/rc.d/crond                            #<-- daemon initscript listed in the DAEMONS array (unused in a "pure" systemd configuration)
cronie /usr/lib/systemd/system/cronie.service     #<-- corresponding systemd daemon service
  • systemd will automatically handle the start order of these daemons.
  • some services do not need to be explicitely enabled by the user. For instance, dbus.service will automatically be enabled when dbus-core is installed. Check the list of available services and their state using the systemctl command.


For an up-to-date list of known issues, look at the upstream TODO.



Template:FAQ Template:FAQ








Systemd provides a tool called systemd-analyze that allows you to analyze your boot process so you can see which unit files are causing your boot process to slow down. You can then optimize your system accordingly. You have to install python-dbus and python-cairo to use it.

To see how much time was spent in kernel-/userspace on boot, simply use:

Tip: If you add the timestamp hook to your HOOKS array in /etc/mkinitcpio.conf and rebuild your initramfs, systemd-analyze will also be able to show you how much time was spent in the initramfs.

To list the started unit files, sorted by the time each of them took to start up:

systemd-analyze blame

You can also create a SVG file which describes your boot process grapically, similiar to Bootchart:

systemd-analyze plot > plot.svg

Enabling bootchart in conjunction with systemd

You can use a version of bootchart to visualize the boot sequence. Since you are not able to put a second init into the kernel cmdline you won't be able to use any of the standard bootchart setups. However the bootchart2AUR package from AUR comes with an undocumented systemd service. After you've installed bootchart2 do:

# systemctl enable bootchart.service

Read the bootchart documentation for further details on using this version of bootchart.

Shell Shortcuts

Systemd daemon management requires a bit more text entry to accomplish tasks such as start, stopped, enabling, checking status, etc. The following functions can be added one's ~/.bashrc to help streamline interactions with systemd and to improve the overall experience.

if ! systemd-notify --booted; then # not using systemd
  start() {
    sudo rc.d start $1

  restart() {
    sudo rc.d restart $1

  stop() {
    sudo rc.d stop $1
  start() {
    sudo systemctl start $1.service

  restart() {
    sudo systemctl restart $1.service

  stop() {
    sudo systemctl stop $1.service

  enable() {
    sudo systemctl enable $1.service

  status() {
    sudo systemctl status $1.service

  disable() {
    sudo systemctl disable $1.service

Less output

Change verbose to quiet on the kernel line in GRUB. For some systems, particularly those with an SSD, the slow performance of the TTY is actually a bottleneck, and so less output means faster booting.

Early start

One central feature of systemd is dbus and socket activation, this causes services to be started when they are first accessed, and is generally a good thing. However, if you know that a service (like console-kit) will always be started during boot, then the overall boot time might be reduced by starting it as early as possible. This can be achieved (if the service file is set up for it, which in most cases it is) by issuing:

# systemctl enable console-kit-daemon.service

This will cause systemd to start console-kit as soon as possible, without causing races with the socket or dbus activation.


The default setup will fsck and mount all filesystems before starting most daemons and services. If you have a large /home partition, it might be better to allow services that do not depend on /home to start while /home is being fsck'ed. This can be achieved by adding the following options to the fstab entry of your /home partition:


This will fsck and mount /home when it is first accessed, and the kernel will buffer all file access to /home until it is ready.

If you have encrypted filesystems with keyfiles, you can also add the noauto parameter to the corresponding entries in /etc/crypttab. systemd will then not open the encrypted device on boot, but instead wait until it is actually accessed and then automatically open it with the specified keyfile before mounting it. This might save a few seconds on boot if you are using an encrypted RAID device for example, because systemd doesn't have to wait for the device to become available. For example:

data /dev/md0 /root/key noauto


systemd comes with its own readahead implementation, this should in principle improve boot time. However, depending on your kernel version and the type of your hard drive, your mileage may vary (i.e. it might be slower). To enable, do:

# systemctl enable systemd-readahead-collect.service systemd-readahead-replay.service

Remember that in order for the readahead to work its magic, you should reboot a couple of times.

User sessions

systemd can divide user sessions into cgroups. Add session optional pam_systemd.so to your relevant /etc/pam.d/ files (e.g., login for tty logins, sshd for remote access, kde for password kdm logins, kde-np for automatic kdm logins).


$ systemd-cgls systemd:/system/getty@.service
├ tty5
│ └ 904 /sbin/agetty tty5 38400
├ tty2
│ ├ 13312 /bin/login --
│ └ 15765 -zsh


$ systemd-cgls systemd:/user/example/
├ 4
│ ├   902 /bin/login --
│ └ 16016 -zsh

Further, you can replace ConsoleKit's functionality with systemd. To do this, polkit needs to be rebuilt from ABS with systemd enabled (--enable-systemd), and stuff like USB automounting will work without consolekit. DBus supports systemd since version 1.6.0, so there's no longer need to build it from Git.


Shutdown/Reboot takes terribly long

If the shutdown process takes a very long time (or seems to freeze) most likely a service not exiting is to blame. systemd waits some time for each service to exit before trying to kill it. To find out if you are affected see this article.

SLiM and xfce-session

One setup that can produce a shutdown freeze is Xfce in conjunction with SLiM: Shutting down/rebooting using xfce-session will cause slim.service to hang for half a minute until systemd kills it the hard way. One workaround is to create a modified slim.service:

Description=SLiM Simple Login Manager

ExecStart=/usr/bin/slim -d
ExecStop=/bin/kill -9 $MAINPID
ExecStopPost=/bin/rm /var/lock/slim.lock


This causes SLiM to be terminated using SIGKILL. Since the lock file is also removed this does not cause a problem.

If the CUPS service isn't starting on demand

I found on my machine, even after running "systemctl enable cups.service", cups would never work until I manually issued "systemctl start cups.service". To remedy this you can manually symlink the cups service so its automatically started at boot:
# sudo ln -s '/usr/lib/systemd/system/cups.service' '/etc/systemd/system/multi-user.target.wants/cups.service'

See also