No sound but Linux thinks audio played

ocgltd

New Member
Joined
Nov 28, 2023
Messages
7
Reaction score
0
Credits
66
I had audio working on my AlmaLinux 9 installation, using a USB sound card. I seemed to have changed something because I no longer hear audio (but AlmaLinux thinks its successfully playing a sound). I did switch from GUI to text mode on boot, but I don't think that should matter. I have no idea how to proceed...hopefully someone sees something wrong here:

For example, the following command completes successfully:

aplay /data/sounds/intruder_alert.wav
Playing WAVE '/data/sounds/intruder_alert.wav' : Signed 16 bit Little Endian, Rate 22050 Hz, Mono

I confirmed my USB audio device is detected on bootup (not sure if 'input,hidraw1' is a clue):

[ 2.586749] hub 2-2:1.0: USB hub found
[ 2.589077] hub 2-2:1.0: 7 ports detected
[ 3.536316] usb 2-2.1: new full-speed USB device number 4 using uhci_hcd
[ 4.432226] usb 2-2.1: New USB device found, idVendor=08bb, idProduct=2902, bcdDevice= 1.00
[ 4.432236] usb 2-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4.432243] usb 2-2.1: Product: USB Audio CODEC
[ 4.432248] usb 2-2.1: Manufacturer: Burr-Brown from TI
[ 4.524947] input: Burr-Brown from TI USB Audio CODEC as /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.1/2-2.1:1.3/0003:08BB:2902.0002/input/input6
[ 4.583437] hid-generic 0003:08BB:2902.0002: input,hidraw1: USB HID v1.00 Device [Burr-Brown from TI USB Audio CODEC ] on usb-0000:02:00.0-2.1/input3

and sound related drivers are loaded by kernel:

lsmod | grep snd
snd_seq_dummy 16384 0
snd_hrtimer 16384 1
snd_usb_audio 385024 2
snd_usbmidi_lib 45056 1 snd_usb_audio
snd_hwdep 16384 1 snd_usb_audio
snd_seq 94208 7 snd_seq_dummy
snd_pcm 151552 1 snd_usb_audio
snd_timer 49152 3 snd_seq,snd_hrtimer,snd_pcm
snd_rawmidi 45056 1 snd_usbmidi_lib
snd_seq_device 16384 2 snd_seq,snd_rawmidi
snd 122880 14 snd_seq,snd_seq_device,snd_hwdep,snd_usb_audio,snd_usbmidi_lib,snd_timer,snd_pcm,snd_rawmidi
soundcore 16384 1 snd
mc 69632 1 snd_usb_audio


Since I'm running pipewire and the nodes are


pw-cli ls Node
id 28, type PipeWire:Interface:Node/3
object.serial = "28"
factory.id = "10"
priority.driver = "20000"
node.name = "Dummy-Driver"
id 29, type PipeWire:Interface:Node/3
object.serial = "29"
factory.id = "10"
priority.driver = "19000"
node.name = "Freewheel-Driver"
id 31, type PipeWire:Interface:Node/3
object.serial = "1736"
object.path = "alsa:pcm:0:front:0:playback"
factory.id = "18"
client.id = "33"
device.id = "44"
priority.session = "1009"
priority.driver = "1009"
node.description = "PCM2902 Audio Codec Analog Stereo"
node.name = "alsa_output.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo-output"
node.nick = "USB Audio CODEC"
media.class = "Audio/Sink"
id 37, type PipeWire:Interface:Node/3
object.serial = "35"
factory.id = "10"
client.id = "33"
node.name = "Midi-Bridge"
media.class = "Midi/Bridge"
id 42, type PipeWire:Interface:Node/3
object.serial = "1737"
object.path = "alsa:pcm:0:hw:0:capture"
factory.id = "18"
client.id = "33"
device.id = "44"
priority.session = "2009"
priority.driver = "2009"
node.description = "PCM2902 Audio Codec Analog Stereo"
node.name = "alsa_input.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo-input"
node.nick = "USB Audio CODEC"
media.class = "Audio/Source"

I also tried a simple speaker test:

speaker-test -c 2

speaker-test 1.2.8

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 1048576
Period size range from 32 to 524288
Using max buffer size 1048576
Periods = 4
was set period_size = 262144
was set buffer_size = 1048576
0 - Front Left
1 - Front Right
Time per period = 11.005656
0 - Front Left
^C 1 - Front Right
Time per period = 5.263193

