Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Sound on linux is never getting easier, isn't it?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3276
Location: Canada

PostPosted: Wed Jul 03, 2024 1:32 am    Post subject: Sound on linux is never getting easier, isn't it? Reply with quote

Split from "does gnome require now pipewire?" while it was still easy to split. -- Zucca

Sound on linux is never getting easier, isn't it ?
Back to top
View user's profile Send private message
lars_the_bear
Apprentice
Apprentice


Joined: 05 Jun 2024
Posts: 157

PostPosted: Wed Jul 03, 2024 8:03 pm    Post subject: Reply with quote

dmpogo wrote:
Sound on linux is never getting easier, isn't it ?


Quite. You'd think we would have cracked this, after twenty years or so. Instead, we just keep making new potential solutions to what should be a simple problem -- mixing and routing audio -- and making things harder for developers and users.

It's interesting (to me, at least) that Android reinvented this particular wheel with its proprietary "Audio Flinger'" that has all the same problems that the regular Linux audio servers do.

BR, Lars.
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1850

PostPosted: Wed Jul 03, 2024 8:32 pm    Post subject: Reply with quote

lars_the_bear wrote:
dmpogo wrote:
Sound on linux is never getting easier, isn't it ?


Quite. You'd think we would have cracked this, after twenty years or so. Instead, we just keep making new potential solutions to what should be a simple problem


Simple problem it definitely is not. However this is off topic. If you want to discuss, please go to Gentoo Chat forums.

Best Regards,
Georgi
Back to top
View user's profile Send private message
lars_the_bear
Apprentice
Apprentice


Joined: 05 Jun 2024
Posts: 157

PostPosted: Thu Jul 04, 2024 7:14 am    Post subject: Reply with quote

logrusx wrote:

Simple problem it definitely is not. However this is off topic. If you want to discuss, please go to Gentoo Chat forums.


Thanks, but no point -- it's been discussed to death over the last 20 years. I doubt I have anything new to say.

BR, Lars.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3428
Location: Rasi, Finland

PostPosted: Thu Jul 04, 2024 7:40 am    Post subject: Reply with quote

My experience with pipewire on just a laptop has been quite flawless.
I think I had to restart the daemon one or twice, when I have lost audio.

That's way, WAY, much better than with pulseaudio.
Pulseaudio constantly used around 4-5% of CPU cycles, and simply stopped outputting any audio.

When Pipewire was at some stage of being able to produce sound, I immediately switched to it. I disabled pulseaudio where ever I could.

Time will tell if we finally get proper solution for audio on Linux.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3226

PostPosted: Thu Jul 04, 2024 9:56 am    Post subject: Reply with quote

There is no getting easier than OSS, when you could just cat a wav file into /dev/dsp.
This said, being able to easily route sound from one application to another is a big step up, so at least the added software complexity (which is mostly hidden from users anyway) is provides real benefits it in this case.
PW take the good from JACK (virtual patch bay) and solves its problems. Like supporting multiple playback devices. Which is great. Dependency on DBUS is less great. Oh well...
Can't say much about PA, I've been using it for a while on another machine and I remember it crashing and tripping over its profiles quite a bit, but it was also a few years ago, when it was a much younger project.

You know what is truly not getting any easier? Printing. You know the joke about keeping a gun next to your printer, don't you? And apparently, people under windows don't have it any better. But that's a different matter.
Web browsing is not getting easier either, though for different reasons...

Anyway, "if you keep improving something for long enough, you're inevitably going to break it"
_________________
Make Computing Fun Again
Back to top
View user's profile Send private message
lars_the_bear
Apprentice
Apprentice


Joined: 05 Jun 2024
Posts: 157

PostPosted: Thu Jul 04, 2024 10:33 am    Post subject: Reply with quote

szatox wrote:
There is no getting easier than OSS, when you could just cat a wav file into /dev/dsp.


That was easy when we only had one sound device (if we were lucky).

ALSA at least allowed for multiple input and output devices, and an application could use the input from one device and output to another. I'm not sure OSS ever supported that (but it was a long time ago).

