Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] Help with audio ALSA/Pipewire  (Read 7125 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

[SOLVED] Help with audio ALSA/Pipewire

Hello,

This is my first time setting up artix base, so please bear with me and help me to try this promising distro.

I'm running on a Lenovo T14 Gen2 AMD. For some reason I don't have audio at all, when I try to start pipewire I get errors, which made me go a layer down to ALSA and run some tests which made me realize that audio is not working at all. I will try to deal with pipewire issues after resolving ALSA, if they keep happening.

Please find some relevant outputs

Spoiler (click to show/hide)

Thanks in advance!

Re: Help with audio ALSA/Pipewire

Reply #1
Bonjour,

I had a similar problem and pulseaudio was automatically installed.

I removed the pulseaudio packages except one: libpulse.

I installed qastools which offers a nice and very practical mixer :
sudo pacman -Sy qastools

Then I listed my audio cards:
cat /proc/asound/cards
 0 [HDMI           ]: HDA-Intel - HDA ATI HDMI
                      HDA ATI HDMI at 0xfce60000 irq 96
 1 [Generic        ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xfc900000 irq 98

I created/modified  /etc/asound.conf

And added this to select card1:
defaults.pcm.card 1
defaults.ctl.card 1

Re: Help with audio ALSA/Pipewire

Reply #2
If your card isn't in ALSA wiki, it might not be supported.

In general, look in dmesg for any errors:
Code: [Select]
dmesg -l err
What are the exact errors given by Pipewire?

By the way, if you don't really need Pipewire/Pulseaudio, ALSA is enough to get the sound working (with alsamixer as sound mixer/volume control).

Re: Help with audio ALSA/Pipewire

Reply #3
Bonjour,

I had a similar problem and pulseaudio was automatically installed.

I removed the pulseaudio packages except one: libpulse.

I installed qastools which offers a nice and very practical mixer :
sudo pacman -Sy qastools

Then I listed my audio cards:
cat /proc/asound/cards
 0 [HDMI           ]: HDA-Intel - HDA ATI HDMI
                      HDA ATI HDMI at 0xfce60000 irq 96
 1 [Generic        ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xfc900000 irq 98

I created/modified  /etc/asound.conf

And added this to select card1:
defaults.pcm.card 1
defaults.ctl.card 1

Unfortunately this has not done the trick, I did not install qastools tho... let me show relevant outputs

Code: [Select]
sudo pacman -Q | grep -i pulse
[sudo] password for gforgas:
libpulse 15.0-4
pipewire-pulse 1:0.3.48-1

Code: [Select]
cat /proc/asound/cards
 0 [Generic        ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xfd3c8000 irq 89
 1 [Generic_1      ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xfd3c0000 irq 90
 2 [acp            ]: acp - acp
                      LENOVO-20XK002SMH-ThinkPadT14Gen2a

Code: [Select]
speaker-test 

speaker-test 1.2.6

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Playback open error: -112,Host is down


Re: Help with audio ALSA/Pipewire

Reply #4
If your card isn't in ALSA wiki, it might not be supported.

In general, look in dmesg for any errors:
Code: [Select]
dmesg -l err
What are the exact errors given by Pipewire?

By the way, if you don't really need Pipewire/Pulseaudio, ALSA is enough to get the sound working (with alsamixer as sound mixer/volume control).

Code: [Select]
sudo dmesg -l err
[    2.233001] Bluetooth: hci0: Failed to read codec capabilities (-22)

Reading Gentoo's wiki for ALSA (because OpenRC), I see I don't have the alsa service on boot, and when I try to add it it's not found... alsa-utils is installed.

Code: [Select]
rc-update add alsasound boot
 * rc-update: service `alsasound' does not exist

Output errors from pipewire as requested

Code: [Select]
sudo /usr/bin/pipewire
[E][02513.510881] mod.protocol-native | [module-protocol-:  616 init_socket_name()] server 0x55d7f8a913d0: name pipewire-0 is not an absolute path and no runtime dir found. Set one of PIPEWIRE_RUNTIME_DIR, XDG_RUNTIME_DIR or USERPROFILE in the environment
[E][02513.510905] pw.conf      | [          conf.c:  560 load_module()] 0x55d7f8a75ec0: could not load mandatory module "libpipewire-module-protocol-native": No such file or directory
[E][02513.510968] default      | [      pipewire.c:  123 main()] failed to create context: No such file or directory

Code: [Select]
sudo /usr/bin/pipewire-media-session 
[E][02577.518383] ms.core      | [ media-session.c: 2141 start_session()] can't start monitor: Host is down

Code: [Select]
sudo /usr/bin/pipewire-pulse
[E][02605.863508] mod.protocol-pulse | [         utils.c:   64 get_runtime_dir()] could not find a suitable runtime directory in$PULSE_RUNTIME_PATH and $XDG_RUNTIME_DIR
[W][02605.863554] mod.protocol-pulse | [        server.c:  974 servers_create_and_start()] pulse-server 0x55ea9da7b9c0: failed to parse address 'unix:native': No such file or directory
[E][02605.863561] mod.protocol-pulse | [  pulse-server.c: 5390 pw_protocol_pulse_new()] 0x55ea9da7b9c0: no servers could be started: No such file or directory
[E][02605.863601] pw.conf      | [          conf.c:  560 load_module()] 0x55ea9da3dec0: could not load mandatory module "libpipewire-module-protocol-pulse": No such file or directory
[E][02605.863674] default      | [      pipewire.c:  123 main()] failed to create context: No such file or directory

My understanding is that Pipewire errors (especially media-session and pulse?) are irrelevant since the backend ALSA is not even working yet. Let me know if I'm wrong.

any ideas, folks?

thx for your time!

Re: Help with audio ALSA/Pipewire

Reply #5
Reading Gentoo's wiki for ALSA (because OpenRC), I see I don't have the alsa service on boot, and when I try to add it it's not found... alsa-utils is installed.

Code: [Select]
rc-update add alsasound boot
 * rc-update: service `alsasound' does not exist
In Artix, for any service you need two packages installed: service and service-yourinit. Here, alsa-utils-openrc.

Code: [Select]
sudo /usr/bin/pipewire
[E][02513.510881] mod.protocol-native | [module-protocol-:  616 init_socket_name()] server 0x55d7f8a913d0: name pipewire-0 is not an absolute path and no runtime dir found. Set one of PIPEWIRE_RUNTIME_DIR, XDG_RUNTIME_DIR or USERPROFILE in the environment
[E][02513.510905] pw.conf      | [          conf.c:  560 load_module()] 0x55d7f8a75ec0: could not load mandatory module "libpipewire-module-protocol-native": No such file or directory
[E][02513.510968] default      | [      pipewire.c:  123 main()] failed to create context: No such file or directory
Read the wiki. You should start Pipewire as ordinary user, not root.

 

Re: Help with audio ALSA/Pipewire

Reply #6
In Artix, for any service you need two packages installed: service and service-yourinit. Here, alsa-utils-openrc.
Read the wiki. You should start Pipewire as ordinary user, not root.

thanks for your reply!  I completely missed the openrc package for alsa-utils, what would be the best way you suggest to check for openrc service based packages with artix? using pacman -Q doesn't return the alsa-utils-openrc

Regarding pipewire (I've read the wiki before) I was starting it as root because it gives less errors... here you go as non elevated user.

Code: [Select]
/usr/bin/pipewire
[W][00582.802991] mod.rt       | [     module-rt.c:  224 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][00582.803046] mod.rt       | [     module-rt.c:  526 set_nice()] could not set nice-level to -11: No such file or directory
[W][00582.803279] mod.rt       | [     module-rt.c:  224 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][00582.806604] mod.rt       | [     module-rt.c:  224 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][00582.806727] mod.rt       | [     module-rt.c:  224 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][00582.806737] mod.rt       | [     module-rt.c:  716 impl_acquire_rt()] could not make thread 9130 realtime using RTKit: No such file or directory

Re: Help with audio ALSA/Pipewire

Reply #7
thanks for your reply!  I completely missed the openrc package for alsa-utils, what would be the best way you suggest to check for openrc service based packages with artix? using pacman -Q doesn't return the alsa-utils-openrc
Code: [Select]
pacman -Ss openrc | less
https://wiki.archlinux.org/title/Pacman

Code: [Select]
/usr/bin/pipewire
[W][00582.802991] mod.rt       | [     module-rt.c:  224 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][00582.803046] mod.rt       | [     module-rt.c:  526 set_nice()] could not set nice-level to -11: No such file or directory
[W][00582.803279] mod.rt       | [     module-rt.c:  224 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][00582.806604] mod.rt       | [     module-rt.c:  224 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][00582.806727] mod.rt       | [     module-rt.c:  224 translate_error()] RTKit error: org.freedesktop.DBus.Error.ServiceUnknown
[W][00582.806737] mod.rt       | [     module-rt.c:  716 impl_acquire_rt()] could not make thread 9130 realtime using RTKit: No such file or directory
Have you configured Pipewire configuration files?


Re: Help with audio ALSA/Pipewire

Reply #9
Issue fixed, there was a permission issue going on, also installed libpipewire02, not sure if that helped but I have sound going on now.

Also as a side note, I was starting pipewire via .xinitrc and I accidentally added the pipewire lines after my window manager, which is a mistake, hope this helps some newbie else :)

I'm marking this as solved, thanks for your help!