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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
18 views

Linux container initialization script utilizing systemd

I am trying to make a template filesystem for my systemd-nspawn container. The container filesystem will be cloned from this template by btrfs snapshot. I needs the container to run a initialization ...
Waiho's user avatar
  • 33
0 votes
0 answers
23 views

Why does `ip route show` not produce any output in my script from systemd service

Service.. [Unit] Description=testing Requires=network-online.target After=NetworkManager.service [Service] SyslogIdentifier=testing Type=oneshot ExecStart=test.sh [Install] WantedBy=network-online....
deanresin's user avatar
  • 443
0 votes
2 answers
28 views

Restrict all already running processes to a range of CPU cores

I've got an AMD 7950X3D CPU which has 32 total logical cores, 16 of which (0-15) have access to extra cache. To optimize my system for gaming while multitasking I want to run Steam and all the ...
Dmitri Ranfft's user avatar
1 vote
1 answer
43 views

systemd ignores /etc/hostname at startup

Our team works with a custom, barebone linux distro for an embedded device, and it uses systemd. The system used to rely on SystemV init scripts until stuff got migrated to systemd (including network ...
luis.espinal's user avatar
0 votes
1 answer
34 views

How to restart systemd service if it is taking too long to run?

I have a service that runs a slow and buggy one-shot program once a week that may hang sometimes for no apparent reason. I want this service to be restarted if it took longer than 4 hours to run. I ...
jojman's user avatar
  • 577
1 vote
1 answer
117 views

What is parsing/applying /etc/fstab entries

According to manual I thought that systemd-remount-fs.service is responsible for parsing and applying /etc/fstab entries. So I tried to test it: I removed ExecStart part (ExecStart=/lib/systemd/...
SAMPro's user avatar
  • 227
3 votes
1 answer
87 views

Debian Bookworm, systemd, and how EXT4 quota works?

I have a fresh Debian 12 system and I'm trying to turn on and enforce EXT4 filesystem quota. I read a lot of man and some other sources, for example this one from Red Hat: https://access.redhat.com/...
Kamil's user avatar
  • 1,431
0 votes
2 answers
70 views

How systemd service restart if another systemd service restart?

I have systemd 252 on Debian. I want when the systemd service systemd-hostnamed.service restarts or starts to restart my b.service. I used with no luck on my b.service the follow options. After=...
user21379959's user avatar
0 votes
1 answer
36 views

How to Make a Systemd Private Network Namespace Accessable

So I have an application that only binds to 0.0.0.0 and listens on a port (TCP). The communication is unencrypted and unauthorized so I'd like to work around that without getting too deep into the ...
WesAtWork's user avatar
0 votes
0 answers
15 views

MX Linux systemd Doesn't Login After Installing Nvidia Driver

I've installed Nvidia driver using the provided MX Linux KDE's Nvidia driver installer. Now cannot login to systemd anymore. Sysvinit works but with low resolution. I did all these but the issue ...
Reza Taba's user avatar
  • 101
0 votes
1 answer
39 views

Systemd service timer not working

I've made a systemd service with a timer that should run the script every hour, but it's not running every hour. % cat /etc/systemd/system/myservice.service [Unit] Description=Run script after network ...
paradroid's user avatar
  • 1,171
0 votes
0 answers
16 views

Running Scripts Before and After Suspend with Systemd

I found this blog article here that explains the process of Running scripts before and after suspend with systemd. Here are the steps: Create a /usr/lib/systemd/system-sleep/suspend-date.sh script: #...
jophuh's user avatar
  • 1
0 votes
1 answer
17 views

Why am I missing $XDG_RUNTIME_DIR and $DBUS_SESSION_BUS_ADDRESS after logging in via SSH and trying to set up user scope service

I'm trying to set up a user scope service after logging in via SSH, but when I try setting anything up like.. systemctl --user enable wallpaper.timer I get these errors, even though I'm logged in via ...
deanresin's user avatar
  • 443
0 votes
0 answers
19 views

Why did my service become masked?

I've provisioned a bunch of RPis with a systemd service that runs an instance of chromium-browser in kiosk mode, but on a few seemingly random devices it doesn't run. I checked the status just by ...
A__'s user avatar
  • 101
0 votes
0 answers
18 views

systemd path doesn't trigger service (anymore) when file is overwritten by renaming another file

I have a setting in which a systemd.path unit watches a particular file: [Unit] Description=Watch config file for changes [Path] PathChanged=/path/to/my/config.file [Install] WantedBy=multi-user....
AdminBee's user avatar
  • 21.8k
0 votes
1 answer
25 views

Systemd: provide password noninteractively to homectl

I would like to activate a systemd-homed home via ansible, how can I provide the password to the systemd password agent programmatically? It seems that I cannot simply pipe the password to homectl ...
Gamification's user avatar
0 votes
0 answers
23 views

How to view the systemd-xdg-autostart-generator generated files?

I ran the following command: $ systemctl --user list-dependencies xdg-desktop-autostart.target xdg-desktop-autostart.target ○ ├─app-geoclue\x2ddemo\x2dag[email protected] ○ ├─app-gnome\x2dinitial\...
Ahmad Ismail's user avatar
  • 2,500
0 votes
1 answer
25 views

How to remove DNS options from systemd-resolve

I'm unsure how to change the list of DNS options that resolvconf finds when connecting. systemd-resolve --status outputs Global Protocols: -LLMNR -mDNS +DNSOverTLS DNSSEC=no/unsupported ...
trenchweather's user avatar
0 votes
0 answers
30 views

Run gpg from systemd script

I wrote a wrapper for rsync. It connects to my host and makes a backup of my $HOME directory via ssh. I use gpg-agent for the ssh verification. My script works when called from a terminal emulator. It ...
grbll's user avatar
  • 23
0 votes
0 answers
11 views

How to use systemd WatchDog to allow alive pings from a child process?

I've configured a bash script that pipes multiple processes to run as a service. This works fine but I now want to use WatchdogSec to monitor if the state is still ok and if not to restart all child ...
Ramon Smits's user avatar
0 votes
1 answer
34 views

Restart SystemD service when Memory Usage in More than 100MB

My nemo-desktop freeze my whole system due to a bug. The file in ~/.config/autostart which autostart the service is: tee ~/.local/share/systemd/user/nemo-desktop-bug-workaround.service << END [...
Ahmad Ismail's user avatar
  • 2,500
0 votes
1 answer
30 views

What are systemd *.device units actually waiting for?

I've got a system that get's stuck when systemd tries to mount a filesystem. It fails on a dependency times out. The dependency is dev-disk-by\x2dlabel-cb\x2drootfs.device where the device being ...
Philip Couling's user avatar
0 votes
2 answers
66 views

Reorder of launching Systemd services

OS: Debian 11 Bullseye Context: The Zerotier application adds the zerotier-one.service system service and creates a virtual network interface (when it works). The sshd server default listens to all ...
DarekH's user avatar
  • 37
0 votes
0 answers
37 views

Why can't I enable systemd services created with podman generate?

Given this setup: --- version "3" services: wireguard: image: "lscr.io/linuxserver/wireguard" container_name: "wireguard" cap_add: - "NET_ADMIN&...
telometto's user avatar
  • 1,835
0 votes
1 answer
28 views

Howto change linux hostname on mounted (copied) drive

I have copied my headless Ubuntu 22LTS server to a backup drive with dd, and I want to deploy it as a backup server with the same relevant settings. What is the proper way to change the hostname on ...
user333869's user avatar
0 votes
1 answer
29 views

How to add a static IP address to a network interface using systemd.networkd, if the filesystem is read-only?

I have a situation where I'd like to add a static IP address to one of the network devices on an embedded Linux machine, via systemd.networkd. Normally I'd do that by creating a file like /etc/systemd/...
Jeremy Friesner's user avatar
0 votes
0 answers
17 views

Unable to create user with systemd-homed

I am trying to create a new user with systemd-homed, but I receive an error # homectl create jjcasmar Please enter new password for user jjcasmar: * Please enter new password for user ...
jjcasmar's user avatar
  • 263
1 vote
2 answers
76 views

Running a systemd service at boot with ALSA

I am trying to launch a python systemd service that uses ALSA sound when the Raspberry Pi boots. Here is the Talkie.service file in /etc/systemd/system: Description=My Talkie App After=network.target ...
16ar's user avatar
  • 11
0 votes
1 answer
21 views

systemd keeps restarting my daemon

I'm planning to use raspberry as USB tunnel through WiFi/Ethernet, so I wrote scripts to automate binding in udev, compiled and inserted kernel modules, and now I'm stuck with the daemon. My previous ...
Marcin Szczurowski's user avatar
0 votes
0 answers
6 views

Bluez way to tell if connected device has BT Classic, BLE or both

Is there a programmatic way to tell which transport layer (BD/BLE/Both) is used to connect to dev? I use sd_bus lib with C++ to handle DBus calls and signals. Thanks!
JWZ1996's user avatar
  • 41
0 votes
0 answers
24 views

systemd: lightdm.service: Main process exited, code=exited, status=1/FAILURE / How to log whats happening in a early stage of the booting process

I've upgraded Ubuntu 18.04 to 20.04 on my ARM (32 bit armhf) Chromebook. While Ubuntu 18.04 works perfectly,Ubuntu 20.04 has some kind of problem. I think that during the upgrade something broken. At ...
Marietto's user avatar
  • 495
1 vote
1 answer
167 views

How can I get colored output of `systemd` commands run with `watch` inside xterm?

Somehow I'm unable to get this working with color output, it works but no colors are shown. I'm currently using these alias'es in my bash shell: alias Xterm='xterm -geometry 132x60 +dc +cm -e ' alias ...
Tripple Moon's user avatar
0 votes
1 answer
50 views

Script not working fully under systemd

I have a python script to switch light/dark mode. At the end there's this line: process = subprocess.Popen(binDir + "/polybar.sh") That script it points to is this: #!/bin/env bash # ...
indeedwatson's user avatar
-1 votes
0 answers
31 views

Running "mount -a" command shows "mount: mount point tmpfs does not exist"

I Physically Replaced a disk from my server running on RHEL 8. Before Replacing: I unmounted disk by umount /dev/sdf (Successful unmount from mount point /data/5) I then replaced the HDD. After ...
Farzin Mukit's user avatar
0 votes
0 answers
40 views

Unable to determine the session we are in

I am currently running GarudaLinux(ArchLinux) , with Wayland and Hyprland as WM. Somewhere while disabling my GPUs adding Virtualization I lost my polkit configuration, and I am no longer able to run ...
Morphex's user avatar
  • 101
0 votes
1 answer
53 views

How to update programs compiled from source (from Github)?

I'm using Debian 12. I recently followed this guide (https://stopanddecrypt.medium.com/running-bitcoin-lightning-nodes-over-the-tor-network-2021-edition-489180297d5#13c5) to install some software, and ...
NVBK3's user avatar
  • 1
1 vote
1 answer
45 views

Mounting OverlayFS in fstab at startup

Is It possible to Mount OverlayFS from external partition in fstab and benefit from systemd services extensions at startup ? Thus overlay directory tree will add new systemd services configuration ...
K. PANIK's user avatar
0 votes
0 answers
10 views

How do I request a user input with GUI from script running as root by modern initialization system?

I have Systemd service of type "oneshot" to be launched by Udev upon a device insertion. Service is launching shell script as root. The script needs user input in order to do it's job as ...
Asc's user avatar
  • 1
1 vote
1 answer
81 views

What is systemd -.slice?

I see this in the output of systemd-analyze critical-chain. The example output in systemd-analyze(1) includes it, but fails to explain it. Example 3. systemd-analyze critical-chain $...
Brett Holman's user avatar
-1 votes
1 answer
34 views

Limiting process memory usage with systemd-run not working as expected

I'm trying to limit the memory usage of Chrome with systemd-run by starting it with: systemd-run --scope \ -p MemoryMax=16G \ -p MemoryHigh=15G \ -p CPUWeight=70 \ -p StartupCPUWeight=100 \ /...
apidae's user avatar
  • 101
0 votes
2 answers
83 views

How do I change mac before network service starts

I have a systemd service that change mac address to wifi adapter every boot. Systemd service works fine. I want the service not wait 1m 30sec when the wifi adapter is not plug in the usb. systemd ...
user21379959's user avatar
0 votes
0 answers
53 views

systemd-journald.service fails to load during boot

I've accidentally unplugged my NAS and after plugging back it fails to boot because of the following error: [ 105.556720] systemd[1]: systemd-timesyncd.service: Main process exited, code=killed, ...
Kamil's user avatar
  • 1
0 votes
1 answer
50 views

How to preset service instances with systemd

I am packaging an instanced service@ as an RPM. The package should automatically enable the preset instances that the local admin has already prescribed with a .preset file. What is the "...
Jaredo Mills's user avatar
0 votes
1 answer
31 views

MySQL ignore LD_PRELOAD

I trying to use jemalloc with MySQL. I found that I should add enviroment variable LD_PRELOAD to SystemD unit and thats all. But lsof /usr/lib/x86_64-linux-gnu/libjemalloc.so.2 shows nothing. I also ...
Azhinu's user avatar
  • 1
0 votes
0 answers
27 views

Frequent unexpected termination of .NET processes after office relocation

We moved our workplace last month, and we've been encountering frequent instances of the .NET process being terminated. I'm not sure why this is happening, but I'm confident that the program itself is ...
ori N's user avatar
  • 1
0 votes
2 answers
36 views

Forcing Systemd to Re-Isolate a Target Unit

My goal is to programmatically re-run the graphical target unit using the systemctl command. While I'm aware that I can use sudo systemctl isolate graphical.target, this approach doesn't seem to work ...
mlibre's user avatar
  • 1,271
1 vote
1 answer
58 views

How to avoid systemd periodic realtime timer running at boot

I have a realtime timer with Persistent=false running immediately after boot although my objective is to run it periodically! I saw it is a rather common question but none of the answers I found in ...
Pa Dalton's user avatar
0 votes
1 answer
87 views

How to reduce time to wait systemd service?

I have a systemd service that change mac address every boot to wifi adapter. Systemd service works fine. I want the service not wait 1m 30sec when the wifi adapter is not plug in the usb. How can I do ...
user21379959's user avatar
0 votes
0 answers
19 views

How to control HOST systemd service inside pid namespace

Note: this is not about to run systemd inside namespace/container I need to control some service, from inside a namespace/container, but systemctl returns "Failed to connect to bus: No data ...
GongT's user avatar
  • 11
1 vote
1 answer
41 views

Does adding a "ENV{SYSTEMD_WANTS}+="your.service" to udev rules guarantee that the service will wait for the device?

Consider the following example. I have a service console-scaling.service, which adjusts console fonts on startup and requires /dev/fb0 device. Therefore, I have added an udev rule: KERNEL=="fb0&...
Tomasz Garbus's user avatar

1
2 3 4 5
89