Skip to content

Running on boot with Systemd does not work without "After=multi-user.target" #197

@zehata

Description

@zehata

I have noticed that running on boot with Systemd does not work without After=multi-user.target on my machine. Not sure if it's specific to me.

This works for me:

[Unit]
Description=undervolt
+ After=multi-user.target
After=suspend.target
After=hibernate.target
After=hybrid-sleep.target

[Service]
Type=oneshot
ExecStart=/home/zehata/Desktop/undervolt/undervolt.py -v --core -91 --cache -91 --temp 94 -p1 8 10 -p2 10 1

[Install]
WantedBy=multi-user.target
WantedBy=suspend.target
WantedBy=hibernate.target
WantedBy=hybrid-sleep.target

System info:
Xubuntu 24.04.2 LTS
Kernel version: 6.14.0-24-generic

$ systemctl --version
systemd 255 (255.4-1ubuntu8.10)
+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified

Let me know if any more debug info is needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions