Linux and Audio

IdiotInCharge

NVIDIA SHILL
Joined
Jun 13, 2003
Messages
14,675
Fuck me is this shit annoying.

In wanting to get a more recent kernel, Ubuntu supporting 4.18 tops, and wanting an RHEL related distro, I put Fedora 29 on my ultrabook. This one has had audio issues before, which magically disappeared over time.

And this is different.

Now audio starts, then fades off to silence. It's not muted. No settings are being changed. The drivers and the hardware are fully functional.

How is this still a clusterfuck on Linux?

Audio even worked consistently when I ran the image in a VM before loading it straight on the laptop...
 
What happens on the old kernel? I don't have issues with new or old kernel, across distributions... What hardware do you have? What drivers are installed? How are you checking that drivers and hardware are "fully functional"?
 
What happens on the old kernel? I don't have issues with new or old kernel, across distributions... What hardware do you have? What drivers are installed? How are you checking that drivers and hardware are "fully functional"?

All good questions to answer later. Mostly, I'm ranting that such issues even exist- that some invisible hand can yank stuff around without any user interaction.
 
Here's a taste of the errors running Spotify elevated from the terminal:


upload_2019-2-28_9-23-56.png
 
This doesn't look like a sound system issue at all... it looks like a widevine DRM issue.

Is sound cutting out on other things ... or only spotify ?

If this is just a spotify thing I would say the issue is DRM related. Which would make some sense as Fedora does not ship anything non-free... including DRM bits.
 
One other thing if it is a DRM issue... don't install via snap in Fedora. Red Hat are not fans of the Ubuntu backed snaps... Its my understanding Red Hat better supports flatpak
https://flathub.org/apps
https://flathub.org/apps/details/com.spotify.Client

Flatpak is good to go out of the box on fedora. Perhaps try the flatpak version... your errors lead me to believe the snap is being sandboxed and can't start DRM.... so its zeroing out the DBs. :)
 
Is sound cutting out on other things ... or only spotify ?

Entire system. I installed Spotify to demonstrate the issue more directly, but Chrome with Netflix and Youtube cuts out as do games.

I realize that the errors above may not be related to the issue or may not be issues at all, and that snaps are preferred by Ubuntu- I used the Spotify snap because that is what was recommended for Spotify. I can use the flatpaks later, but I suspect that the issue will remain.



https://docs.fedoraproject.org/en-US/quick-docs/installing-spotify/

You can also install it via the Fedora packagemanager with RPM fusion. I prefer to use my package manager at all times... but I guess these silly snap/flatpk things are catching on.

Don't disagree there; though I've noticed that Fedora isn't as nearly as 'integrated' as Ubuntu with respect to installing stuff. Spotify doesn't exist within the UI at all; I'd likely have to create a shortcut for the snap.


And as with the last issue, I don't even know where to start. ALSA shows everything a-okay, including audio playback initially and after audible playback cuts out.
 
Fair on the Spotify. Just wasn't sure if it was just an issue with it. Although as you basically got a DRM init type error I wonder if its something with your pulse setup. On the snap ... ya not sure they are that well integrated into fedora. You can create .desktop files for them if you still want to stick with the snaps anyway.

I would run some basic debugging on your pulse system. Alsa is hardware level and is I am sure working fine. But there could be something with your pulse sound server setup.

https://fedoraproject.org/wiki/How_to_troubleshoot_sound_problems
https://fedoraproject.org/wiki/How_to_debug_sound_problems
https://fedoraproject.org/wiki/How_to_debug_PulseAudio_problems

I would run of their suggested console tests.
aplay -D hw:0 /usr/share/sounds/startup3.wav
pasuspender /usr/bin/aplay -- -D hw:0 /usr/share/sounds/startup3.wav

If neither of those play anything there is something with alsa... if alsa plays but pulse doesn't you will know to look there.

EDIT: in those fedora docs I think it mentions checking gstreamer support as well.... its possible it all has to do with that. Fedora is notrious for not bundling any non-free stuff including stuff like mp3 support.
 
