Questions tagged [systemd]

systemd is an alternative approach to SystemV and Upstart init daemons for Linux. It is intended to provide a better framework for expressing services' dependencies, allow more work to be done in parallel at system startup, and to reduce shell overhead.

1,181 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8
votes
0answers
2k views

How can I use a USB keyboard or mouse to wake from suspend?

I am using GNOME 3.36.6 on Arch Linux. By default, GNOME's automatic suspend option is enabled and it works as expected. However, I have to press the power button to wake the computer from suspend. I ...
8
votes
0answers
9k views

Guide on how to enable hibernation on Linux Mint 20 Cinnamon (Ubuntu 20) and prevent unwanted wakeups

UPDATE: I have encountered some inconsistencies with my script in section 4 that is meant to be executed on every wake-up. Turns out, /proc/acpi/wakeup settings are only reset sometimes. Not on every ...
7
votes
0answers
935 views

systemd-nspawn: how to allow access to all devices?

I'm trying to create a rough equivalent of Docker's --privileged in a systemd container, but I've got no idea how to allow the container to access all of the devices available on the host (without ...
7
votes
1answer
584 views

Enable tty console login while “A stop job is running” (stop running forever, preventing shutdown)

A message like this one is often shown on shutdown: "A stop job is running ..." (nfs mount) This apparently even happens when the NFS server did not go away. But even if the connection to the NFS ...
7
votes
1answer
4k views

How to enable systemd user sessions for remote logins on CentOS 7?

I am trying to enable systemd user sessions on my CentOS 7 server. All the pieces seem to be there, and I have also run loginctl enable-linger <user>, but I don't have a systemd user session (or ...
6
votes
0answers
128 views

Mutually exclusive instances of the same systemd service template

I am interested if there's a better way to do mutually exclusive intances of the same systemd service template. Context: I am using SSH tunnels to connect over synergy between my laptop and which ...
6
votes
0answers
1k views

Passing environment variables around in systemd

EnvironmentFile is not an option as per this answer. I am trying to understand the recommended way of using and passing environment variables. I have a urxvtd.socket: [Unit] Description=urxvt ...
6
votes
1answer
2k views

How to lock screen on lid closing using systemd?

I am running Sway on Fedora 26 and want my laptop to be locked when I close my screen. I changed HandleLidSwitch to lock in /etc/systemd/logind.conf and ran systemctl restart systemd-logind after that....
6
votes
1answer
2k views

Unable to access systemd --user due to DBus access permissions

I'm trying to setup a service account using systemd units to manage the actual service + supporting code. However, it looks like the systemd user daemon isn't working properly. $ systemctl --user ...
6
votes
1answer
7k views

Enable systemd-backlight@intel_backlight instead of systemd-backlight@acpi_video0

I have 2 files in /sys/class/backlight/ - acpi_video0 and intel_backlight. intel_backlight is the one which controls my screen brightness (echo/cat), however acpi_video0 is the default. By default, ...
6
votes
1answer
2k views

systemd-ask-password prompt not displayed for vpn

I have a working OpenVPN client config that uses a passphrase-protected private key. If I run openvpn directly, I'm prompted for the passphrase and the client starts successfully. But if I start it ...
5
votes
0answers
1k views

systemd-shutdown[1]: Failed to finalize DM devices, ignoring

Each time I reboot my laptop, that's running Kubuntu 20.04, I see this message right before it reluctantly reboots: systemd-shutdown[1]: Failed to finalize DM devices, ignoring Also, rebooting takes ...
5
votes
1answer
247 views

dash maximum variable length under systemd

I have a shell script that uses a single variable as an associative array (one KEY=VALUE per line). Throughout the execution of the script, the variable is manipulated to add, remove or modify ...
5
votes
0answers
2k views

Is it possible to change systemd private tmp directory?

I am running some programs on both Debian and Fedora. When I ls the /tmp directory, I see many directories with extremely long name like systemd-private-d85027...-bluetooth.service-qxzMGm systemd-...
5
votes
0answers
1k views

Re-map scancode -> keycode of MacBook Pro built-in keyboard

Object I read this Arch wiki article to try to remap scancode & keycode on my Chakra 201710 + MacBook Pro 2015 (no touchbar and USB-C): Remap the built-in keyboard of like this: | ORIGINAL || ...
5
votes
0answers
4k views

Kubelet failed to get cgroup stats for “/system.slice/docker.service”

