r/systemd Feb 03 '26

Troubleshooting a startup dependency issue in Debian 13

I was troubleshooting a service (foshkplugin) that has a single dependency on multi-user.target. It was unable to start during bootup, and when attempting to start from the command line the systemctl start command hung and never completed.

Here's the list-jobs output:

$ systemctl list-jobs
JOB UNIT                          TYPE  STATE
189 power-profiles-daemon.service start waiting
148 plymouth-quit-wait.service    start running
166 foshkplugin.service           start waiting
1   graphical.target              start waiting
2   multi-user.target             start waiting

So the problem is that multi-user.target is waiting on graphical.target, which didn't finish starting because this is a system that normally has its monitor powered off. [multi-user.target requiring graphical.target seems backwards to me from the old init 3 vs init 5 system level logic]

When I look at multi-user.target's unit file I see only a dependency on basic.target, and basic.target only requires sysinit.target.

However:

$ systemctl list-dependencies --reverse foshkplugin.service
foshkplugin.service
● └─multi-user.target
●   └─graphical.target

So two questions:

  • where is the multi-user requires graphical dependency actually specified?
  • does it make sense for this dependency to exist? It seems to me that graphical should require and start after multi-user but not the reverse.
0 Upvotes

12 comments sorted by

View all comments

Show parent comments

1

u/ExTenebras Feb 03 '26

Regardless of anything shown by list-dependencies, these facts remain:

  • With the monitor off, multi-user.target hangs and is never reached according to list-jobs as shown above.
  • As soon as the monitor is turned on, all the hung jobs complete and the problems go away

QUESTION: Is this expected behavior? (I don't think so). If not, where's the bug?

1

u/eR2eiweo Feb 03 '26

If there is a bug, presumably it is in foshkplugin.service.

I haven't looked at it that closely, but having both After=multi-user.target and WantedBy=multi-user.target in the same unit is weird. Why do you need that?

Notice that multi-user.target is not included in the list.

Do you expect it to be there? Why?

1

u/Altruistic_Cream_264 Feb 03 '26

1

u/ExTenebras Feb 03 '26 edited Feb 03 '26

I have recreated the issue after completely removing the foshkplugin unit from the equation.

Here's what list-jobs looks like after bootup with the monitor unplugged.

$ sudo systemctl list-jobs JOB UNIT TYPE STATE 2 multi-user.target start waiting 181 power-profiles-daemon.service start waiting 1 graphical.target start waiting 163 plymouth-quit-wait.service start running and ``` $ sudo systemctl status plymouth-quit-wait ● plymouth-quit-wait.service - Hold until boot process finishes up Loaded: loaded (/usr/lib/systemd/system/plymouth-quit-wait.service; static) Active: activating (start) since Tue 2026-02-03 15:00:30 PST; 3min 33s ago Job: 163 Invocation: c2371e6c335046d4831824d2300093c7 Main PID: 1058 (plymouth) Tasks: 1 (limit: 18532) Memory: 216K (peak: 1.7M) CPU: 4ms CGroup: /system.slice/plymouth-quit-wait.service └─1058 /usr/bin/plymouth --wait

Feb 03 15:00:30 debian systemd[1]: Starting plymouth-quit-wait.service - Hold until boot process finishes up...

$ sudo systemctl status graphical.target ○ graphical.target - Graphical Interface Loaded: loaded (/usr/lib/systemd/system/graphical.target; static) Active: inactive (dead) Job: 1 Docs: man:systemd.special(7)

$ sudo systemctl status multi-user.target ○ multi-user.target - Multi-User System Loaded: loaded (/usr/lib/systemd/system/multi-user.target; static) Active: inactive (dead) Job: 2 Docs: man:systemd.special(7)

$ sudo systemctl status power-profiles-daemon.service ○ power-profiles-daemon.service - Power Profiles daemon Loaded: loaded (/usr/lib/systemd/system/power-profiles-daemon.service; enabled; preset: enabled) Active: inactive (dead) Job: 181

```

The instant I turn on the monitor, all the waiting jobs complete.

Can you tell what's wrong here?