Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Timidity daemon does not start at boot

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
MartinK
Posts: 28
Joined: 2015-05-14 21:55
Location: United Kingdom

Timidity daemon does not start at boot

#1 Post by MartinK »

Debian 9, stretch. To troubleshoot a sound problem I stopped the timidity service that was loading at system boot then ran timidity interactively from the console. After getting midi files playing as I wanted I have tried to restart timidity from boot, no go.

In the journal I see;

Code: Select all

sudo journalctl -u timidity

-- Logs begin at Tue 2018-01-23 14:49:46 GMT, end at Tue 2018-01-23 14:54:59 GMT. --
Jan 23 14:49:47 nuc7i5 systemd[1]: Starting LSB: start and stop timidity...
Jan 23 14:49:47 nuc7i5 timidity[463]: Starting TiMidity++ ALSA midi emulation....
Jan 23 14:49:47 nuc7i5 systemd[1]: Started LSB: start and stop timidity.
Jan 23 14:49:47 nuc7i5 pulseaudio[495]: [autospawn] core-util.c: Home directory not accessible: Permission denied
Jan 23 14:49:47 nuc7i5 pulseaudio[495]: [autospawn] lock-autospawn.c: Cannot access autospawn lock.
I also get the first autospawn message on a parallel system that works as expected, so that is not the cause of the problem.

Does the second autospawn message suggest a lock file has been created while running timidity from the command prompt that now stops autoloading of the service at boot?

Using systemctl from the command prompt I can stop timidity, start it, and see the daemon then running.

systemctl enable and disable generate the following "not a native service" response however.

Code: Select all

sudo systemctl enable timidity

timidity.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable timidity
A service managed with systemctl is not a systemd service?

The problem is that after boot systemctl reports the service as active but the daemon is not running.

Code: Select all

systemctl status timidity

● timidity.service - LSB: start and stop timidity
   Loaded: loaded (/etc/init.d/timidity; generated; vendor preset: enabled)
   Active: active (exited) since Tue 2018-01-23 14:49:47 GMT; 16min ago
     Docs: man:systemd-sysv-generator(8)
    Tasks: 0 (limit: 4915)
   CGroup: /system.slice/timidity.service
After stopping the service, then starting it, this is what I see, all good.

Code: Select all

 systemctl status timidity

● timidity.service - LSB: start and stop timidity
   Loaded: loaded (/etc/init.d/timidity; generated; vendor preset: enabled)
   Active: active (running) since Tue 2018-01-23 15:14:33 GMT; 6s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 1311 ExecStop=/etc/init.d/timidity stop (code=exited, status=0/SUCCES
  Process: 1325 ExecStart=/etc/init.d/timidity start (code=exited, status=0/SUCC
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/timidity.service
           └─1335 /usr/bin/timidity -Os -iAD
And the journal shows the changes. Note that no running timidity was found but if I don't run 'stop' first, 'start' doesn't work.

Code: Select all

sudo journalctl -u timidity

-- Logs begin at Tue 2018-01-23 14:49:46 GMT, end at Tue 2018-01-23 15:24:38 GMT. --
Jan 23 14:49:47 nuc7i5 systemd[1]: Starting LSB: start and stop timidity...
Jan 23 14:49:47 nuc7i5 timidity[463]: Starting TiMidity++ ALSA midi emulation....
Jan 23 14:49:47 nuc7i5 systemd[1]: Started LSB: start and stop timidity.
Jan 23 14:49:47 nuc7i5 pulseaudio[495]: [autospawn] core-util.c: Home directory not accessible: Permission denied
Jan 23 14:49:47 nuc7i5 pulseaudio[495]: [autospawn] lock-autospawn.c: Cannot access autospawn lock.
Jan 23 15:14:25 nuc7i5 systemd[1]: Stopping LSB: start and stop timidity...
Jan 23 15:14:25 nuc7i5 timidity[1311]: Stopping TiMidity++ ALSA midi emulation...No timidity found running; none killed.
Jan 23 15:14:25 nuc7i5 timidity[1311]: .
Jan 23 15:14:25 nuc7i5 systemd[1]: Stopped LSB: start and stop timidity.
Jan 23 15:14:33 nuc7i5 systemd[1]: Starting LSB: start and stop timidity...
Jan 23 15:14:33 nuc7i5 timidity[1325]: Starting TiMidity++ ALSA midi emulation....
Jan 23 15:14:33 nuc7i5 systemd[1]: Started LSB: start and stop timidity.
If you made it this far, any suggestions on how to restore this as the default after boot? systemctl enable does not work. There are references to pulseaudio being involved.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Timidity daemon does not start at boot

#2 Post by bw123 »

It looks like there are bug reports about this already. There could be workarounds in the reports.
http://bugs.debian.org/timidity and timidity-daemon

It doesn't seem to have a service file in the timidity or the daemon pkgs. You could make one yourself or maybe import one from an upstream pkg if there is one.

I'm not real experienced with systemd, but I'm not totally surprised that you can't enable a auto-generated sysV initscript service. Maybe if you stop, disable, unmask, then enable in that order you can fix it. I think it's sort of a kludge the way systemd generates services like this.

Other than that, I don't know. How about purging and reinstalling the pkg, saving any configuration you have done?
resigned by AI ChatGPT

MartinK
Posts: 28
Joined: 2015-05-14 21:55
Location: United Kingdom

Re: Timidity daemon does not start at boot

#3 Post by MartinK »

Thanks for pointing me at the (long) list of bugs. There are items in there which overlap with what I am seeing.

I tried a complete removal of the timidity and timidity-daemon packages, followed by re-installation to see if restoring scripts in the packages would fix the problem. It did not. Whatever has happened is external to the packages.

I have a working system for comparison so it will be possible to find the difference - eventually. I would rather not do that by hand!

At least I can start the service manually. Some comfort while I brush up on systemd/non-native services.

Post Reply