Question What the kubectl (1.8.3 on CentOS 7) error message actually means and how to resolve. Any references to understand what is going on. I suppose kubelet tries to talk to docker but somehow it ...
5
votes
0answers
1k views

Why “systemd[1]: user@65534.service: Killing process”

Some server I recently upgraded to Debian 9 now produce a strange syslog message every day (which got reported via logcheck): Oct 27 06:25:08 foo systemd[1]: user@65534.service: Killing process 12270 ...
5
votes
1answer
488 views

systemd: How to run a job both periodically and once at system shutdown?

I want to run a job periodically (e.g., every 5 minutes), and finally once at system shutdown. Systemd supports timers, which could be used to run a job periodically. It also supports to run a job at ...
5
votes
1answer
938 views

systemd-ask-password Only Prompt on Current Console

CentOS 7 I am using systemd-ask-password as part of the script that starts my systemd service. The problem is that systemd-ask-password prompts for the input on EVERY open terminal. I need to prompt ...
5
votes
1answer
2k views

Starting systemd service after network-online.target but DNS is still not available

I've got a program that I want to start by systemd on boot but only after DNS is available. The service file depends on network-online.target: $ cat /etc/systemd/system/te-m-pi.service [Unit] ...
5
votes
1answer
2k views

How to execute a script after every systemd automount?

I am trying to setup a system such that a script gets executed everytime any USB storage device is mounted (in this case, automounted by systemd). Based on a few references here, here and here, ...
5
votes
0answers
666 views

Global Environment Variables for Users & systemd

I have a set of environment variables that I need to be globally set for all users and all systemd services. I don't want to have to specify them it two different locations. I tried setting them /...
5
votes
0answers
746 views

Prevent systemd from logging status lines to a tty

I'd like to prevent the kernel and systemd from logging boot (service) status messages to a tty. Example output from a Debian Stretch/8 VM: The systemd man page talks about some parameters supposely ...
5
votes
3answers
2k views

debian without dbus: login/systemd complains about failing to connect to d-bus after motd

I have barebones raspbian, i.e. basically Debian 8, with systemd and no X. I removed dbus with "apt-get remove dbus". It deinstalled cleanly, with no apparent programs depending on it. Now, whenever I ...
5
votes
0answers
1k views

How do I configure a systemd service to execute simple /bin/echo “Hello world” command to show the output on the console?

I am trying to boot up a vm with qemu-system-ppc64(similar to lkvm). I am using the following command: qemu-system-ppc64 --enable-kvm -vga none -nographic -nodefaults -chardev stdio,id=id1 -device ...
5
votes
0answers
377 views

Limit system reboot burst

Systemd allows to automatically restart services if they have crashed. To prevent indefinite services restart it uses @StartLimitInterval@ and @StartLimitBurst@ variables. Moreover, I can reboot ...
5
votes
2answers
2k views

How to create rootfs for user mode Linux on Fedora 18?

I want to create a rootfs to be used with an UML kernel and be able to use the internet. I was using febootstrap with packages: bash, coreutils, net-tools, iputils. After using febootstrap-supermin-...
4
votes
0answers
115 views

How do I run a command in a different, already existing, systemd scope or session?

How do I run a command in a different already existing systemd session or scope? As far as I can tell there is no difference between a session and the session's scope unit, as far as processes being ...
4
votes
0answers
838 views

How to integrate “iwconfig wlan0 power off” into netplan on Ubuntu 19.10?

I configured WLAN on commandline with this file: cat /etc/netplan/wireless.yaml network: version: 2 wifis: wlan0: dhcp4: yes dhcp6: no access-points: "yyy": ...
4
votes
0answers
395 views

Processes started through SSH add up to limit of SSH Daemon (systemd)

on a productive server there are (background) processes started by users which connect through SSH and run some scripts. These processes are daemons and keep on running. Each started process is found ...
4
votes
0answers
259 views

Bluetooth auto connect shows no output device

I've manage to follow a bunch of other threads like this one: How to set up automatic connection of bluetooth headset? and read up on Bluetooth#Auto_power-on_after_boot and added the user to the right ...
4
votes
0answers
1k views

systemd Failed to start Store a System Token in an EFI Variable

A few weeks ago I started seeing this error in the journal after each boot. I believe it is related to a recent systemd update. systemd[1]: Failed to start Store a System Token in an EFI Variable. ...
4
votes
0answers
295 views

Customize journald config for a single service

I have a service (systemd unit) that logs very long messages (~700K), which means that the default LineMax setting of 48K doesn't suffice. Setting the LineMax field to 1M in /etc/systemd/journald....
4
votes
0answers
1k views