And I checked the aplay devices

aplay -l
** List of PLAYBACK Hardware Devices **
card 0: CODEC [USB Audio CODEC], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0

aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
sysdefault
Default Audio Device
oss
Open Sound System
pipewire
PipeWire Sound Server
default
Default ALSA Output (currently PipeWire Media Server)
sysdefault:CARD=CODEC
USB Audio CODEC, USB Audio
Default Audio Device
front:CARD=CODEC,DEV=0
USB Audio CODEC, USB Audio
Front output / input
surround21:CARD=CODEC,DEV=0
USB Audio CODEC, USB Audio
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=CODEC,DEV=0
USB Audio CODEC, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=CODEC,DEV=0
USB Audio CODEC, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=CODEC,DEV=0
USB Audio CODEC, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=CODEC,DEV=0
USB Audio CODEC, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=CODEC,DEV=0
USB Audio CODEC, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=CODEC,DEV=0
USB Audio CODEC, USB Audio
IEC958 (S/PDIF) Digital Audio Output


And alsa mixer says volume levels are up:

amixer
Simple mixer control 'Master',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 65536
Mono:
Front Left: Playback 55864 [85%] [on]
Front Right: Playback 55864 [85%] [on]
Simple mixer control 'Capture',0
Capabilities: cvolume cswitch cswitch-joined
Capture channels: Front Left - Front Right
Limits: Capture 0 - 65536
Front Left: Capture 26213 [40%] [on]
Front Right: Capture 26213 [40%] [on]

I've never seen this before and I'm not sure how to diagnose this. Btw, I confirmed my speakers work fine (hear buzz when I touch the audio cable connections).
 



AlmaLinux 9 comes with Linux kernel 5.14. If you use it with a desktop environment, you get GNOME 40, which runs on Wayland by default and the availability of the Pipewire audio server.

Had the same problem, went back to graphical mode, it started working.
 
I cannot restart graphical mode as I think I removed some packages needed by GUI....but there must be way to do it from text mode
 
It's easy to re-install the GUI. It might not be what you want to do. But it is easy to do.

dnf grouplist
dnf group install 'Server with GUI' 'GNOME Desktop Environment' 'Sound and Video' 'Graphical Internet'


One thing you can try. If you run the command above, it won't actually install anything yet. ( You have to enter
Y or N ) but it will show you a list of packages that will get installed, you can look through the list to see if any
alsa or pipewire packages get installed.
 
Last edited:
Just in the middle of all that's going on here.....

G'day ocgltd, Welcome to Linux.org.

This would be one of the very few posts where we have not had to ask for specs etc etc
 
I decided to remove and then reinstall pipewire and dependencies, with an interesting result. When I run aplay or pw-play now, the playback does nothing, just hangs. According to 'ps' the command is suspended, and according to strace it is waiting (on epoll)...how can I figure out what resource it is waiting for?