To be more specific, audio starts playing, and then it fades out.

That's what's wacky.
 
To be more specific, audio starts playing, and then it fades out.

That's what's wacky.

yea, that sounds fun i have never heard (no pun) of that happening before. I know it doesn't answer your question specifically ( well apart from the kernal one) but have you considered trying an arch distro like Antergos, Archlabs or Manjaro ?
 
but have you considered trying an arch distro like Antergos, Archlabs or Manjaro ?

The previous audio issue I ran into I had in Manjaro, but the main issue with Manjaro is that they don't have signed kernels for Secure Boot. Otherwise it is my personal distro of choice.
 
First test:

I would run of their suggested console tests.
aplay -D hw:0 /usr/share/sounds/startup3.wav

Code:
[johnctharp@Fedora29-ASUS-Laptop ~]$ aplay -D hw:0 /usr/share/sounds/startup3.wav
aplay: main:828: audio open error: Device or resource busy

Second test:

I would run of their suggested console tests.
pasuspender /usr/bin/aplay -- -D hw:0 /usr/share/sounds/startup3.wav

Code:
[johnctharp@Fedora29-ASUS-Laptop ~]$ pasuspender /usr/bin/aplay -- -D hw:0 /usr/share/sounds/startup3.wav
/usr/share/sounds/startup3.wav: No such file or directory

Given the second error, I'm not sure that the first can be taken as authoritative.
 
It is an odd issue... perhaps it has something to do with a dual sound card issue. I have seen some distros with odd HDMI audio switch overs where using an HDMI external monitor can cause a HDMI audio default when you don't want it to.

A few questions. Do you have more then one audio device. Its pretty common for hdmi audio to be installed ect ?

Use this command to get a list of your audio devices.
lspci | grep Audio

This should list their order.
cat /proc/asound/modules
 
It's just the standard onboard crab audio- that's what makes it weird. There's nothing complicated here about the hardware, it's just a laptop.
 
It's just the standard onboard crab audio- that's what makes it weird. There's nothing complicated here about the hardware, it's just a laptop.

Right but does it have an HDMI port on it ?

If it does you have 2 audio devices. I'm not sure 2 devices would cause what you describe with things starting then fading out... that seems odd. Just wondering if its something with HDMI audio... or some odd port detection.

I would check if you do have an HDMI audio device listed... and perhaps blacklist it if you never plan to use HDMI audio. I'm not sure if that is what is tying up the audio device output. But at the very least it narrows the issue. It really could be that whatever audio hardware they used in that machine is janky, or has poor kernel support. I'm not sure. There are a lot of slight variations of things like realtek hardware that was produced for X or Y bit of hardware. Where the mainline kernel driver works 99% of the time but not always.

Post your
lspci | grep Audio
output.
At the very least it should tell you exactly what bit of hardware your laptop has internally... and from there it might be easier to figure out if it has a specific issue, or if support was added in a specific kernel version. It is possible it was just added very recently as you have mentioned it has worked for you with other distros. I believe fedora 29 is kernel 4.18 which is pretty new... however 4.19 the latest LTS has a lot of audio fixes, including for some odd laptop audio issues. (HP spector and some of the
https://www.phoronix.com/scan.php?page=news_item&px=Linux-4.19-Sound-Drivers
4.20 adds even more fixes
https://www.phoronix.com/scan.php?page=news_item&px=Linux-4.20-Sound-Merge
5.0 should see some more laptop specific fixes as well
https://www.phoronix.com/scan.php?page=news_item&px=Linux-4.21-Holiday-Sound

I know if it s the kernel driver you may still be SOL with your need for MS secure boot keys. I'm not sure if you updated to a newer kernel on your fedora install if you can get a signed version. (I'm guessing you can't, but I'm not 100%)

PS.... just saw this; the work always continues. :)
https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.1-Sound-Updates
 
Actually on a 4.20 kernel right now. Same behavior as the Ubuntu 4.15 and 4.18, as well as the 4.18 shipped with Fedora 29.
 
Back
Top