24.04.2 LTS - Why cant i get my on-board sound to work? A plea for help!

I have tried, I have googled, I've tried other stuff - but clearly I'm an idiot - Please help.

I can not get on-board sound to work on my desktop machine (B365M-HDV motherboard).

I can plug in a usb headphone set and switch to it and get sound, but I would like to get my external speakers working.

In Sound preferences I can see the Built-in Audio device and provided the profile settings are off It tells me there is 1 output / 3 inputs.

If I set the profile to Pro Audio (the only other choice) then built in audio is disabled.

"pactl info" tells me :-

Server String: /run/user/1000/pulse/native
Library Protocol Version: 35
Server Protocol Version: 35
Is Local: yes
Client Index: 714
Tile Size: 65472
User Name: paul
Host Name: Box
Server Name: PulseAudio (on PipeWire 1.0.5)
Server Version: 15.0.0
Default Sample Specification: float32le 2ch 48000Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000_00_1f.3.pro-output-0
Default Source: alsa_input.pci-0000_00_1f.3.pro-input-0
Cookie: 57b2:8a2c

I'm not good at Linux. Please help, it's doing my head in...

2 Likes

Not true! The Linux (and Ubuntu) audio stack is not simple, that's why forums exist so we can help each other out.

The fact that you can only see Pro Audio as a profile option tells me that PipeWire is not all that familiar with how to set up that device (and this may end up being something you'll have to take to PipeWire team for support).

First things first, we need to know what type of sound card we're looking at. As this is an on-board PCI device; we can get a peek at the modules loaded via:

lspci -k -nn -d ::0403

The index of each card can be seen via:

cat /proc/asound/cards

Once you have the number of the card, we can get some information at the ALSA level about it; for example if the card number is 2:

alsactl info 2

If you share the output of the above (or similar) commands, that would be a great start.

5 Likes
00:1f.3 Audio device [0403]: Intel Corporation 200 Series PCH HD Audio [8086:a2f0]
	DeviceName: Onboard - Sound
	Subsystem: ASRock Incorporation 200 Series PCH HD Audio [1849:288a]
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel, snd_soc_avs
03:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 HDMI Audio [1002:ab38]
	Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 HDMI Audio [1002:ab38]
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel

Then I get

 0 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xdff40000 irq 141
 1 [HDMI           ]: HDA-Intel - HDA ATI HDMI
                      HDA ATI HDMI at 0xdfca0000 irq 142
 2 [Device         ]: USB-Audio - USB Audio Device
                      GeneralPlus USB Audio Device at usb-0000:00:14.0-3, full speed
 3 [U0x46d0x9a1    ]: USB-Audio - USB Device 0x46d:0x9a1
                      USB Device 0x46d:0x9a1 at usb-0000:00:14.0-10.3, high speed

Which I'm interpreting as card 0 as the on-board

alsactl info 0 gives

#
# Sound card
#
- card: 0
  id: PCH
  name: HDA Intel PCH
  longname: HDA Intel PCH at 0xdff40000 irq 141
  driver_name: HDA-Intel
  mixer_name: Realtek ALC887-VD
  components: HDA:10ec0887,1849288a,00100302
  controls_count: 39
  pcm:
    - stream: PLAYBACK
      devices:
        - device: 0
          id: ALC887-VD Analog
          name: ALC887-VD Analog
          subdevices:
            - subdevice: 0
              name: subdevice #0
    - stream: CAPTURE
      devices:
        - device: 0
          id: ALC887-VD Analog
          name: ALC887-VD Analog
          subdevices:
            - subdevice: 0
              name: subdevice #0
        - device: 2
          id: ALC887-VD Alt Analog
          name: ALC887-VD Alt Analog
          subdevices:
            - subdevice: 0
              name: subdevice #0
  hwdep:
    - device: 0
      id: HDA Codec 0
      name: HDA Codec 0
      iface: 16

Hugely appreciate your help

5 Likes

This output sound good.

  • As your motherboard is not old and can output audio, can you tell us how you plug your speaker with photo of the connector used.
  • Did you test your speakers on another devices?
  • As hdmi can output audio, are you display screen on monitor only or with TV connected?
  • Can you test my script to compare with your issue:
    Output sound switcher
4 Likes

I'd check both alsamixer and pulsemixer to ensure the volumes on the device are correct; here's an older related post: Sound won't use line out anymore, only spdif via HDMI - how to fix this? - #6 by stephematician

It all looks promising so far, except for the Pro Audio profile. I assume we're stuck with that (you did not mention any other options).

That said, I have found an issue that has no solution for this particular card: Front panel doesn't work with ALC887-VD - I would add your own info to that issue (e.g. PipeWire 1.0.5, Ubuntu MATE 24.04 desktop, kernel version given by uname -r, and the specific hardware you are using).

If the volume settings look correct in alsamixer and pulsemixer, then we'll have to have a look at what PipeWire is doing wrong - and that might be easier to troubleshoot over with their experts.

3 Likes

dumb question - but how do I track down what mixers(?)/ general sound 'stuff' I have installed?

Given I've been poking about for a bit I'm not 100% sure i haven't got a half bastardised config with bits and pieces of a whole lot of conflicting(?) sound programs fighting each other.

I think I've removed stuff that hasn't worked, but perhaps I've removed too far or left something obviously wrong installed

2 Likes

It's literally a green 3.5 mm plug, into a 3.5mm socket. Its the one on the rear of the motherboard.

Have tested the speakers (two sets) on another machine (under windows they work fine)

HDMI is to two "non-sound" monitors

I have tried "sound switcher indicator" . I will uninstall it and try the one you suggest
[/quote]

Have you maybe tried to reset to default audio profile in PulseAudio?

https://unix.stackexchange.com/questions/675239/the-pro-audio-profile-in-pipewire-for-audio-devices-sound-cards

Also I think you should reinstall Alsa to reset possible missing stuff and fix problems - I think something along the line of this command should maybe work:

sudo apt install --reinstall alsa-base alsa-utils alsa-ucm-conf linux-sound-base pipewire pipewire-audio-client-libraries pavucontrol

1 Like

There are, by default, two underlying systems involved in the typical audio stack on Ubuntu (24.04).

  1. ALSA
  2. PipeWire

ALSA is mostly within the Linux kernel. So it's installed whether you like it or not. What ALSA can't do; is mix stuff together. To this end, PipeWire takes up the slack. PipeWire is in the user space (not the kernel), and it mixes things, passes them to ALSA, which then passes it to hardware.

There are a couple of wrinkles. PulseAudio used to do the mixing, and a lot of applications still expect to interact with it - PipeWire gets around this by implementing a PulseAudio 'server', too.

So what actually happens is application sends audio to pulseaudio (which is sneakily pipewire), which then passes it to ALSA, an on to your hardware.

3 Likes

Following you link - one of the very first commands is
"So, let’s start by checking all available profiles for our audio devices using the [pacmd] command"

I get a response of "No PulseAudio daemon running, or not running as session daemon"

But isn't that Pulse audio? I'm running Pipewire (pretending to be pulseaudio), is that response expected??

2 Likes

Try using this command, I think pacmd is confused since you run Pipewire alongside PulseAudio

pactl list cards

My, that's a LONG list...

I think the only relevant bit is (as way back in the beginning "lspci -k -nn -d ::0403" gave me a PCH HD Audio device with an address(?) of 00:1f.3

Card #382
Name: alsa_card.pci-0000_00_1f.3.3
Driver: alsa
Owner Module: n/a
Properties:
api.acp.auto-port = "false"
api.acp.auto-profile = "false"
api.alsa.card = "0"
api.alsa.card.longname = "HDA Intel PCH at 0xdff40000 irq 141"
api.alsa.card.name = "HDA Intel PCH"
api.alsa.path = "hw:0"
api.alsa.use-acp = "true"
api.dbus.ReserveDevice1 = "Audio0"
device.api = "alsa"
device.bus = "pci"
device.bus_path = "pci-0000:00:1f.3"
device.description = "Built-in Audio"
device.enum.api = "udev"
device.form_factor = "internal"
device.icon_name = "audio-card-analog-pci"
device.name = "alsa_card.pci-0000_00_1f.3.3"
device.nick = "HDA Intel PCH"
device.plugged.usec = "4690643"
device.product.id = "0xa2f0"
device.product.name = "200 Series PCH HD Audio"
device.subsystem = "sound"
sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
device.vendor.id = "0x8086"
device.vendor.name = "Intel Corporation"
media.class = "Audio/Device"
factory.id = "14"
client.id = "35"
object.id = "50"
object.serial = "382"
object.path = "alsa:pcm:0"
alsa.card = "0"
alsa.card_name = "HDA Intel PCH"
alsa.long_card_name = "HDA Intel PCH at 0xdff40000 irq 141"
alsa.driver_name = "snd_hda_intel"
alsa.mixer_name = "Realtek ALC887-VD"
alsa.components = "HDA:10ec0887,1849288a,00100302"
alsa.id = "PCH"
device.string = "0"
Profiles:
off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (sinks: 1, sources: 1, priority: 6565, available: no)
output:analog-stereo: Analog Stereo Output (sinks: 1, sources: 0, priority: 6500, available: no)
input:analog-stereo: Analog Stereo Input (sinks: 0, sources: 1, priority: 65, available: no)
pro-audio: Pro Audio (sinks: 1, sources: 2, priority: 1, available: yes)
Active Profile: off
Ports:
analog-input-front-mic: Front Microphone (type: Mic, priority: 8500, latency offset: 0 usec, availability group: Legacy 1, not available)
Properties:
port.type = "mic"
port.availability-group = "Legacy 1"
device.icon_name = "audio-input-microphone"
card.profile.port = "0"
Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo
analog-input-rear-mic: Rear Microphone (type: Mic, priority: 8200, latency offset: 0 usec, availability group: Legacy 2, not available)
Properties:
port.type = "mic"
port.availability-group = "Legacy 2"
device.icon_name = "audio-input-microphone"
card.profile.port = "1"
Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo
analog-input-linein: Line In (type: Line, priority: 8100, latency offset: 0 usec, availability group: Legacy 3, not available)
Properties:
port.type = "line"
port.availability-group = "Legacy 3"
card.profile.port = "2"
Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo
analog-output-lineout: Line Out (type: Line, priority: 9000, latency offset: 0 usec, availability group: Legacy 4, not available)
Properties:
port.type = "line"
port.availability-group = "Legacy 4"
card.profile.port = "3"
Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo
analog-output-headphones: Headphones (type: Headphones, priority: 9900, latency offset: 0 usec, availability group: Legacy 5, not available)
Properties:
port.type = "headphones"
port.availability-group = "Legacy 5"
device.icon_name = "audio-headphones"
card.profile.port = "4"
Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo

1 Like

I think this may be the root cause of the issue since it seems it ignores the fact your stereo is plugged in for some strange reason so it is most likely Alsa

Have you tried installing and reinstalling Alsa yet?

Also - try restarting the Pipewire/PulseAudio:

systemctl --user restart pipewire pipewire-pulse

EDIT: If none of this works check your BIOS settings if there is "Front panel audio mode" - check and set to HD Audio

2 Likes

Can you show the output of:
pactl list short sinks | awk '{print $2}'

3 Likes

Assuming you haven't changed anything on the system-wide level; then you could look at, say, a ~/.asoundrc, ~/.config/pipewire, ~/.config/wireplumber and check that you haven't got any settings in there that you don't expect/need.

If you changed things inside /usr/ then you're in more "trouble"; re-installing the packages might help. For example, start with:

user@host:~$ apt list *alsa* --installed
alsa-base/noble,noble,now 1.0.25+dfsg-0ubuntu7 all [installed,automatic]
alsa-topology-conf/noble,noble,now 1.2.5.1-2 all [installed,automatic]
alsa-ucm-conf/noble-updates,noble-updates,now 1.2.10-1ubuntu5.4 all [installed,automatic]
alsa-utils/noble,now 1.2.9-1ubuntu5 amd64 [installed,automatic]

Then re-install these with apt install --reinstall <package names here>.

I havent checked; but you may need a more forceful removal of cruft via apt remove --purge. I'd be careful without a backup because it might remove settings that are difficult to track down a source for.

2 Likes

I wouldn't say that PulseAudio is running "alongside" PipeWire; it's that PipeWire is running a PulseAudio server. The 'true' PulseAudio libraries, daemon etc are not on the system at all.

2 Likes

Thanks for the correction - I am not that proficient in these stuff but I try and figure it out step by step - now I know better :blush:

1 Like

I would add to this that running hdajacksensetest from alsa-tools would be a good idea (with the speakers plugged in):

# testing card #4 which is my onboard AMD audio
user@host:~$ hdajacksensetest card=4
Pin 0x19 (Black Mic, Left side): present = No
Pin 0x21 (Black Headphone, Left side): present = Yes

We can test out different channels to see if PipeWire is, regardless of its problems with the profile, able to send audio to the speakers. Firstly, use wpctl status to get the id associated with each sink:

user@host:~$ wpctl status | grep Sinks -A2
 β”œβ”€ Sinks:
 β”‚  *  119. Razer Barracuda X Analog Stereo     [vol: 0.93]
 β”‚     138. Family 17h/19h HD Audio Controller Analog Stereo [vol: 0.93]

The * is the currently selected (default) sink, in my case, a headset. I can then get info about this sink using wpctl inspect, I'm interested in the objects' "serial" number, and the names of the channels:

user@host:~$ wpctl inspect 119 | grep 'object\.serial'
  * object.serial = "1536"
user@host:~$ wpctl inspect 119 | grep 'audio\.position'
    audio.position = "FL,FR"

I can play to one of the channels, for example the 'FL' (front-left) channel, using pw-play:

user@home:~$ pw-play /usr/share/sounds/alsa/Front_Left.wav --target 1536 --channel-map FL

In the OP's case; I expect to see channel names like AUX0, AUX1, because of the Pro Audio profile which doesn't assign meaning to the audio channels like "left" and "right".

If we have the correct volumes set in alsamixer and pulsemixer, and we can't get PipeWire to play sound via pw-play, then it's very likely that something is wrong at the ALSA level, or at the hardware/BIOS level.

4 Likes

Another thing you may want to look into, is checking dmesg for issues with firmware related to the device, as noted in this blog: Intel sound avs driver still too immature - and you may want to try (as they did) blacklisting the snd_soc_avs driver.

3 Likes