I have no objection in principle to audio servers being put on top of ALSA, when they provide new functionality. The problem is that they tend to be crappy. They also tend to be tied -- to some extent -- into integrated desktops and hardware detection which, I accept, isn't going to a big problem for most users.

The fact that Linux (including ChromeOS and Android) keeps spawning audio servers might suggest that there is a hard problem to be solved. But I disagree: the real problem is that we just can't agree on what such a thing should actually do, and what its scope should be. So when we get something like Pulse, which started life full of bugs, it seemed to be easier to implement something else that better satisfied the needs of some other group of people, than to fix it. To be fair, it's not that buggy these days.

The personalities of the people behind Pulse didn't help the situation much, either. It's interesting to me that Red Hat plugged Pulse hard for a while, and then moved to PipeWire in RHEL 9. Maybe Pulse will eventually end up as another dried-out carcass by the side of the Linux highway, like the Enlightenment Sound Daemon and about twenty others.

I don't really have a dog in this fight -- I don't find that I need any of them. My modest needs are perfectly well-catered by ALSA. I keep reading about how Pusle/PWD/ESD/etc were needed to allow multiple applications to output to the same sound device. But ALSA has had that capability for years, if not decades. What ALSA can't do is change output device on the fly, which I concede is a limitation.

I'm not saying that ALSA is perfect -- far from it; but our attempts over the last twenty years to improve on it have not been an unqualified success.

BR, Lars.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3276
Location: Canada

PostPosted: Fri Jul 05, 2024 5:08 am    Post subject: Reply with quote

I did not mean really to start the discussion (it is pretty much deja vu), but I find amusing that when I have some issues now, such as disappearing sound I need to look at least in five or more different places.
Everybidy and their dog seems trying to control my audio devices. Audio can be be muted at Youtube level, at a browser level in the tab, at kmix level, some mix up with devices at pulseaudio level where you need to go to pavucontrol-qt, once I have to restart pipewire service, at last there are physical buttons on laptop (this already more than 5 levels) I am interested to know if anybody in this thread could claim that they can describe the architecture of playing a song in the browser in, say KDE desctop ? How things are related to each other ?

And yes, printing, especially with propagation of bonjour is an unstable mess. Even on Mac it is not very stable. I would say in lpd times we had a solid networking server. We had issues with particular printers drivers, later ppds, but postscript printers over lpd were a pretty solid setup. Now even that part is flaky.
Back to top
View user's profile Send private message
NichtDerHans
Apprentice
Apprentice


Joined: 27 Jan 2023
Posts: 151

PostPosted: Fri Jul 05, 2024 6:16 am    Post subject: Reply with quote

OT: If I want to print something, I take my USB stick out of the house and go to a local copy shop. It costs a few cents per page, I don't have to worry about printershit.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3428
Location: Rasi, Finland

PostPosted: Fri Jul 05, 2024 8:01 am    Post subject: Reply with quote

szatox wrote:
There is no getting easier than OSS, when you could just cat a wav file into /dev/dsp.
Oh, the times...
szatox wrote:
You know what is truly not getting any easier? Printing. You know the joke about keeping a gun next to your printer, don't you? And apparently, people under windows don't have it any better. But that's a different matter.
Web browsing is not getting easier either, though for different reasons...

Anyway, "if you keep improving something for long enough, you're inevitably going to break it"
Indeed.
I constantly go drifting in flea markets and similar places, but also on the net too. I look for all kinds of tools for my little workshop. Because
  • I save money
  • Older tools usually were made to last longer
    • How about a Black & Decker drill from 60's for 4 euros? All metal, none the plastic.
  • Older tools were made to be fixed
... and this all can also be seen in PC hardware, but also in software. Have a giant blob of bad code that needs fixing, yet again? You just better start from scratch. I wonder if that is what happened to PA..?
I just hope PW will keep its things polished. It looks (sounds) good now.

Printing on Linux hasn't been a problem for me. But I've always made sure to buy a printer that's Linux friendly. So that's Brother most of the time. Canon lasers seem to be impossible with Linux.

