# Problem with computer startup and sounds not being heard

**URL:** <https://discourse.nodered.org/t/problem-with-computer-startup-and-sounds-not-being-heard/81252>\
**Category:** General\
**Created:** [12 September 2023 20:50 UTC](https://discourse.nodered.org/t/problem-with-computer-startup-and-sounds-not-being-heard/81252 "2023-09-12T20:50:39Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [12 September 2023 20:50 UTC](https://discourse.nodered.org/t/problem-with-computer-startup-and-sounds-not-being-heard/81252/1 "2023-09-12T20:50:39Z")

</div>

With all the other questions I'm asking, I've just noticed a possible problem with `inject` nodes and `inject on strat up`.

I have an `inject` node set to inject on startup to simply say "Hello there" for me.  
Yes, it uses WATSON's speech node.

But I just booted about 49 minutes ago and it didn't say anything to me.

I'll do some more digging, but as _you_ may know that my problems don't go away until I've made a fool of myself asking a question before they suddenly start to work.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [13 September 2023 01:02 UTC](https://discourse.nodered.org/t/problem-with-computer-startup-and-sounds-not-being-heard/81252/2 "2023-09-13T01:02:40Z")

</div>

On what platform? A Pi? I would guess that Node-RED starts up before ALSA does. So it probably runs but you don't get the sound output.

You should be able to adjust the Node-RED systemd startup and make it depend on ALSA's startup. Or simply experiment with some delays until the sound happens.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [13 September 2023 08:41 UTC](https://discourse.nodered.org/t/problem-with-computer-startup-and-sounds-not-being-heard/81252/3 "2023-09-13T08:41:44Z")

</div>

Sorry.

No the machine in question is an Intel NUC. (Main machine)

I extended the delay to `40` seconds and I am still not hearing anything.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [13 September 2023 09:35 UTC](https://discourse.nodered.org/t/problem-with-computer-startup-and-sounds-not-being-heard/81252/4 "2023-09-13T09:35:25Z")

</div>

Feed the output of the inject node into a debug node set to output to the console, then you can check in the startup log whether the inject does appear.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [13 September 2023 09:36 UTC](https://discourse.nodered.org/t/problem-with-computer-startup-and-sounds-not-being-heard/81252/5 "2023-09-13T09:36:49Z")

</div>

So that will work?

Ok, thanks.

That is from a COLD start it will work?

Oh, `console`.... That's the log. Sorry. `console` and `log`. To me they are different.  
So that is the node-red log - of course (again just wanna check.)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [13 September 2023 09:51 UTC](https://discourse.nodered.org/t/problem-with-computer-startup-and-sounds-not-being-heard/81252/6 "2023-09-13T09:51:33Z")

</div>

Instead of asking you would have been quicker to wire an inject node to a debug node configured like that, click the inject node and see if it appears in the log.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [13 September 2023 09:54 UTC](https://discourse.nodered.org/t/problem-with-computer-startup-and-sounds-not-being-heard/81252/7 "2023-09-13T09:54:56Z")

</div>

but it is on BOOT from COLD START.

Once booted it works fine - by the way.

Would that work?  
And as I said: `console` and `log` to me are very different things.  
But now I know and I hope I remember.

(The fun I had getting the time to be given to me with day and month name. That was fun.)

Where is the log file saved?  
The only one I have _documented_ is `/var/log/nodered-install.log` and that is for INSTALLING - isn't it?  
Not the _day to day_ happenings.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [13 September 2023 10:25 UTC](https://discourse.nodered.org/t/problem-with-computer-startup-and-sounds-not-being-heard/81252/8 "2023-09-13T10:25:19Z")

</div>

You were asking whether output to the console goes to the node red log, you could easily have tested that.  
For cold boot you can look back in syslog or you can use journalctl with appropriate parameters.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [13 September 2023 10:27 UTC](https://discourse.nodered.org/t/problem-with-computer-startup-and-sounds-not-being-heard/81252/9 "2023-09-13T10:27:38Z")

</div>

Yeah, I kind of worked that out now.

LOGS are still another world to me. Paths, and all that.  
But now I found the `journalctl ......` I can see the log.  
Then I look for what I want.

Thanks.

That will be looked at after next boot.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [13 September 2023 20:21 UTC](https://discourse.nodered.org/t/problem-with-computer-startup-and-sounds-not-being-heard/81252/10 "2023-09-13T20:21:04Z")

</div>

This morning:

```auto
sudo journalctl -r -u nodered | grep hello
[sudo] password for me: 
Sep 14 06:18:20 me-desktop Node-RED[1431]: 14 Sep 06:18:20 - [info] [debug:42940cf3.2c0a64] hello there

```

So it is being injected.

But I am not hearing any result.

Note: This is done `40` seconds after boot.  
Increased to 120 seconds. Shall report what happens next time I boot the machine.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [13 September 2023 21:00 UTC](https://discourse.nodered.org/t/problem-with-computer-startup-and-sounds-not-being-heard/81252/11 "2023-09-13T21:00:25Z")

</div>

So the inject is firing, you need to change the thread title.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [13 September 2023 21:06 UTC](https://discourse.nodered.org/t/problem-with-computer-startup-and-sounds-not-being-heard/81252/12 "2023-09-13T21:06:47Z")

</div>

So just checked `/var/log/daemon.log` on my home server (debian buster). Node-RED started at

```auto
Sep 13 12:45:15 home NRMAIN[846]: 13 Sep 12:45:15 - [info] Settings file

```

ALSA finished starting at:

```auto
Sep 13 12:41:30 home alsactl[805]: alsactl 1.1.8 daemon started

```

So that was about a 4 minute difference! Slow startup on the old laptop. But then I have network and InfluxDB dependencies set on my Node-RED startup so it can't get going until those are loaded fully and InfluxDB does take quite a while to start up.

But of course, if you have anything like an external (USB) sound-card or anything like that, USB takes quite a while to start as well.

Anyway, trawl through that log file - find your debug output and work out if there is anything not yet started.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [13 September 2023 21:13 UTC](https://discourse.nodered.org/t/problem-with-computer-startup-and-sounds-not-being-heard/81252/13 "2023-09-13T21:13:17Z")

</div>

Thanks.

I wasn't meaning to sound like I am still complaining. I was only posting an update.

Yes, 40 seconds was (maybe) too quick.

I've increased it to 120 and shall see what happens next time.

Alas - of course - just now I am having other problems with the NUC.  
(flat/low CMOS battery.)

When is/done NR start?  
Obviously not at the immediate power on. It too has to be loaded/started.  
So from when I see the Ubuntu splash screen to when the GUI is loaded doesn't seem to be 40 seconds.  
But anyway.... I've now made it long enough that I should hear "hello there" next time I boot the computer.

Just checking also:  
the `journalctl` is the one to see the log for NR stuff.  
There is NOT a separate one that node red has other than the install log - which is of no use in this case.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [13 September 2023 21:20 UTC](https://discourse.nodered.org/t/problem-with-computer-startup-and-sounds-not-being-heard/81252/14 "2023-09-13T21:20:04Z")

</div>

> [@Trying\_to\_learn](#):
>
> the `journalctl` is the one to see the log for NR stuff.  
> There is NOT a separate one that node red has other than the install log - which is of no use in this case.

journalctl typically does not write to disk. As I say, if you check the `/var/log/daemon.log` file, you will see all of the systemd startups and the Node-RED output in one place so you can check comparative times.

> [@Trying\_to\_learn](#):
>
> Obviously not at the immediate power on.

I can't remember exactly but I think that Dave's script installs a systemd script that only waits for the network. My own script waits for InfluxDB as well which takes a lot longer, especially on my old laptop which just has its built-in HDD spinning rust.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [14 September 2023 03:46 UTC](https://discourse.nodered.org/t/problem-with-computer-startup-and-sounds-not-being-heard/81252/15 "2023-09-14T03:46:56Z")

</div>

> [@TotallyInformation](#):
>
> journalctl typically does not write to disk

That isn't too much of a worry.

So long as I remember after the machine boots to look at the file.  
Then look for the _flags_ that the message is getting through.

(Sorry, forgot)

Booted.  
120 second delay.

No sound/voice heard.  
☹  
Longer again.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [14 September 2023 04:55 UTC](https://discourse.nodered.org/t/problem-with-computer-startup-and-sounds-not-being-heard/81252/16 "2023-09-14T04:55:09Z")

</div>

Ok, sorry, thought:

How can I learn to make my installation wait for the ALSA (sound) device to be ready?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [14 September 2023 06:14 UTC](https://discourse.nodered.org/t/problem-with-computer-startup-and-sounds-not-being-heard/81252/17 "2023-09-14T06:14:41Z")

</div>

If you click the inject after it is all up and running, does it work as expected?

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [14 September 2023 06:18 UTC](https://discourse.nodered.org/t/problem-with-computer-startup-and-sounds-not-being-heard/81252/18 "2023-09-14T06:18:13Z")

</div>

Yes.

I hear the _sound_. (voice to txt).

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [14 September 2023 06:27 UTC](https://discourse.nodered.org/t/problem-with-computer-startup-and-sounds-not-being-heard/81252/19 "2023-09-14T06:27:41Z")

</div>

Ok, so it is just a matter of waiting long enough.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [14 September 2023 06:29 UTC](https://discourse.nodered.org/t/problem-with-computer-startup-and-sounds-not-being-heard/81252/20 "2023-09-14T06:29:41Z")

</div>

Yes.

I am now waiting 180 seconds - not as yet tested.

It just doesn't seem believable it takes 3 minutes for NR to get itself together before it is working.

[Next page](https://discourse.nodered.org/t/problem-with-computer-startup-and-sounds-not-being-heard/81252.md?page=2)
