LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-17-2023, 05:50 PM   #31
selfprogrammed
Member
 
Registered: Jan 2010
Location: Minnesota, USA
Distribution: Slackware 13.37, 14.2, 15.0
Posts: 635

Original Poster
Rep: Reputation: 154Reputation: 154

The latest ended up being done in two steps because the changes to Pulse config to comment out choosing ALSA as sink, did not get saved the first time.

1. The pulse daemons are gone, all of them, since when pipewire-enable got executed.
The change to xdg must have stopped them.
Removing the ALSA-as-sink had not got saved, so it was not done yet.

2. Second day, commented out that ALSA-as-sink line in default.pa.

3. The pulse daemon that crashed timidity at BOOT is still there the last two days. This is the original problem in the original post.
It is still intermittent, and timidity may work on some days, but the problem will be back the next day.
The error message states, that it is spawning a Pulse daemon. and it cannot connect to ALSA.

I thought that sometimes it stated that it cannot find the user directory, but that message is not there today, nor in the original posting.
It does not spawn 4 Pulse daemons, and never did.


Note: I do not doubt that the ALSA-as-sink may have spawned 4 Pulse daemons on your system, but there must be something different.
Maybe it is because you do not have Pipewire enabled ?

A. It is a mystery HOW that timidity starting up is triggering a Pulse daemon to start in the first place.
B. How is it a Pulse daemon, and not a Pipewire daemon that starts.
C. It is NOT a Pulse system daemon, it behaves like a client daemon in that it looks for the user directory.
D. The /etc/rc.d/rc.pulseaudio file is NOT EXECUTABLE.
E. Got any good ideas how to modify anything to give better information on this.

Taking out the timidity start code is NOT an option, as that does not provide any information on why this is happening with THIS Pulse setup.
It did not happen with the Linux 4.4 Pulse setup, but that has been setup as ALSA, Pulse disabled, for years.

X1. I doubt that asound.conf can be changed during boot, because I have not figured out any way to get ALSA to re-read that config file.
So changing asound.conf around timidity startup will not work, and will be very confusing.

X2. It appears that xdg is NOT working to stop Pulseaudio at boot time. This BOOT time Pulse daemon is trying to start.

X3. Corrupting the pulse config to stop the Pulse daemon will not work. Having the BOOT time pulse daemon crash does not help keep timidity running.

X4. Taking out the ALSA redirect to Pulse is an interesting option.

For the purposes of this sound setup tool, it is an admission that the ALSA redirect to Pulse is a failure. It will not work for any audio connect that does not happen after X-windows starts.
I would have to document that in the tool.

That sound setup selection would have to rely upon ALSA automatically using DMIX, and would not work on hardware where that does not happen automatically.
It is the ALSA documentation that is vague on this point, I cannot guarantee results therefore cannot trust it entirely in writing this tool.
The PULSE selection would either have to be "NO TIMIDITY" or would NOT be "Redirect ALSA through Pulse".

X5. And it comes back to the same question again. HOW is ALSA starting a PULSE daemon?
None of the X-windows support for auto-spawning a Pulse daemon is active at that time. It cannot be xdg that is spawning this BOOT time Pulse daemon. Is something being left from the last time that X-windows was running Pulse (from before Pipewire got installed) ?

Last edited by selfprogrammed; 08-17-2023 at 06:10 PM.
 
Old 08-18-2023, 11:04 AM   #32
0XBF
Member
 
Registered: Nov 2018
Distribution: Slackware
Posts: 769

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Pulseaudio is spawned by the 'pulse' plugin from the alsa-plugins package. When your default output is defined as 'pulse' in asound.rc, you will send audio to pulseaudio, and spawn a pulseaudio daemon if one is not already running. There's a bit of documentation installed at /usr/doc/alsa-plugins-1.2.5/README-pulse, or you can find it online: https://fossies.org/linux/alsa-plugins/doc/README-pulse

If you are using the pulse plugin as the default device, then the chain of events should go:
Code:
timidity -> asound.rc w pulse -> pulseaudio (spawning one if not running) -> alsa sink
Now if you break that chain by making pulseaudio unspawnable with "autospawn=no" in /etc/pulse/client.conf, then you will get errors reported at the asound.rc step.