But at this point in time... I really cannot complain. My audio works, my printing works.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3276
Location: Canada

PostPosted: Fri Jul 05, 2024 5:57 pm    Post subject: Reply with quote

Zucca wrote:
[
Printing on Linux hasn't been a problem for me. But I've always made sure to buy a printer that's Linux friendly. So that's Brother most of the time. Canon lasers seem to be impossible with Linux.

But at this point in time... I really cannot complain. My audio works, my printing works.


I have a bug opened against cups-browsed which simply segfaults semi-randomly on my setup. My home has a desktop, which has two queues, one locally attached printer, and one networked printer with fixed IP, configured via socket (although it can be also seen with bonjour). This desktop supposed to serve queues to my laptop and, possibly, to my wife laptop, running OSx (at least the local printer).
IIt looks like if I use CUPS for queue sharing it is OK (but my wife cannot use it on MAC), and if I add DNSSD to CUPS, cups-browsed on laptop segfaults from time to time and queues disappear.
So I never now whether I have a printing or not when I open my laptop, and my wife gave up on me, stuck USB cable in that netwroked printer which is her office and attaches it to her laptop if she needs to print :)


The printers (both HP) themselves work fine when the job gets to them. I would understand printer drivers are not up to par on Linux for some proprietary models etc. But that networking part is flaky, where Liux always excelled, is a disappointment.
Back to top
View user's profile Send private message
mrbassie
l33t
l33t


Joined: 31 May 2013
Posts: 802
Location: over here

PostPosted: Fri Jul 05, 2024 6:24 pm    Post subject: Reply with quote

Why do you get extremely bad audio stuttering with pipewire when eg listening to whatever in the background at the same time as moving a file from one filesystem to another with checksumming going on (fletcher4 in my case)? Doesn't happen with pulseaudio or pure alsa.
_________________
I spent a christmas in Vienna twenty something years ago. It was a beautiful city. Everyone was so friendly.
Back to top
View user's profile Send private message
Dominique_71
Veteran
Veteran


Joined: 17 Aug 2005
Posts: 1882
Location: Switzerland (Romandie)

PostPosted: Fri Jul 05, 2024 10:51 pm    Post subject: Reply with quote

lars_the_bear wrote:
szatox wrote:
There is no getting easier than OSS, when you could just cat a wav file into /dev/dsp.


That was easy when we only had one sound device (if we were lucky).

ALSA at least allowed for multiple input and output devices, and an application could use the input from one device and output to another. I'm not sure OSS ever supported that (but it was a long time ago).


JACK can do that, but it is no out of the box solution. You would have to make your own .asoundrc file for that, which can be a complex things to do. Also, when using multiple sound cards, if they are not in sync by a world clock (only a few high-end cards provide it), it can be jitter and associated xruns. As pipewire is mean to be jack compatible, it must be possible to do the same with it.

JACK can also interface the ALSA applications into the JACK graph with the jack alsa plugin. Combined with a custom .asoundrc where that jack plugin is the default ALSA card, all the ALSA applications will appear into the JACK graph automatically. It's a one time config and you get all the pulseaudio advantages, but with a constant latency which is a must for serious audio work. I don't use pipewire, but if it is really jack compatible, this should work into pipewire as well. When I see the simplicity of the JACK<=>ALSA plugin, and how well it work, I consider pulseaudio as a waste of time and efforts. That's just my biaised point of vue as an electronics engineer specialized in all kind of audio electronics - from vacuum tubes to DSP, and as a musician.
_________________
"Confirm You are a robot." - the singularity
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3428
Location: Rasi, Finland

PostPosted: Sat Jul 06, 2024 6:10 am    Post subject: Reply with quote

mrbassie wrote:
Why do you get extremely bad audio stuttering with pipewire when eg listening to whatever in the background at the same time as moving a file from one filesystem to another with checksumming going on (fletcher4 in my case)? Doesn't happen with pulseaudio or pure alsa.
I'd check if pipewire has enough priority.
There was somewhere (on the net) a mention of rtkit being required... Although I don't have it installed and pipewire doesn't have USE rtkit -flag either.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum