You are not logged in.

#1 2016-01-14 04:28:37

Ocypheum
Member
Registered: 2015-09-26
Posts: 58

[Solved] systemctl lists several not found services

I always get this warning on boot:

arch systemd[1]: display-manager.service: Cannot add dependency job, ignoring: Unit display-manager.service failed to load: No such file or directory.

I thought I could just disable this service since I don't use a display manager, but it throws an error when I try to do so:

~ # systemctl disable display-manager.service
Failed to execute operation: No such file or directory

I have several other services that are "not-found":

~ $ systemctl --state=not-found --all
UNIT                       LOAD      ACTIVE   SUB  DESCRIPTION
auditd.service             not-found inactive dead auditd.service
display-manager.service    not-found inactive dead display-manager.service
plymouth-quit-wait.service not-found inactive dead plymouth-quit-wait.service
plymouth-start.service     not-found inactive dead plymouth-start.service
syslog.service             not-found inactive dead syslog.service

I figured out that I can mask them when disable doesn't work:

~ # systemctl mask display-manager.service
Created symlink from /etc/systemd/system/display-manager.service to /dev/null.

Is this the right way to disable services that aren't actually installed? Furthermore, why are these services enabled in the first place?

Last edited by Ocypheum (2016-01-31 22:11:01)

Offline

#2 2016-01-14 04:36:15

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,744

Re: [Solved] systemctl lists several not found services

Look at the output of find /etc/systemd and find the paths to thes link that are trying to start those services.  Delete the links by hand

Last edited by ewaller (2016-01-14 04:36:43)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2016-01-14 04:49:08

Ocypheum
Member
Registered: 2015-09-26
Posts: 58

Re: [Solved] systemctl lists several not found services

ewaller wrote:

Look at the output of find /etc/systemd and find the paths to thes link that are trying to start those services.  Delete the links by hand

I have very little in /etc/systemd:

~ $ find /etc/systemd/ -name "display-manager.service"

~ $ grep -r "display-manager" /etc/systemd/

There are however a couple of references in /usr/lib/systemd:

~ $ find /usr/lib/systemd/system/ -name "display-manager.service"

~ $ grep -r "display-manager" /usr/lib/systemd/system/
/usr/lib/systemd/system/graphical.target:Wants=display-manager.service
/usr/lib/systemd/system/graphical.target:After=multi-user.target rescue.service rescue.target display-manager.service

Offline

#4 2016-01-14 08:58:37

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [Solved] systemctl lists several not found services

If you don't want a display manager, you can change the default boot target (or just ignore the message):

# systemctl set-default multi-user.target

graphical.target is basically multi-user.target plus display-manager.service.

The other not-found services are only listed in After or Before lists. These do nothing unless those services are actually scheduled to be started.

Last edited by Raynman (2016-01-14 09:34:19)

Offline

#5 2016-01-29 03:57:24

Ocypheum
Member
Registered: 2015-09-26
Posts: 58

Re: [Solved] systemctl lists several not found services

Raynman wrote:

If you don't want a display manager, you can change the default boot target (or just ignore the message):

# systemctl set-default multi-user.target

graphical.target is basically multi-user.target plus display-manager.service.

The other not-found services are only listed in After or Before lists. These do nothing unless those services are actually scheduled to be started.

Nice! That did the trick. I'll just ignore the other ones.

Offline

#6 2016-01-29 05:02:27

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [Solved] systemctl lists several not found services

Please mark the thread as solved.

Offline

Board footer

Powered by FluxBB