Code:
epoll_ctl(3, EPOLL_CTL_MOD, 12, {events=EPOLLIN|EPOLLOUT|EPOLLERR|EPOLLHUP, data={u32=2475749712, u64=94513231098192}}) = 0
newfstatat(16, "", {st_mode=S_IFREG|0777, st_size=2312, ...}, AT_EMPTY_PATH) = 0
write(9, "\1\0\0\0\0\0\0\0", 8)         = 8
read(10, "\1\0\0\0\0\0\0\0", 8)         = 8
newfstatat(16, "", {st_mode=S_IFREG|0777, st_size=2312, ...}, AT_EMPTY_PATH) = 0
recvmsg(12, {msg_namelen=0}, MSG_DONTWAIT|MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
sendmsg(12, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\2\0\0\0\30\0\0\4\5\0\0\0\0\0\0\0\20\0\0\0\16\0\0\0\4\0\0\0\2\0\0\0"..., iov_len=40}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_DONTWAIT|MSG_NOSIGNAL) = 40
epoll_ctl(3, EPOLL_CTL_MOD, 12, {events=EPOLLIN|EPOLLERR|EPOLLHUP, data={u32=2475749712, u64=94513231098192}}) = 0
epoll_wait(3, [{events=EPOLLIN, data={u32=2475749712, u64=94513231098192}}], 32, -1) = 1
recvmsg(12, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\0\0\0\0H\0\0\6\v\0\0\0\1\0\0\0@\0\0\0\16\0\0\0\4\0\0\0\4\0\0\0"..., iov_len=32768}], msg_iovlen=1, msg_control=[{cmsg_len=24, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, cmsg_data=[14, 19]}], msg_controllen=24, msg_flags=MSG_CMSG_CLOEXEC}, MSG_DONTWAIT|MSG_CMSG_CLOEXEC) = 280
newfstatat(14, "", {st_mode=S_IFREG|0777, st_size=2312, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, 14, 0) = 0x7fb8c3b0f000
write(9, "\1\0\0\0\0\0\0\0", 8)         = 8
read(10, "\1\0\0\0\0\0\0\0", 8)         = 8
newfstatat(14, "", {st_mode=S_IFREG|0777, st_size=2312, ...}, AT_EMPTY_PATH) = 0
write(9, "\1\0\0\0\0\0\0\0", 8)         = 8
recvmsg(12, {msg_namelen=0}, MSG_DONTWAIT|MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
epoll_wait(3,
 
Last edited:
As I dig deeper I'm wondering if the problem is that I waslogged in as 'root' - as the pipewire.socket service is not started. (I read a number of posts about pipewire not being available as root). So I switch and am now logged in as user 'admin' which is member of root and audio groups. When I try to play an audio file I see:

Code:
pw-play /data/sounds/intruder_alert.wav
error: pw_context_connect() failed: Host is down

but
Code:
sudo pw-play /data/sounds/intruder_alert.wav
reports success (but no audio is heard)

I confirmed both pipewire socket and service are running:

Code:
● pipewire.socket - PipeWire Multimedia System Socket
     Loaded: loaded (/usr/lib/systemd/user/pipewire.socket; enabled; preset: enabled)
     Active: active (running) since Wed 2023-11-29 11:31:34 EST; 8min ago
      Until: Wed 2023-11-29 11:31:34 EST; 8min ago
   Triggers: ● pipewire.service
     Listen: /run/user/1001/pipewire-0 (Stream)
     CGroup: /user.slice/user-1001.slice/[email protected]/app.slice/pipewire.socket


● pipewire.service - PipeWire Multimedia Service
     Loaded: loaded (/usr/lib/systemd/user/pipewire.service; disabled; preset: disabled)
     Active: active (running) since Wed 2023-11-29 11:31:53 EST; 8min ago
TriggeredBy: ● pipewire.socket
   Main PID: 32050 (pipewire)
      Tasks: 2 (limit: 50007)
     Memory: 1.5M
        CPU: 29ms
     CGroup: /user.slice/user-1001.slice/[email protected]/session.slice/pipewire.service
             └─32050 /usr/bin/pipewire

Hopefully these clues help someone diagnose whats going on
 
Last edited:
wireplumber needs to be running too. Check the output of:
Code:
systemctl --user status wireplumber.service
 
The problem is that the audio output is being routed through a dummy-driver. This happens sometimes if you use external audio interfaces. I've had this a few times with my old Digi-Design Mbox2 Mini and Behringer U-Phoria UMC1820 audio interfaces.

After using the audio interface, if you unplug it and shut your PC/laptop down, when you reboot - I think the audio system tries to connect to the external sound card and when it can't find it, it routes all of your audio through a dummy interface.

Sometimes, if you go into your audio setup - you should be able to see and select your PC's built in soundcard and set that up as the default audio sink. However, other times it doesn't show up at all, you just see the dummy output and no option for your local sound-card.

One thing I've found is that sometimes, plugging in your external sound-card will cause the list of audio devices to refresh and you may see your onboard sound card listed in the available sinks. If it doesn't show up with the external card, you could try routing the audio through the external interface for a short while, then try the list of sinks again to see if your local sound-card shows up.

Open up your distribution/desktop’s audio options, or pavucontrol (for pulseaudio) or if you're using pipewire - I don't know if there's any kind of mixer or something available. I'm still on Debian 11. (NOTE: I haven't upgraded to 12 yet. Pipewire is available in 11. I'm still using ALSA and Pulse-audio on my system.)
Either way - open up whatever audio settings applications you use and try to find the list of sinks/outputs.

Below is a screenshot from Pavucontrol (for Pulseaudio) you can see my MBox 2 and my built in sound card listed in the available sinks.
2023-11-29@21-18-27_1366x768.png


If that doesn't work - and all you see is the dummy interface - the only other thing to do is to stop all of the various audio services from running, scrag all of their config files and then restart them.
I did have a file saved somewhere with the steps I took to fix the issue the last time I was stuck with nothing but a dummy interface. Unfortunately - it's on a backup of my old laptop's HDD.
I'll see if I can find it when I get some spare time. But again - I haven't messed with Pipewire yet. I only know ALSA and Pulse.

In the meantime, I hope that at least gives you something to work with?!
Simply restarting your PC doesn't get rid of the dummy interface. Once the system sets it up as the default - it can be a royal PITA to get rid of the dummy interface and restore your onboard sound-card as the default output/sink.

Since the last time it happened - whenever I use one of my external sound-cards/interfaces, I always ensure that I switch back to my systems built-in sound-card before disconnecting the external interface and shutting my system down. And since doing that, I haven't had any re-occurrences of the dreaded "dummy interface"!
 
I'm starting to suspect a driver issue, but not sure. Going in circles.

I tried removing pipewire and just using alsa and still no audio...
 
Last edited:
I'm starting to suspect a driver issue, but not sure. Going in circles.

I tried removing pipewire and just using alsa and still no audio...
It's not a driver issue. From experience - if you use external audio interfaces with Linux, occasionally when you restart after using an external sound card - all of your audio gets routed through a dummy device and the system no longer sees your onboard sound-card. And getting rid of the dummy device and restoring your onboard sound-card is a royal PITA.

As mentioned before - sometimes plugging an external sound card / audio interface is enough to refresh the list of audio devices and will allow your onboard sound-card to show up again. Then you can route the audio through your onboard sound card and disconnect the external one. Other times, the onboard device doesn't show up, so I'll route the audio through the external card and then reboot. After rebooting, check the list of audio devices and the onboard card might be there. In which case, you can route the audio through the onboard card and then disconnect the external one.
Other times - the onboard card just will NOT show up at all and it requires stopping all audio servers/services, deleting all of their config files and then restarting them. That will cause them to use default settings which should cause the system to use the onboard card by default.

Unfortunately, I still haven't located the backup that has my notes in it from the last time I had this problem and fixed it. All I remember is it involved stopping pulse and alsa, deleting their configs and then restarting alsa and pulse. And then the dummy interface was gone and the audio was routed through my onboard card again.
And to prevent it happening again, the workflow when using an external audio interface seems to be:
1. Log into your desktop
2. Connect the external interface
3. Route the audio through the external interface
4. Use the audio interface with your DAW.
At the end of the session:
5. Re-route your audio through your onboard sound-card
6. Disconnect the external interface
7. Log out/shut down.

By using that workflow, I've avoided the dummy driver problem for a few years.
A quick duckduckgo has yielded a couple of things you might want to take a look at and try:
https://ostechnix.com/fix-audio-issue-dummy-output-in-intel-nuc-on-debian-11/
https://unix.stackexchange.com/questions/704857/debian-11-dummy-output

Oh and there was one other time that I had the dummy audio problem and it turned out that another service was hogging the soud-card on startup and preventing the rest of the system from using it. I actually posted a heads up about it here on Linux.org:

In that particular case, it was the Timidity daemon that was causing the problem.
Timidity is MIDI software. So to fix that problem, I just had to uninstall Timidity and just NOT use MIDI, ha ha! I'd completely forgotten about that one.

So checking to see if anything else has the sound-card open, as per my old post linked above, is another good option.
e.g.
Bash:
sudo lsof /dev/snd/*
That will tell you if something else is using the sound card and potentially stopping the rest of the system from seeing/accessing it.

And here's a video that may offer some potential solutions too:
 
Last edited:
I don't have a desktop - running in text mode only. I don't have an internal sound card, only a USB sound card (so not switching to any other sound card). As for sound devices in use:

Code:
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
alsactl 1189 root    4r   CHR  116,4      0t0  646 /dev/snd/controlC0

I assume alsactl normally keeps the control device in use? PS of that pid shows:
Code:
1189 ?        SNs    0:00 /usr/sbin/alsactl -s -n 19 -c -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf --initfile=/lib/alsa/init/00main rdaemon
 
Ah, OK. I was assuming that you were a musician like myself. Sometimes using an external soundcard/audio interface to record instruments and switching between an external card and the internal one.

So the external soundcard is a permanent fixture?! Hmmmm. I’d imagine it’s a configuration issue.

Your system sees the card. The appropriate modules appear to be loaded. Did this problem start when you switched to text only mode?!
 
I suspect that the problem appeared when I tried to remove some GUI packages (using DNF). The system boots fine into text mode, but can't boot into GUI anymore.

I tried a new USB sound card (different chipset) with same results. Device driver loaded yet no audio comes out. So today I removed every audio related package and reinstalled them. And now I'm back to an error similar to my original post (using pipewire):

Running as a non-root user:

Code:
[CODE]pw-play -v /data/sounds/intruder_alert.wav
sndfile: opened file "/data/sounds/intruder_alert.wav" format 00010002 channels:1 rate:22050
sndfile: using default channel map: MONO
PCM: fmt:s16 rate:22050 channels:1 width:2
rate:22050 latency:2205 (0.100s)
connecting playback stream; target=(null)
stream state changed unconnected -> connecting
stream param change: Spa:Enum:ParamId:Props
stream properties:
        application.name = "pw-play"
        node.name = "pw-play"
        media.type = "Audio"
        media.category = "Playback"
        media.role = "Music"
        media.filename = "/data/sounds/intruder_alert.wav"
        media.name = "/data/sounds/intruder_alert.wav"
        media.format = "WAV (Microsoft)"
        node.rate = "1/22050"
        node.latency = "2205/22050"
        stream.is-live = "true"
        node.autoconnect = "true"
        node.want-driver = "true"
        media.class = "Stream/Output/Audio"
remote 0 is named "pipewire-0"
stream state changed connecting -> paused
stream param change: Spa:Enum:ParamId:Props
stream state changed paused -> error
stream node 35 error: no node available
remote error: id=2 seq:7 res:-2 (No such file or directory): no node available

I if issue the command 'pw-cli info 35' (based on "node 35" above) it reports unknown global '35'. It looks like pipewire trying to run the audio out a non-existing node....but I suspect nodes are created dynamically

Code:
I discover the wpctl command online and notices something interesting

[CODE]wpctl status
PipeWire 'pipewire-0' [0.3.67, admin@myhost, cookie:1009027964]
 └─ Clients:
        31. wpctl                               [0.3.67, admin@myhost, pid:3833]
        33. WirePlumber                         [0.3.67, admin@myhost, pid:3090]
        34. WirePlumber [export]                [0.3.67, admin@myhost, pid:3090]


Audio
 ├─ Devices:
 │
 ├─ Sinks:
 │
 ├─ Sink endpoints:
 │
 ├─ Sources:
 │
 ├─ Source endpoints:
 │
 └─ Streams:


Video
 ├─ Devices:
 │
 ├─ Sinks:
 │
 ├─ Sink endpoints:
 │
 ├─ Sources:
 │
 ├─ Source endpoints:
 │
 └─ Streams:


Settings
 └─ Default Configured Node Names:

There appear to be no audio sinks! Should there be? and pactl shows the following sinks only:

Code:
Sink #46
        State: SUSPENDED
        Name: auto_null
        Description: Dummy Output
        Driver: PipeWire
        Sample Specification: float32le 2ch 48000Hz
        Channel Map: front-left,front-right
        Owner Module: 4294967295
        Mute: no
        Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
                balance 0.00
        Base Volume: 65536 / 100% / 0.00 dB
        Monitor Source: auto_null.monitor
        Latency: 0 usec, configured 0 usec
        Flags: DECIBEL_VOLUME LATENCY
        Properties:
                node.name = "auto_null"
                device.description = "Dummy Output"
                audio.rate = "48000"
                audio.channels = "2"
                audio.position = "FL,FR"
                media.class = "Audio/Sink"
                factory.name = "support.null-audio-sink"
                node.virtual = "true"
                monitor.channel-volumes = "true"
                factory.id = "18"
                clock.quantum-limit = "8192"
                client.id = "31"
                node.driver = "true"
                factory.mode = "merge"
                audio.adapt.follower = ""
                library.name = "audioconvert/libspa-audioconvert"
                object.id = "32"
                object.serial = "46"
        Formats:
                pcm

only a dummy as JasKinasis suggested above. In fact, pactl reports no cards too! So I have to add a card/sink, so I tried

Code:
pactl load-module module-alsa-sink device=hw:0,0 sink_name=usb_audio sink_properties=device.description=analog
Failure: No such entity

 pactl load-module module-alsa-card device=hw:0,0 sink_name=usb_audio sink_properties=device.description=analog
Failure: No such entity

Obviously neither is right. HOw do I add the missing card/sink?
 
Last edited:

Staff online

Members online


Top