9-Stream How to enable pipewire audio (was about no sound on Intel)

Issues related to hardware problems
Post Reply
dufresnep
Posts: 3
Joined: 2022/06/01 12:22:36

9-Stream How to enable pipewire audio (was about no sound on Intel)

Post by dufresnep » 2022/06/01 12:39:06

Looks like pipewire packages are installed, but not enabled, making it probably no sound on any hardware.
I enabled it with: (type what comes after the $ character... not including the $)

Code: Select all

$ systemctl --user enable pipewire
$ systemctl --user enable pipewire-pulse
$ systemctl --user enable wireplumber
$ systemctl --user enable pipewire.socket
$ systemctl --user enable pipewire-pulse.socket
$ systemctl reboot
pipewire and pipewire-pulse (without the .socket) lines might not be necessary (should be activated by using sockets I think). Hopefully after reboot, you will have sound.

What follows was my original question.

Sound works in most distributions out of the box.
Output is from VGA cable connected to Prime H310M-C R2.0 motherboard... no graphics card connected.
Sound speakers connected to green plug on the motherboard.

Gnome paramaters sound show no output devices.
Test button shows test of (null).

Code: Select all

[paul@localhost Téléchargements]$ LANG=C aplay piano2.wav 
aplay: main:831: audio open error: Host is down
[paul@localhost Téléchargements]$ 
should have used LANG=C in next line, but that not seems a problem.

Code: Select all

[paul@localhost ~]$ lang=C aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
pipewire
    PipeWire Sound Server
default
    Default ALSA Output (currently PipeWire Media Server)
sysdefault:CARD=PCH
    HDA Intel PCH, ALC887-VD Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    Front output / input
surround21:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
hdmi:CARD=PCH,DEV=0
    HDA Intel PCH, HDMI 0
    HDMI Audio Output
hdmi:CARD=PCH,DEV=1
    HDA Intel PCH, HDMI 1
    HDMI Audio Output
[paul@localhost ~]$ 

Code: Select all

[paul@localhost ~]$ LANG=C aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
[paul@localhost ~]$ 

Code: Select all

lspci -nnv shows among others:
00:1f.3 Audio device [0403]: Intel Corporation 200 Series PCH HD Audio [8086:a2f0]
	DeviceName: Onboard - Sound
	Subsystem: ASUSTeK Computer Inc. Device [1043:86c7]
	Flags: bus master, fast devsel, latency 32, IRQ 129
	Memory at f7120000 (64-bit, non-prefetchable) [size=16K]
	Memory at f7100000 (64-bit, non-prefetchable) [size=64K]
	Capabilities: <access denied>
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel

Code: Select all

[paul@localhost ~]$ lsmod | grep -i snd
snd_hda_codec_hdmi     73728  1
snd_hda_codec_realtek   159744  1
snd_hda_codec_generic    98304  1 snd_hda_codec_realtek
ledtrig_audio          16384  1 snd_hda_codec_generic
snd_hda_intel          57344  1
snd_intel_dspcfg       28672  1 snd_hda_intel
snd_intel_sdw_acpi     20480  1 snd_intel_dspcfg
snd_hda_codec         176128  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
snd_hda_core          110592  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
snd_hwdep              16384  1 snd_hda_codec
snd_seq                86016  0
snd_seq_device         16384  1 snd_seq
snd_pcm               147456  4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
snd_timer              49152  2 snd_seq,snd_pcm
snd                   114688  12 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm
soundcore              16384  1 snd
[paul@localhost ~]$ 
Any idea what I should try?
Last edited by dufresnep on 2022/06/03 02:14:47, edited 7 times in total.

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Intel [8086:a2f0] no sound (redirected to HDMI?)

Post by TrevorH » 2022/06/01 13:52:28

aplay: main:831: audio open error: Host is down
Have you perhaps removed the line from the firewall rules that allows all traffic on the localhost 'lo' interface?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

dufresnep
Posts: 3
Joined: 2022/06/01 12:22:36

Re: Intel [8086:a2f0] no sound (redirected to HDMI?)

Post by dufresnep » 2022/06/01 14:38:17

It is a freshly installed Centos Stream 9... but I have chosen something like basic linux security while installing... so it might be because of that.

Meanwhile I discovered that I can play wav file with:
[paul@localhost Téléchargements]$ aplay -D sysdefault piano2.wav
Lecture WAVE 'piano2.wav' : Signed 16 bit Little Endian, Fréquence 48000 Hz, Stéréo

But:
[paul@localhost Téléchargements]$ LANG=C aplay -D default piano2.wav
aplay: main:831: audio open error: Host is down

so seems problem is related to Pipewire... that I got:

Code: Select all

[paul@localhost ~]$ sudo yum list installed | grep pipewire
[sudo] Mot de passe de paul : 
pipewire.x86_64                                  0.3.47-2.el9                     @AppStream
pipewire-alsa.x86_64                             0.3.47-2.el9                     @AppStream
pipewire-gstreamer.x86_64                        0.3.47-2.el9                     @AppStream
pipewire-jack-audio-connection-kit.x86_64        0.3.47-2.el9                     @AppStream
pipewire-libs.x86_64                             0.3.47-2.el9                     @AppStream
pipewire-pulseaudio.x86_64                       0.3.47-2.el9                     @AppStream
pipewire-utils.x86_64                            0.3.47-2.el9                     @AppStream
[paul@localhost ~]$ 
I have tried:

Code: Select all

sudo systemctl stop firewalld
and then

Code: Select all

aplay -D default piano2.wav 
is still failing.

I don't see a pipewire service with:

Code: Select all

systemctl list-units|grep -i pipewire
but I have:

Code: Select all

[paul@localhost ~]$ ls -l /usr/lib/systemd/user/pipewire.service 
-rw-r--r--. 1 root root 1002 11 mar 04:04 /usr/lib/systemd/user/pipewire.service
[paul@localhost ~]$ 
Oh, I have done:

Code: Select all

$ systemctl --user start pipewire
and now:

Code: Select all

[paul@localhost Téléchargements]$ systemctl --user list-units | grep -i pipewire  pipewire.service                                                                                           loaded active running PipeWire Multimedia Service
  pipewire.socket                                                                                            loaded active running PipeWire Multimedia System Socket
[paul@localhost Téléchargements]$ aplay piano2.wav 
Lecture WAVE 'piano2.wav' : Signed 16 bit Little Endian, Fréquence 48000 Hz, Stéréo
but it hangs there, not really playing it.

and:

Code: Select all

[paul@localhost Téléchargements]$ LANG=C sudo systemctl --user enable pipewire
Failed to connect to bus: No medium found
[paul@localhost Téléchargements]$ 
but works without sudo:

Code: Select all

[paul@localhost Téléchargements]$ LANG=C systemctl --user enable pipewire
Created symlink /home/paul/.config/systemd/user/default.target.wants/pipewire.service -> /usr/lib/systemd/user/pipewire.service.
Created symlink /home/paul/.config/systemd/user/sockets.target.wants/pipewire.socket -> /usr/lib/systemd/user/pipewire.socket.
[paul@localhost Téléchargements]$ 
will reboot to see it it

After reboot:

Code: Select all

[paul@localhost ~]$ systemctl --user list-units|grep -i pipewire
  pipewire.service                                                                                           loaded active running PipeWire Multimedia Service
  pipewire.socket                                                                                            loaded active running PipeWire Multimedia System Socket
[paul@localhost ~]$ LANG=C aplay Téléchargements/piano2.wav 
Playing WAVE 'Téléchargements/piano2.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
but not really playing... hanging there. Also sound not more in Gnome output device (still null device).

I know the sound works well under Fedora 36... might try to download and try Fedora 34 (which Centos stream 9 is based on I think).

On Fedora 36 I have pipewire-pulse service:

Code: Select all

[paul@fedora ~]$ systemctl --user list-units|grep -i pipewire
  pipewire-pulse.service                                                                                     loaded active running PipeWire PulseAudio
  pipewire.service                                                                                           loaded active running PipeWire Multimedia Service
  pipewire-pulse.socket                                                                                      loaded active running PipeWire PulseAudio
  pipewire.socket                                                                                            loaded active running PipeWire Multimedia System Socket
[paul@fedora ~]$ 
Downloading https://muug.ca/mirror/fedora/linux/rel ... 34-1.2.iso to test it... that said this is the workstation one... Fedora 34 sournd works out of the box. I can break it with "systemctl --user stop pipewire-pulseaudio.socket" and "systemctl --user stop pipewire-pulseaudio.service" and fixed it, again in Fedora 34 Live with "systemctl --user start pipewire-pulseaudio.socket" ... but starting the service and socket on Centos Stream 9 does not help:

Code: Select all

[paul@localhost ~]$ systemctl --user list-units|grep -i pipewire
  pipewire-pulse.service                                                                                     loaded active running PipeWire PulseAudio
  pipewire.service                                                                                           loaded active running PipeWire Multimedia Service
  pipewire-pulse.socket                                                                                      loaded active running PipeWire PulseAudio
  pipewire.socket                                                                                            loaded active running PipeWire Multimedia System Socket
[paul@localhost ~]$ aplay Téléchargements/piano2.wav 
Lecture WAVE 'Téléchargements/piano2.wav' : Signed 16 bit Little Endian, Fréquence 48000 Hz, Stéréo
still hanging and sound did not appeared in Gnome like it would in Fedora 34 Workstation.

dufresnep
Posts: 3
Joined: 2022/06/01 12:22:36

Re: How to enable pipewire audio (was about no sound on Intel)

Post by dufresnep » 2022/06/03 02:05:04

Looks like pipewire packages are installed, but not enabled, making it probably no sound on any hardware.
I enabled it with: (type what comes after the $ character... not including the $)

Code: Select all

$ systemctl --user enable pipewire
$ systemctl --user enable pipewire-pulse
$ systemctl --user enable wireplumber
$ systemctl --user enable pipewire.socket
$ systemctl --user enable pipewire-pulse.socket
$ systemctl reboot
pipewire and pipewire-pulse (without the .socket) lines might not be necessary (should be activated by using sockets I think). Hopefully after reboot, you will have sound.

Post Reply