You say you ran enable-pipewire, which would have made pulseaudio unspawnable.

The thing about pipewire, at least in slackware-15.0's version of it: it doesn't have autospawning/despawning ability. It is a dumb set of daemons that requires external daemon management tools, which are provided by the 'daemon' package in slackware. The means of starting pipewire on slackware 15.0 are through xdg autostart scripts, which will only be triggered on startup of an xdg compliant desktop environment like xfce or plasma. At boot time they will not be started, i.e. if you boot to runlevel 3 then pipewire will not be running, nor will it get autospawned by anything. I'm not sure if this is any different in -current these days, but its limited to graphical desktop use in slackware-15.0's default setup.

If you are running some kind of script out of rc.local to play a sound at boot then you'd be best off with either of the following:

1. Sticking with pulseaudio by running the 'disable-pipewire' script, with that module-alsa-sink problem cleared up, autospawning should work once re-enabled. Unlike pipewire, pulseaudio is able to autospawn when something plays audio from a boot script.

2. Not using the pulse plugin in asound.rc so timidity sends audio to alsa directly, then setting up pulseaudio as a simple pipe to alsa so that you can still use graphical desktop and browser audio.

If you need sound to play at boot time, pipewire will probably not work (at least from my experience with it).

Last edited by 0XBF; 08-18-2023 at 11:07 AM.
 
1 members found this post helpful.
Old 08-20-2023, 09:56 AM   #33
0XBF
Member
 
Registered: Nov 2018
Distribution: Slackware
Posts: 769

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Quote:
Originally Posted by 0XBF View Post
The 'hidden' syntax is covered in the "desktop entry specification". Some details are here: https://specifications.freedesktop.o...t/ar01s06.html
That reference for desktop entry 'hidden' usage is kind of trash. I was looking at the xdg autostart specification today and noticed they provided much better info. I'll quote the useful bits below:
Quote:
Originally Posted by https://specifications.freedesktop.org/autostart-spec/autostart-spec-latest.html
Hidden Key
When the .desktop file has the Hidden key set to true, the .desktop file MUST be ignored. When multiple .desktop files with the same name exists in multiple directories then only the Hidden key in the most important .desktop file must be considered: If it is set to true all .desktop files with the same name in the other directories MUST be ignored as well.

[...]

Implementation Notes

If an application autostarts by having a .desktop file installed in the system wide autostart directory, an individual user can disable the automatic start of this application by placing a .desktop file of the same name in its personal autostart directory which contains the key Hidden=true.
The enable/disable pipewire bits are just doing that system wide instead.
 
Old 08-20-2023, 10:35 AM   #34
metalforever
LQ Newbie
 
Registered: Dec 2007
Posts: 27

Rep: Reputation: 3
Pulseaudio has security issues and it needs to go.
 
Old 08-23-2023, 12:31 AM   #35
selfprogrammed
Member
 
Registered: Jan 2010
Location: Minnesota, USA
Distribution: Slackware 13.37, 14.2, 15.0
Posts: 635

Original Poster
Rep: Reputation: 154Reputation: 154
Thank you for the information.
As I said, this was to give PULSE the best setup that I could.
I would not be recompiling ALSA or timidity because I have other audio choices that do not need that.

I will incorporate this setup into my tool as the PULSE selection.
Personally, I will be moving on to the DMIX option, as I expect that will solve the most problems.
I may even find some solution to this problem.
I will start a new thread for problems with DMIX.

This PULSE setup does not tolerate timidity startup, as the original problem of this thread still remains.
I will leave this open in case someone with personal experience has something to relate regarding getting PulseAudio to tolerate timidity.
I do not want to try to make any more audio programs PulseAudio dependent, so will not be going with altering timidity.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] No actual sound with Pulse on bluez' "Handsfree Head Unit (HFP)", except Pulse's own sounds. Lockywolf Slackware 7 09-02-2021 01:25 AM
Pulse counter or frequency of incoming pulse train jayhorizon Programming 15 10-29-2010 04:29 AM
Errors, Errors, and more Errors (KDE 3.4.x GUI Errors) Dralnu Linux - Software 2 05-13-2006 08:30 AM
Grub errors...grub errors...grub errors smattmac Linux - Newbie 1 06-13-2005 02:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration