Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Unable to get sound working. (Read 2752 times) previous topic - next topic
0 Members and 11 Guests are viewing this topic.

Unable to get sound working.

Just did a fresh installation of Artix and decided to try out dinit. Everything works but I'm unable to get sound working. Specifically with the pipewire, wireplumber and alsa services.

When I execute `doas dinitctl enable pipewire` it showed this error
Code: [Select]
dinitctl: failed to find service description.
dinitctl: check service description file exists / service name spelling.
if I don't use doas I will get
Code: [Select]
dinitctl: connecting to socket: /run/user/1001/dinitctl: No such file or directory
dinitctl: perhaps no user instance is running?
Same problem with wireplumber.

As for alsa I couldn't find a package for the start script so I grab this from the forum
Code: [Select]
type           = scripted
command        = /usr/bin/alsactl restore
stop-command   = /usr/bin/alsactl store
restart        = false
depends-on     = local.target
before         = login.target
logfile        = /var/log/dinit/alsa.log
I was able to enable the service but it failed to start with this error
Code: [Select]
Service 'alsa' failed to start.
Reason: service process terminated before ready: exited - status 99
I can't open `alsamixer` as it will return this error
Code: [Select]
cannot open mixer: Host is down

Re: Unable to get sound working.

Reply #1
hmmm.

what does dmesg say when you try to start the alsa cllients?  Is there any indication that a kernel module failed?

Actaully, see this error?

dinitctl: connecting to socket: /run/user/1001/dinitctl: No such file or directory
dinitctl: perhaps no user instance is running?

Does that exist?  It is not lieing to you :)

Re: Unable to get sound working.

Reply #2
`dmesg` didn't show anything when I start any of those services. I couldn't find anything worth noting either. But `/var/log/dinit/alsa.log` have this
Code: [Select]
Found hardware: "acp" "" "" "" ""
Hardware is initialized using a generic method
Found hardware: "acp" "" "" "" ""
Hardware is initialized using a generic method
Found hardware: "acp" "" "" "" ""
Hardware is initialized using a generic method
Found hardware: "acp" "" "" "" ""
Hardware is initialized using a generic method
Found hardware: "acp" "" "" "" ""
Hardware is initialized using a generic method
Found hardware: "acp" "" "" "" ""
Hardware is initialized using a generic method
Found hardware: "acp" "" "" "" ""
Hardware is initialized using a generic method
Found hardware: "acp" "" "" "" ""
Hardware is initialized using a generic method
Found hardware: "acp" "" "" "" ""
Hardware is initialized using a generic method
Which might be a clue?

Re: Unable to get sound working.

Reply #3
`dmesg` didn't show anything when I start any of those services. I couldn't find anything worth noting either. But `/var/log/dinit/alsa.log` have this
Code: [Select]
Found hardware: "acp" "" "" "" ""
Hardware is initialized using a generic method
Found hardware: "acp" "" "" "" ""
Hardware is initialized using a generic method
Found hardware: "acp" "" "" "" ""
Hardware is initialized using a generic method
Found hardware: "acp" "" "" "" ""
Hardware is initialized using a generic method
Found hardware: "acp" "" "" "" ""
Hardware is initialized using a generic method
Found hardware: "acp" "" "" "" ""
Hardware is initialized using a generic method
Found hardware: "acp" "" "" "" ""
Hardware is initialized using a generic method
Found hardware: "acp" "" "" "" ""
Hardware is initialized using a generic method
Found hardware: "acp" "" "" "" ""
Hardware is initialized using a generic method
Which might be a clue?


Well that is not happy.  There is no dmesg error?  I am not a dinit expert, but obviously the hardware doesn't seem to be coming up correctly.  I am not sure what the run directory is failing to produce a needed temp directory.  I have a /run/alsasound directory ... which happens to be empty.  I am not aware that.   alsa tries to make sockets, but it is hunting for that temp directory and the package seems to have not created an entry for it to be made  on boot.

Re: Unable to get sound working.

Reply #4
Nothing at all :(((. The audio did work before I reinstalled artix. I tried making `/run/alsasound` but alsa still fail to start.

Re: Unable to get sound working.

Reply #5
Here's what happen when I use mpv
Code: [Select]
mpv https://piped.video/watch?v=b641h63lqy0
● Video  --vid=1               (h264 1920x1080 30 fps) [default]
● Audio  --aid=1  --alang=eng  (opus 2ch 48000 Hz) [default]
File tags:
 Date: 20240107
 Uploader: Vimjoyer
 Channel_URL: https://www.youtube.com/channel/UC_zBdZ0_H_jn41FDRG7q4Tw
[ao/alsa] Playback open error: Host is down
[ao/jack] cannot open server
[ALSOFT] (EE) Failed to connect PipeWire event context (errno: 112)
[ao/openal] could not open device
[ao] Failed to initialize audio driver 'openal'
Could not open/initialize audio device -> no sound.
Audio: no audio
VO: [gpu] 1920x1080 yuv420p


Re: Unable to get sound working.

Reply #7
I suggest a couple of things.

Look in dmesg output for errors setting up the soundcard.
Alsa is part of the kernel and doesn't need an init service to start. The alsa init service files are just about volume levels.
There's a possibility alsa may need a kernel module loading but that's unlikely imho.

Install alsa-utils
As root or with doas run alsa-info.sh
Post the content of the file it generates.
You may need to pastebin it or attach it as it will be a lot.

Re: Unable to get sound working.

Reply #8
I also use dinit (xfce) and had some problems with pipewire, but that's because i installed it manually. In the end i just removed everything and went back to Pulse Audio, which while not perfect, at least works well enough.

I have a few questions. What DE (if any) are you using? Did it come with pipewire to begin with? Also, did "doas" come installed on your chosen artix  version, or did you install yourself? Have you tried sudo? (assuming you haven't completely removed it, which is possibly not a good thing to do unless you're up to the task).


Re: Unable to get sound working.

Reply #9
Turns out I didn't configure dinit's boot service properly as shown here. After doing that and rebooting, things just works :).

Thank you for the help guys.

 

Re: Unable to get sound working.

Reply #10
What DE (if any) are you using? Did it come with pipewire to begin with? Also, did "doas" come installed on your chosen artix  version, or did you install yourself? Have you tried sudo? (assuming you haven't completely removed it, which is possibly not a good thing to do unless you're up to the task).
I installed bare artix-dinit and am using hyprland. I prefer doas and set it up for myself. I have removed sudo which has no affect on the system so far.