Supervising process [xxx] which is not our child. We'll most likely not notice when it exits

Apr 14 15:54:11 debian systemd[1]: nmbd.service: Supervising process 588 which is not our child. We'll most likely not notice when it exits. Apr 14 15:54:11 debian systemd[1]: smbd.service: ...
4
votes
0answers
506 views

systemctl restart X causes Connection reset by peer

I have a google compute instance with a startup scrtip that executes systemctl restart nfs-kernel-server, which causes the following errors: Jan 27 14:32:15 nfs startup-script: INFO startup-script: ...
4
votes
1answer
4k views

The Systemd Journald use too much memory and don't respect SystemMaxUse and RuntimeMaxUse?

I found the systemd-journald takes like 1GB+ of memory. After some searching I set the value of SystemMaxUse and RuntimeMaxUse both to 8M in "/etc/systemd/journald.conf". Then restart the journald. ...
4
votes
0answers
378 views

journalctl log disappear?

Service is still active: systemctl -l status foo.service ● foo.service - My Foo service Loaded: loaded (/etc/systemd/system/foo.service; static; vendor preset: disabled) Active: activating (...
4
votes
0answers
901 views

How to protect an EnvironmentFile used by a systemd service?

Background I have multiple RESTful web services being deployed through Azure DevOps Release Pipelines to a CentOS VM. Each of these services is managed by systemd and uses environment variables to ...
4
votes
0answers
398 views

checkinstall --include option not working

I am successfully able to create a .deb package from source using checkinstall. However can someone help me with why I cannot add custom/additional files to the package created using the --include ...
4
votes
0answers
3k views

Making hostapd work with systemd-networkd using a bridge

I have two ethernet ports and one wireless port on a router I am setting up. I am using systemd-networkd. I am renaming the ports first then creating a bridge then am bridging one of the the ...
4
votes
1answer
1k views

How to make systemd service stops before network service

I have a service that takes between 1 minute and 30 seconds to start or to stop. I needs to be started after network service and needs to be stopped before network service. It works well when ...
4
votes
0answers
1k views

Polkit rule for systemd template unit files

I'm trying to figure out how to write a polkit rule for a systemd template file. The rule is triggered when I use the actual service that will be instantiated (openvpn-client@miami.service) but not ...
4
votes
1answer
3k views

Creating .deb with systemd service but without SysV init scripts

I'm trying to add a systemd service file to an existing Debian package. I followed https://wiki.debian.org/Teams/pkg-systemd/Packaging, so I created debian/packagename.service. Because my debhelper is ...
4
votes
0answers
5k views

systemd unit files - conditional arguments

I'm trying to convert an old init script into a systemd unit file. My init script sources a configuration file and depending on some of the variables, some arguments are added to the daemon. The ...
4
votes
0answers
877 views

Systemd mount with a condition

What I would like to do is mount my ntfs data partition during boot process with systemd only if laptop is on AC power. At the moment I am running this script as a startup application in cinnamon, but ...
4
votes
0answers
2k views

Using link-local address for crossover network connection

I would like to use link-local address to connect an embedded device (running systemd-networkd) to a PC (Ubuntu, Win, OS X) using a crossover cable (no switch or DHCP server). When I connect over a ...
4
votes
0answers
258 views

systemd slices even with low CPUShare heavily affect system responsiveness

I've created custom slice (so now I have 4 slices user, system, machine, important) and assigned huge number to CPUShares. System felt really unresponsive under high load in this slice, what seems to ...
4
votes
0answers
1k views

Laptop sleeps by itself - in logs “Sleep requested” - requested by what?

I left my Linux laptop on with the lid open while it was on battery power for several minutes, and it went to "sleep" (according to the systemd journal) - I assume this means the same as hibernation? ...
4
votes
0answers
423 views

How do I define an Ubuntu Linux16.04 systemd service for fastcgi-mono-server4 or xsp4?

How do I define an Ubuntu Linux16.04 systemd service for fastcgi-mono-server4 or xsp4? I have already defined an Ubuntu Linux16.04 systemd service for apache2 by copying obex.service to apache2....
4
votes
1answer
1k views

boot of nfs mounting drive taking very long

When I upgraded to ubuntu 16.04 my boot time increased dramatically I did a systemd-analyze blame and as you can see the first two items take a very long time to load and this is on a SSD. 1min 30....

1
2 3 4 5
24