reith n00b
Joined: 13 Nov 2015 Posts: 20
|
Posted: Sun Jan 26, 2025 3:33 am Post subject: [SOLVED] No audio playback (except for HDMI) from pipewire |
|
|
I'm trying to use pipewire as the sound server for pulse audio. While I can get audio from HDMI, it doesn't work for the onboard intel card. I'm not sure if it's pipewire to blame but I was able to get the audio from the same pulseaudio profile before I switched to pipewire.
Code: |
$ emerge -pv --nodeps pipewire libpulse pulseaudio pulseaudio-daemon alsa-plugins rtkit
[binary R ] media-video/pipewire-1.2.7-r1:0/0.4::gentoo USE="dbus readline sound-server ssl -X -bluetooth -doc -echo-cancel -elogind -extra -ffmpeg -flatpak -gsettings -gstreamer -ieee1394 -jack-client -jack-sdk -liblc3 -lv2 -man -modemmanager -pipewire-alsa -roc (-selinux) (-system-service) -systemd -test -v4l -zeroconf" ABI_X86="(64) -32 (-x32)" 0 KiB
[binary R ] media-libs/libpulse-17.0::gentoo USE="X asyncns glib -dbus -doc -gtk (-selinux) -systemd -test -valgrind" ABI_X86="(64) -32 (-x32)" 0 KiB
[binary R ] media-sound/pulseaudio-16.1::gentoo USE="glib -bluetooth -daemon -jack -ofono-headset" ABI_X86="(64) -32 (-x32)" 0 KiB
[binary N ] media-sound/pulseaudio-daemon-17.0-r1::gentoo USE="X alsa alsa-plugin asyncns gdbm glib orc ssl udev webrtc-aec -aptx -bluetooth -dbus -elogind -equalizer -fftw -gstreamer -jack -ldac -lirc -ofono-headset (-oss) (-selinux) -sox (-system-wide) -systemd -tcpd -test -valgrind -zeroconf" 0 KiB
[binary R ] media-plugins/alsa-plugins-1.2.12::gentoo USE="mix pulseaudio usb_stream -arcam_av -debug -ffmpeg -jack -libsamplerate -oss -speex" ABI_X86="(64) -32 (-x32)" 0 KiB
[binary R ] sys-auth/rtkit-0.13-r2::gentoo USE="(-selinux) -systemd" 0 KiB |
media-sound/pulseaudio-daemon is not installed.
The sound cards:
Code: |
card 0: PCH [HDA Intel PCH], device 0: Generic Analog [Generic Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: Generic Digital [Generic Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 3: HDMI 0 [LG HDR 4K]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
Subdevices: 1/1
Subdevice #0: subdevice #0
|
And according to Pulseaudio:
Code: |
$ pactl list cards | egrep Card\|alsa.card_name\|Name
Card #50
Name: alsa_card.pci-0000_01_00.1
alsa.card_name = "HDA NVidia"
Card #51
Name: alsa_card.pci-0000_00_03.0
alsa.card_name = "HDA Intel HDMI"
Card #52
Name: alsa_card.pci-0000_00_1b.0
alsa.card_name = "HDA Intel PCH"
|
Trying HDMI:
Code: |
$ pactl set-card-profile alsa_card.pci-0000_00_03.0 output:hdmi-stereo
$ pactl set-card-profile alsa_card.pci-0000_00_1b.0 off
$ gentoo-pipewire-launcher restart
|
`mpv --ao=pulse file.wav` produces the sound. (mv -ao=alsa would also work, thanks to `alsa-plugins[pulseaudio]`) . The output of `wpctl status` would be like:
Code: |
PipeWire 'pipewire-0' [1.2.7]
└─ Clients:
32. pipewire
42. mpv
46. WirePlumber [export]
47. i3status
60. wpctl
Audio
├─ Devices:
│ 48. GK208 HDMI/DP Audio Controller [alsa]
│ 49. Built-in Audio [alsa]
│ 50. Built-in Audio [alsa]
│
├─ Sinks:
│ * 54. Built-in Audio Digital Stereo (HDMI) [vol: 1.00]
│
├─ Sources:
│
├─ Filters:
│
└─ Streams:
55. mpv
56. output_FL > LG HDR 4K:playback_FL [active]
57. output_FR > LG HDR 4K:playback_FR [active]
Settings
└─ Default Configured Devices:
|
Switching to the Intel card:
Code: |
$ pactl set-card-profile alsa_card.pci-0000_00_03.0 off
$ pactl set-card-profile alsa_card.pci-0000_00_1b.0 output:analog-stereo
|
`mpv --au=pulse` errors:
Code: |
[ao] Failed to initialize audio driver 'pulse'
Could not open/initialize audio device -> no sound.
Audio: no audio
Exiting... (Errors when loading file)
|
But.. VLC would still be able to play! At this point `wpctl status` is like
Code: |
PipeWire 'pipewire-0' [1.2.7]
└─ Clients:
32. pipewire
34. i3status
35. WirePlumber
44. VLC media player (LibVLC 3.0.21)
47. WirePlumber [export]
72. wpctl
Audio
├─ Devices:
│ 48. GK208 HDMI/DP Audio Controller [alsa]
│ 49. Built-in Audio [alsa]
│ 50. Built-in Audio [alsa]
│
├─ Sinks:
│ 61. Built-in Audio Analog Stereo [vol: 1.00]
│
├─ Sources:
│
├─ Filters:
│
└─ Streams:
74. VLC media player (LibVLC 3.0.21)
73. output_FR > Generic Analog:playback_FR [active]
75. output_FL > Generic Analog:playback_FL [active]
Settings
└─ Default Configured Devices:
|
If I re-launch pipewire (`gentoo-pipewire-launcher restart`) it changes pulseaudio profile:
Code: |
$ pactl list sinks short
54 alsa_output.pci-0000_00_1b.0.iec958-stereo PipeWire s32le 2ch 48000Hz SUSPENDED
|
It changes the default sink to "digital stereo" and if I don't change profile again, `mpv --ao=pulse` (or alsa) doesn't error but doesn't produce any sound either. `speakertest -D sysdefault` will producde sound from the speaker but `speakertest -D default` and `speakertest -D pulse` don't.
I used to see some error/warning logs related to realtime scheduling but output I posted are produced after I resolved the logs (by recombiling kernel and installing rtkit)
Update
Damn it, the speaker was connected to rear speakers port and somehow this used to work in Pulseaudio. I wasn't smart enough to figure this out until I found this guy's post, so I keep this post here too. |
|