You are not logged in.

#1126 2012-02-03 09:40:43

Agamemnon
Member
From: France
Registered: 2011-05-05
Posts: 42

Re: systemd: Yet Another Init Replacement

Hi all!
I have an issue with shutdown and reboot with one of my computers.
I can't poweroff nor reboot... I only have a blincking cursor in text mode and nothing else. I can't use tty.
It seems that the shutdown script isn't read but I don't know why...
This computer is an intel core i7 (I'm using the sandybridge gpu) with Gnome3.2, systemd and e4rat.
Can you help me?

Here is my systemctl output:

UNIT                      LOAD   ACTIVE SUB       JOB DESCRIPTION
home.automount            loaded active running       home.automount
proc-sys...misc.automount loaded active running       Arbitrary Executable File
sys-devi...et-eth0.device loaded active plugged       82579V Gigabit Network Con
sys-devi...d-card0.device loaded active plugged       6 Series/C200 Series Chips
sys-devi...t-wlan0.device loaded active plugged       RT2561/RT61 802.11g PCI
sys-devi...th-hci0.device loaded active plugged       /sys/devices/pci0000:00/00
sys-devi...da-sda1.device loaded active plugged       MAXTOR_STM3250824AS
sys-devi...da-sda2.device loaded active plugged       MAXTOR_STM3250824AS
sys-devi...da-sda3.device loaded active plugged       MAXTOR_STM3250824AS
sys-devi...ock-sda.device loaded active plugged       MAXTOR_STM3250824AS
sys-devi...ock-sr0.device loaded active plugged       TSSTcorp_CDDVDW_SH-222AL
home.automount            loaded active running       home.automount
proc-sys...misc.automount loaded active running       Arbitrary Executable File
sys-devi...et-eth0.device loaded active plugged       82579V Gigabit Network Con
sys-devi...d-card0.device loaded active plugged       6 Series/C200 Series Chips
sys-devi...t-wlan0.device loaded active plugged       RT2561/RT61 802.11g PCI
sys-devi...th-hci0.device loaded active plugged       /sys/devices/pci0000:00/00
sys-devi...da-sda1.device loaded active plugged       MAXTOR_STM3250824AS
sys-devi...da-sda2.device loaded active plugged       MAXTOR_STM3250824AS
sys-devi...da-sda3.device loaded active plugged       MAXTOR_STM3250824AS
sys-devi...ock-sda.device loaded active plugged       MAXTOR_STM3250824AS
sys-devi...ock-sr0.device loaded active plugged       TSSTcorp_CDDVDW_SH-222AL
sys-devi...y-ttyS0.device loaded active plugged       /sys/devices/platform/seri
sys-devi...y-ttyS1.device loaded active plugged       /sys/devices/platform/seri
sys-devi...y-ttyS2.device loaded active plugged       /sys/devices/platform/seri
sys-devi...y-ttyS3.device loaded active plugged       /sys/devices/platform/seri
sys-devi...ty-tty0.device loaded active plugged       /sys/devices/virtual/tty/t
sys-devi...ty-tty1.device loaded active plugged       /sys/devices/virtual/tty/t
sys-devi...y-tty10.device loaded active plugged       /sys/devices/virtual/tty/t
sys-devi...y-tty11.device loaded active plugged       /sys/devices/virtual/tty/t
sys-devi...y-tty12.device loaded active plugged       /sys/devices/virtual/tty/t
sys-devi...ty-tty2.device loaded active plugged       /sys/devices/virtual/tty/t
sys-devi...ty-tty3.device loaded active plugged       /sys/devices/virtual/tty/t
sys-devi...ty-tty4.device loaded active plugged       /sys/devices/virtual/tty/t
sys-devi...ty-tty5.device loaded active plugged       /sys/devices/virtual/tty/t
sys-devi...ty-tty6.device loaded active plugged       /sys/devices/virtual/tty/t
sys-devi...ty-tty7.device loaded active plugged       /sys/devices/virtual/tty/t
sys-devi...ty-tty8.device loaded active plugged       /sys/devices/virtual/tty/t
sys-devi...ty-tty9.device loaded active plugged       /sys/devices/virtual/tty/t
sys-module-fuse.device    loaded active plugged       /sys/module/fuse
-.mount                   loaded active mounted       /
dev-hugepages.mount       loaded active mounted       Huge Pages File System
dev-mqueue.mount          loaded active mounted       POSIX Message Queue File S
home-alex-.gvfs.mount     loaded active mounted       /home/alex/.gvfs
home.mount                loaded active mounted       /home
media.mount               loaded active mounted       Media Directory
proc-sys...fmt_misc.mount loaded active mounted       Arbitrary Executable File
sys-fs-f...nections.mount loaded active mounted       FUSE Control File System
sys-kernel-debug.mount    loaded active mounted       Debug File System
sys-kernel-security.mount loaded active mounted       Security File System
tmp.mount                 loaded active mounted       /tmp
systemd-...d-console.path loaded active waiting       Dispatch Password Requests
systemd-...word-wall.path loaded active waiting       Forward Password Requests
accounts-daemon.service   loaded active running       Accounts Service
avahi-daemon.service      loaded active running       Avahi mDNS/DNS-SD Stack
bluetooth.service         loaded active running       Bluetooth Manager
console-...daemon.service loaded active running       Console Manager
console-...-start.service loaded active exited        Console System Startup Log
cronie.service            loaded active running       Periodic Command Scheduler
cups.service              loaded active running       CUPS Printing Service
dbus.service              loaded active running       D-Bus System Message Bus
gdm.service               loaded active running       Gnome Display Manager
getty@tty1.service        loaded active running       Getty on tty1
lm_sensors.service        loaded active exited        Initialize hardware monito
NetworkManager.service    loaded active running       Network Manager
ntpd.service              loaded active running       Network Time Service
rc-local.service          loaded active exited        /etc/rc.local Compatibilit
remount-rootfs.service    loaded active exited        Remount Root FS
rtkit-daemon.service      loaded active running       RealtimeKit Scheduling Pol
sshdgenkeys.service       loaded active exited        SSH Key Generation
syslog-ng.service         loaded active running       System Logger Daemon
systemd-logind.service    loaded active running       Login Service
systemd-...s-load.service loaded active exited        Load Kernel Modules
systemd-...pi-vfs.service loaded active exited        Remount API VFS
systemd-...bridge.service loaded active running       STDOUT Syslog Bridge
systemd-sysctl.service    loaded active exited        Apply Kernel Variables
systemd-...-setup.service loaded active exited        Recreate Volatile Files an
systemd-...ssions.service loaded active exited        Permit User Sessions
systemd-...-setup.service loaded active exited        Setup Virtual Console
udev-trigger.service      loaded active exited        udev Coldplug all Devices
udev.service              loaded active running       udev Kernel Device Manager
avahi-daemon.socket       loaded active listening     Avahi mDNS/DNS-SD Stack Ac
dbus.socket               loaded active running       D-Bus System Message Bus S
sshd.socket               loaded active listening     sshd.socket
syslog.socket             loaded active running       Syslog Socket
systemd-initctl.socket    loaded active listening     /dev/initctl Compatibility
systemd-shutdownd.socket  loaded active listening     Delayed Shutdown Socket
systemd-...-bridge.socket loaded active running       Stdio Syslog Bridge Socket
udev-control.socket       loaded active listening     udev Control Socket
udev-kernel.socket        loaded active running       udev Kernel Socket
dev-sda2.swap             loaded active active        /dev/sda2
basic.target              loaded active active        Basic System
bluetooth.target          loaded active active        Bluetooth
cryptsetup.target         loaded active active        Encrypted Volumes
getty.target              loaded active active        Login Prompts
graphical.target          loaded active active        Graphical Interface
local-fs-pre.target       loaded active active        Local File Systems (Pre)
local-fs.target           loaded active active        Local File Systems
multi-user.target         loaded active active        Multi-User
network.target            loaded active active        Network
remote-fs.target          loaded active active        Remote File Systems
sockets.target            loaded active active        Sockets
sound.target              loaded active active        Sound Card
swap.target               loaded active active        Swap
sysinit.target            loaded active active        System Initialization
syslog.target             loaded active active        Syslog
systemd-...es-clean.timer loaded active waiting       Daily Cleanup of Temporary


Pc: Intel core i7, 8Gb RAM, Archlinux 64bits, Gnome 3
Laptop 1: Intel Core2Duo, 4Gb RAM, Archlinux 64bits, Gnome 3
Laptop 2: Intel P4 HT, 512Mb RAM, Archlinux 32 bits, Gnome 3 too

Offline

#1127 2012-02-03 12:12:19

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,403
Website

Re: systemd: Yet Another Init Replacement

That's a little ambiguous. How are you shutting down?

shutdown -h -P now

Or

systemctl poweroff

Or

dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop

Or

SysRq+R+E+I+S+U+O

Or something else?


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Online

#1128 2012-02-03 15:07:32

Agamemnon
Member
From: France
Registered: 2011-05-05
Posts: 42

Re: systemd: Yet Another Init Replacement

Mmmh.. I use the top-right-menu of gnome-shell... So, maybe "shutdown -h -P now"... I'm not very sure of what command it uses...
But, I've tested all these commands in a terminal and nothing work. I have still the blicking white cursor and nothing else.


Pc: Intel core i7, 8Gb RAM, Archlinux 64bits, Gnome 3
Laptop 1: Intel Core2Duo, 4Gb RAM, Archlinux 64bits, Gnome 3
Laptop 2: Intel P4 HT, 512Mb RAM, Archlinux 32 bits, Gnome 3 too

Offline

#1129 2012-02-03 17:42:43

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: systemd: Yet Another Init Replacement

hi,
I've been running systemd for a few days now on my laptop and it works fine so far.
I'm now trying it on my server, but I've already run into the first problem.

I have an encrypted RAID5 with 4x2TB drives in my system. This is supposed to be mounted automatically with a keyfile on boot which is on the root device (which is encrypted as well of course). This worked fine with initscripts.

/etc/crypttab

daten /dev/md0 /root/key

/etc/fstab

/dev/mapper/daten /media/Daten ext4 noexec,defaults 0 1

So basically /dev/md0 is opened with the keyfile /root/key to /dev/mapper/daten, which is then mounted to /media/Daten.

Unfortunately systemd doesn't seem to like this. After I entered my passphrase for the root device and systemd starts, the following message appears after a few seconds and I'm dropped to an emergency shell:

systemd-cryptsetup[362]: crypt_init() failed: Block device required

The strange thing is, when I simply drop out of the emergeny shell, the system boots fine and /media/Daten is mounted.
So I assume systemd tries to decrypt /dev/md0 before it is actually available and therefore fails, but for some reason tries again automatically after I drop out of the emergency shell.

dmesg | grep systemd

[    0.000000] Command line: root=/dev/mapper/lvmus-root cryptdevice=/dev/sda2:muscrypt ro quiet video=1920x1080 init=/bin/systemd initrd=../initramfs-linux.img BOOT_IMAGE=../vmlinuz-linux 
[    0.000000] Kernel command line: root=/dev/mapper/lvmus-root cryptdevice=/dev/sda2:muscrypt ro quiet video=1920x1080 init=/bin/systemd initrd=../initramfs-linux.img BOOT_IMAGE=../vmlinuz-linux 
[   10.740809] systemd[1]: systemd 37 running in system mode. (+PAM -LIBWRAP -AUDIT -SELINUX +SYSVINIT +LIBCRYPTSETUP; arch)
[   11.122510] systemd[1]: Set hostname to <mus>.
[   11.485252] systemd[1]: [/lib/systemd/system/udev-control.socket:10] Unknown lvalue 'PassCredentials' in section 'Socket'. Ignoring.
[   11.586867] systemd[1]: [/lib/systemd/system/udev-kernel.socket:10] Unknown lvalue 'PassCredentials' in section 'Socket'. Ignoring.
[   13.755122] systemd-fsck[231]: /dev/mapper/lvmus-root: sauber, 157573/640848 Dateien, 1584416/2560000 Bl\xffffffc3\xffffffb6\xffffffb6cke
[   14.908338] systemd-fsck[315]: /dev/mapper/lvmus-home: sauber, 31134/18817024 Dateien, 6802720/75265024 Bl\xffffffc3\xffffffb6\xffffffb6cke
[   15.700595] systemd-cryptsetup[362]: crypt_init() failed: Block device required
[   15.700792] systemd[1]: cryptsetup@daten.service: main process exited, code=exited, status=1
[   15.754055] systemd[1]: Job cryptsetup.target/start failed with result 'dependency'.
[   15.754061] systemd[1]: Job local-fs.target/start failed with result 'dependency'.
[   15.754064] systemd[1]: Triggering OnFailure= dependencies of local-fs.target.
[   15.754170] systemd[1]: Job boot.mount/start failed with result 'dependency'.
[   15.754175] systemd[1]: Job fsck@dev-sda1.service/start failed with result 'dependency'.
[   15.754335] systemd[1]: Job media-Daten.mount/start failed with result 'dependency'.
[   15.754340] systemd[1]: Job dev-mapper-daten.device/start failed with result 'dependency'.
[   15.754343] systemd[1]: Unit cryptsetup@daten.service entered failed state.
[   16.520750] systemd[1]: Startup finished in 10s 753ms 964us (kernel) + 5s 379ms 489us (userspace) = 16s 133ms 453us.
[   19.550919] systemd-fsck[409]: Root directory is writable, skipping check.
[   19.718974] systemd-cryptsetup[421]: Set cipher aes, mode cbc-essiv:sha256, key size 256 bits for device /dev/md0.
[   19.818748] systemd-fsck[418]: /dev/sda1: sauber, 25/60240 Dateien, 31799/240940 Bl\xffffffc3\xffffffb6\xffffffb6cke
[   22.043929] systemd-fsck[542]: Daten: sauber, 114305/366288896 Dateien, 1177231103/1465132288 Bl\xffffffc3\xffffffb6\xffffffb6cke
[   22.676462] systemd-tmpfiles[558]: Two or more conflicting lines for /tmp configured, ignoring.
[   25.229865] systemd-logind[591]: New seat seat0.
[   27.875891] dbus[661]: [system] Activating via systemd: service name='org.freedesktop.Accounts' unit='accounts-daemon.service'
[   27.875908] dbus-daemon[661]: dbus[661]: [system] Activating via systemd: service name='org.freedesktop.Accounts' unit='accounts-daemon.service'
[   28.490691] systemd-logind[591]: New user root logged in.
[   28.490800] systemd-logind[591]: New session c1 of user root.
[   28.573736] systemd-logind[591]: Linked /tmp/.X11-unix/X0 to /run/user/root/X11/display.
[   28.575418] dbus[661]: [system] Activating via systemd: service name='org.freedesktop.ConsoleKit' unit='console-kit-daemon.service'
[   28.575445] dbus-daemon[661]: dbus[661]: [system] Activating via systemd: service name='org.freedesktop.ConsoleKit' unit='console-kit-daemon.service'
[   36.134223] systemd-logind[591]: Removed session c1.
[   37.057136] systemd-logind[591]: New user mus logged in.
[   37.057220] systemd-logind[591]: New session c2 of user mus.
[   37.070204] systemd-logind[591]: Linked /tmp/.X11-unix/X0 to /run/user/mus/X11/display.
[  309.295126] dbus[661]: [system] Activating via systemd: service name='org.freedesktop.Avahi' unit='dbus-org.freedesktop.Avahi.service'
[  309.295155] dbus-daemon[661]: dbus[661]: [system] Activating via systemd: service name='org.freedesktop.Avahi' unit='dbus-org.freedesktop.Avahi.service'
[  309.295294] dbus[661]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.Avahi.service': Unit dbus-org.freedesktop.Avahi.service failed to load: No such file or directory. See system logs and 'systemctl status dbus-org.freedesktop.Avahi.service' for details.
[  309.295375] dbus-daemon[661]: dbus[661]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.Avahi.service': Unit dbus-org.freedesktop.Avahi.service failed to load: No such file or directory. See system logs and 'systemctl status dbus-org.freedesktop.Avahi.service' for details.

systemctl status cryptsetup\@daten.service

cryptsetup@daten.service - Cryptography Setup for daten
	  Loaded: loaded (/run/systemd/generator/cryptsetup@daten.service)
	  Active: active (exited) since Fri, 03 Feb 2012 18:18:39 +0100; 18min ago
	 Process: 421 ExecStart=/lib/systemd/systemd-cryptsetup attach daten /dev/md0 /root/key  (code=exited, status=0/SUCCESS)
	  CGroup: name=systemd:/system/cryptsetup@.service/daten

/run/systemd/generator/cryptsetup@daten.service

[Unit]
Description=Cryptography Setup for %I
Conflicts=umount.target
DefaultDependencies=no
BindTo=dev-md0.device dev-mapper-%i.device
After=systemd-readahead-collect.service systemd-readahead-replay.service dev-md0.device
Before=umount.target
Before=local-fs.target
Before=cryptsetup.target

[Service]
Type=oneshot
RemainAfterExit=yes
TimeoutSec=0
ExecStart=/lib/systemd/systemd-cryptsetup attach 'daten' '/dev/md0' '/root/key' ''
ExecStop=/lib/systemd/systemd-cryptsetup detach 'daten'

So am I missing something here or is this a bug in systemd?

Offline

#1130 2012-02-04 07:40:38

IncredibleLaser
Member
From: Germany, NRW
Registered: 2008-07-16
Posts: 158

Re: systemd: Yet Another Init Replacement

65kid wrote:

I have an encrypted RAID5 with 4x2TB drives in my system.

Sorry for Off-Topic, but have you read http://www.miracleas.com/BAARF/RAID5_versus_RAID10.txt?

65kid wrote:

the root device (which is encrypted as well of course)

Doesn't make too much sense to me. There is nothing of interest there, since you have another partition, Daten, which I assume is the reason to encrypt?

If the problem is the block device not being ready, as the fact that dropping from the emergency shell fixes the problem, try the sleep hook for mkinitcpio.

Offline

#1131 2012-02-04 08:04:49

Agamemnon
Member
From: France
Registered: 2011-05-05
Posts: 42

Re: systemd: Yet Another Init Replacement

Agamemnon wrote:

Mmmh.. I use the top-right-menu of gnome-shell... So, maybe "shutdown -h -P now"... I'm not very sure of what command it uses...
But, I've tested all these commands in a terminal and nothing work. I have still the blicking white cursor and nothing else.

Hey!
The command "shutdown -h now" works!!! But I don't know how add it permanently. What configuration file(s) need to be modified?


Pc: Intel core i7, 8Gb RAM, Archlinux 64bits, Gnome 3
Laptop 1: Intel Core2Duo, 4Gb RAM, Archlinux 64bits, Gnome 3
Laptop 2: Intel P4 HT, 512Mb RAM, Archlinux 32 bits, Gnome 3 too

Offline

#1132 2012-02-04 11:50:33

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: systemd: Yet Another Init Replacement

65kid wrote:

I have an encrypted RAID5 with 4x2TB drives in my system.

Sorry for Off-Topic, but have you read http://www.miracleas.com/BAARF/RAID5_versus_RAID10.txt?

RAID 10 would only give me 4TB of space, while I have 6TB with my RAID5. Yes, I know RAID 10 has its advantages, but the RAID5 has worked fine for me so far even though all 4 drives have already failed once (Thank you Samsung! wink ).

65kid wrote:

the root device (which is encrypted as well of course)

Doesn't make too much sense to me. There is nothing of interest there, since you have another partition, Daten, which I assume is the reason to encrypt?

You always have the risk of applications leaking stuff to tmp-/cache-files etc, better safe than sorry.

If the problem is the block device not being ready, as the fact that dropping from the emergency shell fixes the problem, try the sleep hook for mkinitcpio.

Getting back On-Topic, I found this mailing list discussion:
http://lists.freedesktop.org/archives/s … 04020.html

So it seems like the problem is that mdadm creates /dev/md0 but the device isn't actually ready until a few ms later. But systemd tries to use it as soon as /dev/md0 is there and therefore fails.
Workaround is using /dev/disk/by-uuid/... instead of /dev/md0, because the uuid-symlink is not created before the device is actually ready, works fine for me.

Offline

#1133 2012-02-04 13:05:29

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,281

Re: systemd: Yet Another Init Replacement

I gave systemd a brief outing yesterday (first time) and got everything set up to start my system and send me through lxdm to xfce without any hitches. However, once there I do have an issue that I can't find any documentation on, regarding non-system mounts.

I have two DVD drives and two truecrypt partitions. The truecrypt partitions are mounted manually on demand, currently at /media/Work and /media/Other, whilst the DVD drives are automounted at /media/cdromX when a disk is inserted and unmounted when it's removed. I also have /media/iso set up for manually mounting .iso images. With systemd my custom mount points are eradicated, and none of the above will mount. True I can add the truecrypt and iso mount points in /home instead, though I'd rather not. DVD mounts fail with a "mount point does not exist" error.

Is there any documentation anywhere that will help me understand how systemd works in this regard and what I need to do get the old behaviour back?


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

/ is the root of all problems.

Offline

#1134 2012-02-04 15:09:11

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: systemd: Yet Another Init Replacement

/media has a tmpfs mounted over it (for RO root and udisks), so your mount points aren't gone, they're just hidden. If mounted via systemd, the mountpoints will be created prior to the mount call. I would suggest moving the truecrypt partitions into /mnt. What is automounting your optical media?

Offline

#1135 2012-02-04 15:18:35

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,281

Re: systemd: Yet Another Init Replacement

optical media are mounted by thunar-volman - I'll move the Truecrypt and iso mount points - so just need to fix up optical. TY for your reply


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

/ is the root of all problems.

Offline

#1136 2012-02-04 15:52:02

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,281

Re: systemd: Yet Another Init Replacement

Ahh - fixed it. I had a couple of rogue entries in fstab for the DVD drives. Removed them and automounting is now working fine. Moved my own custom mount points to /mnt (and now reconfiguring stuff that points to the wrong place) and all seems good.

TY


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

/ is the root of all problems.

Offline

#1137 2012-02-07 10:00:42

sidneyk
Member
From: Bonner Springs, KS. USA
Registered: 2011-04-22
Posts: 129

Re: systemd: Yet Another Init Replacement

Forgive me if it has already been covered (I couldn't find anything), but what happened to systemadm - the gui interface for looking at what was going on with systemd. I see it has disappeared somewhere along the way. I used to use it some, but hadn't for awhile until I tried to fire it up the other day and it was gone. I looked at the file list in the package and it isn't there but there is still a man page for it and it is still referenced on the wiki page.

Last edited by sidneyk (2012-02-07 10:01:55)

Offline

#1138 2012-02-07 10:05:30

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,576

Re: systemd: Yet Another Init Replacement

Offline

#1139 2012-02-07 11:12:59

sidneyk
Member
From: Bonner Springs, KS. USA
Registered: 2011-04-22
Posts: 129

Re: systemd: Yet Another Init Replacement

Thanks. I wasn't aware that it had been separated out and even renamed. Will give that pkg a go when I get home.

Offline

#1140 2012-02-08 07:48:34

rz
Member
From: Jita
Registered: 2012-01-11
Posts: 17
Website

Re: systemd: Yet Another Init Replacement

This is how debian's whole: foo, foo-data, foo-devel thing got started.


There's 52 ways to murder anyone. One and two are the same and they both work as well.

Offline

#1141 2012-02-08 16:06:05

ZekeSulastin
Member
Registered: 2010-09-20
Posts: 266

Re: systemd: Yet Another Init Replacement

rz wrote:

This is how debian's whole: foo, foo-data, foo-devel thing got started.

To be fair, this is far from the first package where people have separated out the GUI: Wireshark from the official repos, for instance ...

Offline

#1142 2012-02-09 11:50:15

eworm
Package Maintainer (PM)
From: Oberhausen, Germany
Registered: 2010-01-30
Posts: 106
Website

Re: systemd: Yet Another Init Replacement

I have some problems with systemd-4[01]-1: lightdm starts up, when logging in my user session is killed by systemd-logind.

Regarding to /var/log/lightdm/lightdm.log it is sending SIGTERM to lightdm. Removing "kill-session-processes=1" from /etc/pam.d/lightdm does not have an effect. Anybody else with this problem? Any ideas what could go wrong?

Anything is fine with systemd-39-2.


ArchLinux - make it simple & lightweight

Offline

#1143 2012-02-09 14:59:30

eworm
Package Maintainer (PM)
From: Oberhausen, Germany
Registered: 2010-01-30
Posts: 106
Website

Re: systemd: Yet Another Init Replacement

eworm wrote:

I have some problems with systemd-4[01]-1: lightdm starts up, when logging in my user session is killed by systemd-logind.

Same problem with slim... Login manager is killed after user login.


ArchLinux - make it simple & lightweight

Offline

#1144 2012-02-10 16:54:47

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

Re: systemd: Yet Another Init Replacement

ego.abyssi wrote:

Problem: /etc/systemd/system/multi-user.target.wants/wpa_supplicant\@wlan0.service and /etc/systemd/system/multi-user.target.wants/dhcpcd\@wlan0.service fail on boot

Solution: systemd restart wpa_supplicant\@wlan0.service && systemd restart dhcpcd\@wlan0.service

* * *

Other than the networking specifics, the problems I am experiencing above seem to stem from devices not yet existing when these services run.  I'm assuming there is a better solution than restarting the services, perhaps along the lines of adding appropriate Wants, Requires, Before, or After clauses to the service specifications. I'll be damned if I quite know how to arrange which clauses into which service specifications to alleviate the problems.

[mindless drivel]

Edit: After some tinkering, I found out that your script works if you add WantedBy=network.target to the install section. That way, wpa_supplicant@interface.service is called whenever network.target is run, and as soon as it has finished (i.e. lists a dbus address), dhcpcd (which in turn depends on network.target) is run, and the need to restart the services is eliminated!

My full wpa_supplicant@.service:

[Unit]
Description=Wi-Fi Security Service for interface %I

[Service]
Type=dbus
BusName=fi.epitest.hostap.WPASupplicant
ExecStart=/usr/sbin/wpa_supplicant -c /etc/wpa_supplicant-mine.conf -u -i %I

[Install]
WantedBy=network.target

I don't know if there's a way to run wpa_supplicant witout an interface specified, and I still have to figure out how to deal with a hotplugged ethernet connection, but at least wireless works now. Hooray. smile

Last edited by Runiq (2012-02-10 18:01:15)

Offline

#1145 2012-02-10 19:13:33

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: systemd: Yet Another Init Replacement

Would be better to use Wants=network.target in the [Unit] section (which means network.target is pulled in and activated) and set WantedBy=multi-user.target for the service.

Offline

#1146 2012-02-10 19:22:01

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

Re: systemd: Yet Another Init Replacement

falconindy wrote:

Would be better to use Wants=network.target in the [Unit] section (which means network.target is pulled in and activated) and set WantedBy=multi-user.target for the service.

Hm… Would that still work? I thought if I used Wants= instead, dhcpcd and wpa_supplicant might get started in parallel, which is what I wanted to avoid.

If that is not so, what is the advantage of using Wants instead of WantedBy? As I said, I'm not yet quite familiar with the whole thing.

Offline

#1147 2012-02-10 20:36:38

sidneyk
Member
From: Bonner Springs, KS. USA
Registered: 2011-04-22
Posts: 129

Re: systemd: Yet Another Init Replacement

I've been having a reboot / shutdown problem with systemd since about the last 2 updates. I'm currently on a fresh install of Arch since my system got so borked it was quicker to just reinstall the whole system instead of trying to patch everything back up. What is happening is when I try to reboot or shutdown from the Gnome-shell menu or even type 'sudo reboot' in a terminal, there is an extra long delay before it finally reboots or shuts down, about 2 minutes or more. That was why my system got borked probably because I first thought it was hung and went for the reset button on my tower, since I couldn't get to any ttys and control-alt-delete wasn't helping.

So, I reinstalled everything, this time I have nothing from AUR installed, but I am using the testing repos. Reboot and shutdown used to be pretty fast until 2 to 3 systemd updates ago. Currently, I can type 'sudo systemctl --force reboot' and the reboot goes a little quicker, but still not as quick as before. Ironically, I'm getting a 10 - 12 second boot as reported by systemd-analyze with Gome3 / GDM setup.

I changed my kernel command line options to verbose in order to maybe get a better idea of what is going on. The delay occurs right after the message that permit user sessions has been stopped and after waiting for a couple minutes or so, the next thing displayed is that Network Manager has been stopped and the reboot / shutdown then progresses. So, it would appear that NetworkManager is now causing a delay (or at least, involved in it) and it never did before. It also doesn't appear that NetworkManager has been updated since November, so it seems like it has to be something with systemd or maybe another update. Shutdown and reboot were working just fine on sysvinit just prior to me reinstalling systemd and I almost always use the restart or power off options from the Gnome user menu in the upper right corner.

If more info is needed, maybe someone could point me to the right files and I'll be happy to post them. Thanks.

[EDIT] It seems that the latest systemd in testing (42-1) has fixed the reboot / shutdown issues for me. Consider this solved.

Last edited by sidneyk (2012-02-11 14:53:10)

Offline

#1148 2012-02-12 19:36:55

DarkSniper
Member
Registered: 2011-04-05
Posts: 74

Re: systemd: Yet Another Init Replacement

Just wondering... What's the journal log feature that systemd 42-1 sets as the default (as opposed to syslog in the last version)? It seems to be causing cups to fail and lxdm to suddenly quit right after starting. Changing LogTarget to syslog-or-kmesg and DefaultStandardOutput to syslog in /etc/systemd/system.conf seemed to correct the issue, but are there any disadvantages to doing this?

Edit: Whoops, journal logging doesn't seem to be the cause. Lxdm works sporadically now, failing more often than not, and the cups issue is due to the fact that udev moved is binaries and the .service from systemd-arch-units references /sbin/udevadm (filed a bug report for this and changed the file locally). I'm still curious as to what this journal-logging feature does though. It doesn't seem to have any documentation since the manpage for its configuration file doesn't exist.

Last edited by DarkSniper (2012-02-12 20:55:51)


Failure is not an option... It comes bundled with Windows.

Offline

#1149 2012-02-13 03:50:59

sidneyk
Member
From: Bonner Springs, KS. USA
Registered: 2011-04-22
Posts: 129

Re: systemd: Yet Another Init Replacement

DarkSniper wrote:

Just wondering... What's the journal log feature that systemd 42-1 sets as the default (as opposed to syslog in the last version)? It seems to be causing cups to fail and lxdm to suddenly quit right after starting. Changing LogTarget to syslog-or-kmesg and DefaultStandardOutput to syslog in /etc/systemd/system.conf seemed to correct the issue, but are there any disadvantages to doing this?

Edit: Whoops, journal logging doesn't seem to be the cause. Lxdm works sporadically now, failing more often than not, and the cups issue is due to the fact that udev moved is binaries and the .service from systemd-arch-units references /sbin/udevadm (filed a bug report for this and changed the file locally). I'm still curious as to what this journal-logging feature does though. It doesn't seem to have any documentation since the manpage for its configuration file doesn't exist.

If I understand correctly from Dave's announcement in the mailing list, journal basically is systemd's logger. According to his announcement, you no longer need syslog-ng or rsyslog or the such, unless you've changed the defaults. I have eliminated syslog-ng and I can run a dmesg just fine with all of the expected info there. If you do use syslog-ng or another logger then systemd passes control from the journal back to it after or at some point during boot, if I understand correctly. I'm using gdm / gnome3 so I can't address the lxdm issues and I'm not really using cups, at least not actively. For me, systemd-42-1 seems to have cleared up a few problems I was having with slow reboot / shutdown. I agree with you that most of the issues are probably stemming from things getting moved around with udev and other stuff. My Arch system got so broke the other day that I wound up backing up my /home directory and just reinstalling everything fresh, as that was a lot quicker than trying to fix it piece by piece, although I was getting there by reinstalling packages from /var/cache/pacman/pkg/. I just didn't have the patience to continue with that self-torture.

I see that Dave has also posted the systemd-sysvinitcompat symlinks also mentioned in the mailing list. I'll give those a go in the morning. Now I have systemd-42-1 with no systemd-initscripts installed and have uninstalled initscripts and sysvinit. I'm achieving a 10.x second boot, according to systemd-analyze, and reboot works fine with 'sudo systemctl reboot'. Hopefully. the new symlinks will let me get back to using the gui shortcut buttons and such.

Offline

#1150 2012-02-13 04:37:26

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: systemd: Yet Another Init Replacement

sidneyk wrote:

If I understand correctly from Dave's announcement in the mailing list, journal basically is systemd's logger. According to his announcement, you no longer need syslog-ng or rsyslog or the such, unless you've changed the defaults.

My post was slightly misleading. The journal is not a direct replacement for syslog, but most desktop users can get away without the need for a syslog with the journal in place. If you really want to save logs, create /var/log/journal and the journal will log there (including doing rotation).

sidneyk wrote:

If you do use syslog-ng or another logger then systemd passes control from the journal back to it after or at some point during boot, if I understand correctly.

No, /dev/log belongs to the journal now. It's hands off for any other logger. If you want to use another logger, messages are forwarded via a message queue to /run/systemd/journal/socket. You should be subscribing to messages here instead.

Offline

Board footer

Powered by FluxBB