Results 1 to 5 of 5

Thread: Systemd services start twice

  1. #1
    Join Date
    Feb 2010
    Location
    Royse City, TX
    Posts
    215

    Default Systemd services start twice

    I have noticed over the last few weeks, when I hit 'esc' to watch the boot progress, that after the message "Switch root", all the systemd services are loaded and started twice. I don't know that this affects how the system runs or the boot time but it seems that this shouldn't be happening. A week or so ago I did a full reinstall from scratch and this behavior persisted. Is there a way to stop this duplication?

    This is on Tumbleweed.
    Steve Coleman
    openSUSE LEAP 15
    openSUSE Tumbleweed

  2. #2
    Join Date
    Jun 2008
    Location
    East of Podunk
    Posts
    33,683
    Blog Entries
    15

    Default Re: Systemd services start twice

    Quote Originally Posted by evetsnameloc View Post
    I have noticed over the last few weeks, when I hit 'esc' to watch the boot progress, that after the message "Switch root", all the systemd services are loaded and started twice. I don't know that this affects how the system runs or the boot time but it seems that this shouldn't be happening. A week or so ago I did a full reinstall from scratch and this behavior persisted. Is there a way to stop this duplication?

    This is on Tumbleweed.
    Hi
    Check the boot output from journalctl, sure it's not the service Starting, Started/Deactivated and finishing?

    For example;

    Code:
    journalctl -b | grep systemd
    .....
    Sep 25 10:13:27 grover systemd[1]: Starting Hostname Service...
    Sep 25 10:13:27 grover systemd[1]: Started Hostname Service.
    Sep 25 10:13:57 grover systemd[1]: systemd-hostnamed.service: Deactivated successfully.
    ....
    Cheers Malcolm °¿° (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3
    Join Date
    Sep 2012
    Posts
    8,218

    Default Re: Systemd services start twice

    Quote Originally Posted by evetsnameloc View Post
    after the message "Switch root", all the systemd services are loaded and started twice.
    No, not "all".
    this shouldn't be happening
    Why?
    Is there a way to stop this duplication?
    No (OK, not without massive changes). Initrd is using systemd to prepare access to root device and services started in initrd are not necessarily the same as services started after switcn to real root (even if the names looks similar).

  4. #4
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    4,352
    Blog Entries
    5

    Default Re: Systemd services start twice

    Quote Originally Posted by evetsnameloc View Post
    I have noticed over the last few weeks, when I hit 'esc' to watch the boot progress, that after the message "Switch root", all the systemd services are loaded and started twice. I don't know that this affects how the system runs or the boot time but it seems that this shouldn't be happening. A week or so ago I did a full reinstall from scratch and this behavior persisted. Is there a way to stop this duplication?
    There is no duplication. Each unit is started once:
    Code:
    erlangen:~ # journalctl -b -u init.scope -o short-monotonic -g Started --no-pager 
    [    3.547002] erlangen systemd[1]: Started Rule-based Manager for Device Events and Files.
    [    3.604857] erlangen systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
    [    5.569890] erlangen systemd[1]: Started Rule-based Manager for Device Events and Files.
    [    5.629307] erlangen systemd[1]: Started Network Configuration.
    [    5.950661] erlangen systemd[1]: Started Security Auditing Service.
    [    6.026933] erlangen systemd[1]: Started Network Name Resolution.
    [    6.027244] erlangen systemd[1]: Started Watch /etc/sysconfig/btrfsmaintenance.
    [    6.027399] erlangen systemd[1]: Started Watch for changes in CA certificates.
    [    6.027893] erlangen systemd[1]: Started CUPS Scheduler.
    [    6.027949] erlangen systemd[1]: Started Watch for changes in issue snippets.
    [    6.027994] erlangen systemd[1]: Started Start fetchmail.
    [    6.028044] erlangen systemd[1]: Started Daily Cleanup of Snapper Snapshots.
    [    6.028092] erlangen systemd[1]: Started Daily Cleanup of Temporary Directories.
    [    6.029680] erlangen systemd[1]: Started Disable backup HDD.
    [    6.032712] erlangen systemd[1]: Started hd-idle disk spindown service.
    [    6.033162] erlangen systemd[1]: Started irqbalance daemon.
    [    6.036048] erlangen systemd[1]: Started MiniDLNA is a DLNA/UPnP-AV server software.
    [    6.037708] erlangen systemd[1]: Started Start the rsync server daemon.
    [    6.046186] erlangen systemd[1]: Started Machine Check Exception Logging Daemon.
    [    6.046297] erlangen systemd[1]: Started Purge old kernels.
    [    6.050164] erlangen systemd[1]: Started RPC Bind.
    [    6.052390] erlangen systemd[1]: Started D-Bus System Message Bus.
    [    6.059153] erlangen systemd[1]: Started OpenSSH Daemon.
    [    6.068772] erlangen systemd[1]: Started User Login Management.
    [    6.093307] erlangen systemd[1]: Started NTP client/server.
    [    6.094106] erlangen systemd[1]: Started Backup of /home.
    [    6.094201] erlangen systemd[1]: Started Backup of RPM database.
    [    6.094284] erlangen systemd[1]: Started Backup of /etc/sysconfig.
    [    6.094391] erlangen systemd[1]: Started Balance block groups on a btrfs filesystem.
    [    6.094495] erlangen systemd[1]: Started Scrub btrfs filesystem, verify block checksums.
    [    6.094597] erlangen systemd[1]: Started Discard unused blocks on a mounted filesystem.
    [    6.094673] erlangen systemd[1]: Started Check if mainboard battery is Ok.
    [    6.094833] erlangen systemd[1]: Started Systemd timer to update the system daily with Zypper.
    [    6.094913] erlangen systemd[1]: Started Daily rotation of log files.
    [    6.094988] erlangen systemd[1]: Started Daily man-db regeneration.
    [    6.095060] erlangen systemd[1]: Started Daily locate database update.
    [    6.120835] erlangen systemd[1]: Started CUPS Scheduler.
    [    6.139889] erlangen systemd[1]: Started The Apache Webserver.
    [    6.141022] erlangen systemd[1]: Started Getty on tty1.
    [    6.198862] erlangen systemd[1]: Started Locale Service.
    [    6.374159] erlangen systemd[1]: Started Postfix Mail Transport Agent.
    [    6.374801] erlangen systemd[1]: Started Command Scheduler.
    [    6.398205] erlangen systemd[1]: Started DBus interface for snapper.
    [    6.723248] erlangen systemd[1]: Started X Display Manager.
    [    6.906519] erlangen systemd[1]: Started User Manager for UID 477.
    [    6.906849] erlangen systemd[1]: Started Session 1 of User sddm.
    [    7.202401] erlangen systemd[1]: Started Authorization Manager.
    [    7.303224] erlangen systemd[1]: Started Disk Manager.
    [    7.331508] erlangen systemd[1]: Started Daemon for power management.
    [   25.177511] erlangen systemd[1]: Started A remote-mail retrieval utility.
    [   65.031033] erlangen systemd[1]: Started User Manager for UID 1000.
    [   65.031111] erlangen systemd[1]: Started Session 3 of User karl.
    [   65.052155] erlangen systemd[1]: Started RealtimeKit Scheduling Policy Service.
    erlangen:~ #
    Code:
    karl@erlangen:~> journalctl --user -b -u init.scope -o short-monotonic -g Started  
    [   65.028596] erlangen systemd[6809]: Started Daily Cleanup of User's Temporary Directories. 
    [   65.031087] erlangen systemd[6809]: Started PipeWire Multimedia Service. 
    [   65.031138] erlangen systemd[6809]: Started Save jAlbum Project Files. 
    [   65.031187] erlangen systemd[6809]: Started Multimedia Service Session Manager. 
    [   65.031730] erlangen systemd[6809]: Started D-Bus User Message Bus. 
    [   65.534532] erlangen systemd[6809]: Started Baloo File Indexer Daemon. 
    [   65.575514] erlangen systemd[6809]: Started KDE Config Module Initialization. 
    [   65.614502] erlangen systemd[6809]: Started KDE Daemon. 
    [   65.634945] erlangen systemd[6809]: Started KDE Global Shortcuts Server. 
    [   65.650169] erlangen systemd[6809]: Started KDE Session Management Server. 
    [   65.670691] erlangen systemd[6809]: Started User preferences database. 
    [   65.698593] erlangen systemd[6809]: Started KDE Window Manager. 
    [   65.708013] erlangen systemd[6809]: Started KDE Plasma Workspace. 
    [   65.708663] erlangen systemd[6809]: Started Proxies GTK DBus menus to a Plasma readable format. 
    [   65.710579] erlangen systemd[6809]: Started Handle legacy xembed system tray icons. 
    [   65.747526] erlangen systemd[6809]: Started KActivityManager Activity manager Service. 
    [   65.758457] erlangen systemd[6809]: Started KDE PolicyKit Authentication Agent. 
    [   66.097147] erlangen systemd[6809]: Started Powerdevil. 
    [   66.105185] erlangen systemd[6809]: Started Geoclue Demo agent. 
    [   66.106040] erlangen systemd[6809]: Started Accessibility. 
    [   66.106462] erlangen systemd[6809]: Started Set KDE_FULL_SESSION=1. 
    [   66.107534] erlangen systemd[6809]: Started Calendar Reminders. 
    [   66.118162] erlangen systemd[6809]: Started KScreen. 
    [   66.119257] erlangen systemd[6809]: Started /usr/bin/kalendarac. 
    [   66.180905] erlangen systemd[6809]: Started Firefox - Web Browser. 
    [   66.317746] erlangen systemd[6809]: Started Virtual filesystem service. 
    [   66.361967] erlangen systemd[6809]: Started Konsole - Terminal. 
    [   66.409056] erlangen systemd[6809]: Started KMail - Mail Client. 
    [   66.454422] erlangen systemd[6809]: Started sandboxed app permission store. 
    [   66.455061] erlangen systemd[6809]: Started flatpak document portal service. 
    [   66.490728] erlangen systemd[6809]: Started Accessibility services bus. 
    [   66.504291] erlangen systemd[6809]: Started Portal service (GTK/GNOME implementation). 
    [   66.576520] erlangen systemd[6809]: Started Xdg Desktop Portal For KDE. 
    [   66.590889] erlangen systemd[6809]: Started Portal service. 
    [   67.046819] erlangen systemd[6809]: Started PipeWire PulseAudio. 
    karl@erlangen:~> 
    openSUSE Tumbleweed, KDE Plasma, Blogs/KeepItSimple, i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), 5600X, 5700U (2022)

  5. #5
    Join Date
    Feb 2010
    Location
    Royse City, TX
    Posts
    215

    Default Re: Systemd services start twice

    Code:
    localhost:/home/steve # journalctl -b -u init.scope -o short-monotonic -g Started --no-pager 
    [    1.153649] localhost systemd[1]: Started Rule-based Manager for Device Events and Files.
    [    1.259841] localhost systemd[1]: Started Show Plymouth Boot Screen.
    [    1.260064] localhost systemd[1]: Started Forward Password Requests to Plymouth Directory Watch.
    [   18.665032] localhost systemd[1]: Started Rule-based Manager for Device Events and Files.
    [   18.672154] localhost systemd[1]: Started Show Plymouth Boot Screen.
    [   18.902705] localhost systemd[1]: Started Security Auditing Service.
    [   18.954705] localhost systemd[1]: Started Watch for changes in CA certificates.
    [   18.957434] localhost systemd[1]: Started CUPS Scheduler.
    [   18.958588] localhost systemd[1]: Started Watch for changes in issue snippets.
    [   18.960322] localhost systemd[1]: Started Watch for changes in smartmontools sysconfig file.
    [   18.962051] localhost systemd[1]: Started Daily Cleanup of Temporary Directories.
    [   19.070616] localhost systemd[1]: Started irqbalance daemon.
    [   19.486100] localhost systemd[1]: Started VMware Virtual Machine Monitor.
    [   19.490298] localhost systemd[1]: Started VMware Virtual Machine Communication Interface.
    [   19.495314] localhost systemd[1]: Started VMware Virtual Machine Communication Interface Socket Family.
    [   19.676560] localhost systemd[1]: Started Name Service Cache Daemon.
    [   20.620052] localhost systemd[1]: Started Machine Check Exception Logging Daemon.
    [   20.638477] localhost systemd[1]: Started D-Bus System Message Bus.
    [   20.640898] localhost systemd[1]: Started Avahi mDNS/DNS-SD Stack.
    [   20.846783] localhost systemd[1]: Started Authorization Manager.
    [   21.086913] localhost systemd[1]: Started Network Manager.
    [   21.183527] localhost systemd[1]: Started Private Internet Access daemon.
    [   21.201788] localhost systemd[1]: Started User Login Management.
    [   21.489084] localhost systemd[1]: Started Hostname Service.
    [   21.915649] localhost.localdomain systemd[1]: Started Purge old kernels.
    [   22.144177] localhost.localdomain systemd[1]: Started NTP client/server.
    [   22.281558] localhost.localdomain systemd[1]: Started Backup of RPM database.
    [   22.282242] localhost.localdomain systemd[1]: Started Backup of /etc/sysconfig.
    [   22.284212] localhost.localdomain systemd[1]: Started Check if mainboard battery is Ok.
    [   22.286245] localhost.localdomain systemd[1]: Started Discard unused blocks once a week.
    [   22.287944] localhost.localdomain systemd[1]: Started Daily rotation of log files.
    [   22.289637] localhost.localdomain systemd[1]: Started Daily man-db regeneration.
    [   22.564351] localhost.localdomain systemd[1]: Started Network Manager Script Dispatcher Service.
    [   23.223364] localhost.localdomain systemd[1]: Started CUPS Scheduler.
    [   24.043933] localhost.localdomain systemd[1]: Started Locale Service.
    [   24.109819] localhost.localdomain systemd[1]: Started Getty on tty1.
    [   24.778959] localhost.localdomain systemd[1]: Started Self Monitoring and Reporting Technology (SMART) Daemon.
    [   25.365804] localhost.localdomain systemd[1]: Started Modem Manager.
    [   26.145435] localhost.localdomain systemd[1]: Started X Display Manager.
    [   26.602987] localhost.localdomain systemd[1]: Started Postfix Mail Transport Agent.
    [   26.606875] localhost.localdomain systemd[1]: Started Command Scheduler.
    [   28.821482] localhost.localdomain systemd[1]: Started VMware Authentication Daemon.
    [   28.824308] localhost.localdomain systemd[1]: Started VMware USB Arbitration Service.
    [   39.322782] localhost.localdomain systemd[1]: Started User Manager for UID 1000.
    [   39.366078] localhost.localdomain systemd[1]: Started Session 1 of User steve.
    [   40.405284] localhost.localdomain systemd[1]: Started RealtimeKit Scheduling Policy Service.
    [   50.053605] localhost.localdomain systemd[1]: Started Disk Manager.
    [   50.634071] localhost.localdomain systemd[1]: Started Daemon for power management.
    [   54.118252] localhost.localdomain systemd[1]: Started Power Profiles daemon.
    [   80.498833] localhost.localdomain systemd[1]: Started PackageKit Daemon.
    [  122.621418] localhost.localdomain systemd[1]: Started Samba SMB Daemon.
    [  236.337246] localhost.localdomain systemd[1]: Started Network Manager Script Dispatcher Service.
    [  236.642696] localhost.localdomain systemd[1]: Started Network Manager.
    [  236.673935] localhost.localdomain systemd[1]: Started Hostname Service.
    [  248.126795] localhost.localdomain systemd[1]: Started Network Manager Script Dispatcher Service.
    [  248.322611] localhost.localdomain systemd[1]: Started Network Manager.
    [  293.437647] localhost.localdomain systemd[1]: Started Load/Save RF Kill Switch Status.
    [  294.271730] localhost.localdomain systemd[1]: Started WPA Supplicant daemon.
    [  298.536756] localhost.localdomain systemd[1]: Started PackageKit Daemon.
    [  299.915534] localhost.localdomain systemd[1]: Started Network Manager Script Dispatcher Service.
    [  355.588788] localhost.localdomain systemd[1]: Started VMware Virtual Machine Monitor.
    [  355.593825] localhost.localdomain systemd[1]: Started VMware Virtual Ethernet.
    [ 2416.725625] localhost.localdomain systemd[1]: Started Network Manager Script Dispatcher Service.
    [ 2699.965666] localhost.localdomain systemd[1]: Started Network Manager Script Dispatcher Service.
    [ 2699.965741] localhost.localdomain systemd[1]: Started PackageKit Daemon.
    [18724.987726] localhost.localdomain systemd[1]: Started Network Manager Script Dispatcher Service.
    [18811.147282] localhost.localdomain systemd[1]: Started Network Manager Script Dispatcher Service.
    [18811.166124] localhost.localdomain systemd[1]: Started PackageKit Daemon.
    [19618.044033] localhost.localdomain systemd[1]: Started Network Manager Script Dispatcher Service.
    [19630.041230] localhost.localdomain systemd[1]: Started Network Manager Script Dispatcher Service.
    [19711.384544] localhost.localdomain systemd[1]: Started Network Manager Script Dispatcher Service.
    [19711.385146] localhost.localdomain systemd[1]: Started PackageKit Daemon.
    [31746.446075] localhost.localdomain systemd[1]: Started Network Manager Script Dispatcher Service.
    [85086.141754] localhost.localdomain systemd[1]: Started Network Manager Script Dispatcher Service.
    [85114.056231] localhost.localdomain systemd[1]: Started Network Manager Script Dispatcher Service.
    [85114.064604] localhost.localdomain systemd[1]: Started PackageKit Daemon.
    [87019.763820] localhost.localdomain systemd[1]: Started PackageKit Daemon.
    [87026.538839] localhost.localdomain systemd[1]: Started Network Manager Script Dispatcher Service.
    [87757.071455] localhost.localdomain systemd[1]: Started Network Manager Script Dispatcher Service.
    [87833.033770] localhost.localdomain systemd[1]: Started Network Manager Script Dispatcher Service.
    [87833.817534] localhost.localdomain systemd[1]: Started PackageKit Daemon.
    [87940.495796] localhost.localdomain systemd[1]: Started Network Manager Script Dispatcher Service.
    [87970.349649] localhost.localdomain systemd[1]: Started Network Manager Script Dispatcher Service.
    [87970.363286] localhost.localdomain systemd[1]: Started PackageKit Daemon.
    [88569.160727] localhost.localdomain systemd[1]: Started Network Manager Script Dispatcher Service.
    [88569.174509] localhost.localdomain systemd[1]: Started PackageKit Daemon.
    [88611.151951] localhost.localdomain systemd[1]: Started Network Manager Script Dispatcher Service.
    [88611.159611] localhost.localdomain systemd[1]: Started PackageKit Daemon.
    [88666.097746] localhost.localdomain systemd[1]: Started PackageKit Daemon.
    [88681.583754] localhost.localdomain systemd[1]: Started Network Manager Script Dispatcher Service.
    [92282.112380] localhost.localdomain systemd[1]: Started PackageKit Daemon.
    [92875.748265] localhost.localdomain systemd[1]: Started PackageKit Daemon.
    Looks like I was wrong.

    Some services are started more than twice.
    Steve Coleman
    openSUSE LEAP 15
    openSUSE Tumbleweed

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •