Disabling Pipewire in antiX-23

Forum Forums General Tips and Tricks Disabling Pipewire in antiX-23

  • This topic has 72 replies, 12 voices, and was last updated Oct 25-2:22 pm by Brian Masinick.
Viewing 15 posts - 16 through 30 (of 73 total)
  • Author
    Posts
  • #116073
    Member
    calciumsodium

      I already have all the necessary config files to stream audio over hdmi to a tv

      Hi @blur13,

      Can you please share how you were able to get audio over hdmi to a TV via alsa only?

      I have not been able to figure this out myself.

      Is it through modifying the asound.conf file in the /etc folder?

      #116074
      Member
      stevesr0

        Xunzi_23,

        I am not downplaying some people’s displeasure with Pipewire.

        I was actually expressing awe for those that can deal well with ALSA.

        I would like to have an adequate skill level to achieve that.

        Pipewire, in contrast, has satisfied my simple needs.

        Parenthetically, I appreciate your evident frustration at some things and your obvious dedication in supporting users and contributing to antiX.

        Sorry my comments upset you.

        stevesr0

        #116077
        Moderator
        Brian Masinick

          Xunzi_23,

          I am not downplaying some people’s displeasure with Pipewire.

          I was actually expressing awe for those that can deal well with ALSA.

          I would like to have an adequate skill level to achieve that.

          Pipewire, in contrast, has satisfied my simple needs.

          Parenthetically, I appreciate your evident frustration at some things and your obvious dedication in supporting users and contributing to antiX.

          Sorry my comments upset you.

          stevesr0

          I think this highlights the obvious situation in which our current solutions, without clearly documented alternatives, are not meeting everyone’s needs. I’m sorry this didn’t become sufficiently evident during our development and testing cycle; with the cooperation of each person we can get past the problems.

          I encourage those experiencing difficulty to check out @blur13’s approach, and hopefully a few additional details can be provided; thanks again to all for raising the questions and concerns. With perseverence we’ll find useful alternatives; it’s pretty clear (at least to me) that one single solution – at least the ones we’ve tried so far – have not resulted in a universal answer.

          There’s still a chance that the tremendous community here can collectively explain a common solution; that would be clearly optimal; failing that, a potential alternative would be to map multiple scenarios and configurations to meet specific hardware. Keep the great ideas coming!

          --
          Brian Masinick

          #116081
          Member
          blur13

            Can you please share how you were able to get audio over hdmi to a TV via alsa only?

            I have not been able to figure this out myself.

            Is it through modifying the asound.conf file in the /etc folder?

            You could, but its much easier to use the ~/.asoundrc file. These are the steps (mutatis mutandis):

            $ aplay -l
            **** List of PLAYBACK Hardware Devices ****
            card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
              Subdevices: 1/1
              Subdevice #0: subdevice #0
            card 1: SB [HDA ATI SB], device 0: ALC269VB Analog [ALC269VB Analog]
              Subdevices: 1/1
              Subdevice #0: subdevice #0
            

            So there are different ways of doing this, I’ve settled on this being the easiest:

            mpv --audio-device='alsa/plughw:CARD=Generic,DEV=3' movie.mp4

            Make sure the tv is connected (with the screen active) or it wont work.

            If you want all sound to be streamed via hdmi edit .asoundrc

            defaults.pcm.!card 0
            defaults.pcm.!device 3
            defaults.ctl.!card 0

            If you want to use the pc speakers

            defaults.pcm.!card SB
            defaults.ctl.!card SB

            I created .asoundrc-hdmi and .asoundrc-speakers that I copy to .asoundrc depending on where I want the audio. But since playing a movie is about 99.99% of my use case I leave .asoundrc in speaker mode and use the mpv one liner when playing a movie on the tv.

            #116085
            Member
            calciumsodium

              If you want all sound to be streamed via hdmi edit .asoundrc

              defaults.pcm.!card 0
              defaults.pcm.!device 3
              defaults.ctl.!card 0

              Hi @blur13,

              Thanks for sharing. I had the same thing in the asound.conf in the /etc folder. Unfortunately, it did not work for me on this computer hooked up via HDMI to this Sanyo TV.
              I also created an ~/.asoundrc file with your suggested code. Unfortunately, your method did not work for me either.

              I have to resort back to pulseaudio to get the TV sound to work via HDMI on this computer. How does pulseaudio make this sound connection to work whereas the /etc/asound.conf or ~/.asoundrc methods above do not? I don’t know enough to understand the files in

              /usr/share/pulseaudio/alsa-mixer/profile-sets

              in order to know how pulseaudio configures alsa-mixer.

              So, I will keep on searching for a way to get pure alsa to work with TV HDMI sound on this machine. Thanks.

              • This reply was modified 10 months, 2 weeks ago by calciumsodium.
              #116087
              Moderator
              Brian Masinick

                I was hoping that we’d gravitate to an eventual solution and perhaps we still will get there. To me it’s pretty obvious that no single approach is likely to work, at least not with “lean” components; that is our biggest challenge.

                Some of the other very well built distributions I use do not have any sound issues. I’ve been able to listen to music and even watch DVD movies and other media for years. For me personally the Pipewire approach is meeting my rather basic needs very well, but I keenly recognize that for many other people that is simply not the case and this is why I have been moderating this conversation to encourage discussion and possibly some changes that will result in some ways to get multimedia of all types working correctly.

                I thank everyone who has been contributing to the conversation; hopefully some solutions will arise out of this process.

                --
                Brian Masinick

                #116093
                Member
                Xunzi_23

                  Hi steves, getting sound systems working correctly is complex and sometimes very frustrating,
                  please let us all try and keep devices working for as many users as possible.

                  We all need to carefully avoid promoting one sound solution fits all as that is unfortunately a
                  fallacy, causes friction, and detracts from improving antiX and user experience.

                  Don`t worry, we have a new day, maybe new problems, I hope more happy users and your apology is
                  well taken.

                  I sometimes get frustrated with alsa too, just sound is better so I like to stick with it, also
                  realise that audigy cards are not optimum due to design limitations, but they are affordable
                  and often available second hand which is good for cash strapped antiX users.

                  #116094
                  Member
                  Xunzi_23

                    https://www.antixforum.com/forums/topic/sound-issues/

                    Is still often useful as are a host of posts in archers forum.
                    No HDMI output seems common but is usually a kernel or config issue, or both :-(…

                    #116097
                    Member
                    blur13

                      @calciumsodium

                      Try

                      mpv --audio-device=help

                      By trial and error, try running

                      mpv --audio-device='one of the listed devices' movie.mp4

                      the single quotation marks around the device are important

                      The ones that mention HDMI would be the ones to try first.

                      If you can get it to work via pulse then you can definitely get it to work via alsa.

                      #116101
                      Member
                      Xunzi_23

                        Thank you blur13
                        mpv –audio-device=help brings up a long list and shows plenty of lurking in the shadows.
                        pipewire and pulse seem to be to some extent still active.

                        will have to look in to ytdlp and mpv config errors. My sound device list is OT and very long.

                        Error parsing option ytdlp-format (option not found)
                        /home/herold/.config/mpv/mpv.conf:7: setting option ytdlp-format=’bv*[height<=?1080]+ba/best’ failed.
                        Error parsing option ytdlp-raw-options (option not found)
                        /home/herold/.config/mpv/mpv.conf:8: setting option ytdlp-raw-options=’no-playlist=’ failed.
                        [ao/pipewire] Headers version: 0.3.76
                        [ao/pipewire] Library version: 0.3.79
                        [W][00109.680501] pw.conf | [ conf.c: 1015 try_load_conf()] can’t load config client-rt.conf: No such file or directory
                        [E][00109.680510] pw.conf | [ conf.c: 1044 pw_conf_load_conf_for_context()] can’t load config client-rt.conf: No such file or directory
                        [ao/pulse] Library version: 16.1.0
                        [ao/pulse] Proto: 35
                        [ao/pulse] Server proto: 4294967295

                        #116102
                        Member
                        Xunzi_23

                          Found below illuminating. seems we are blessed with pipewire due to introduction of flatpack and not mentioned snap.
                          Yet another move toward software propriety infiltration and domination by now IBM Red hat.

                          For video content, we typically rely on the compositor to render our data.
                          For video capture, we usually go directly to the hardware devices, with all security implications and inflexible routing that this brings.
                          For consumer audio, we use PulseAudio to manage and mix multiple streams from clients.
                          For Pro audio, we use JACK to manage the graph of nodes.

                          None of these solutions (except perhaps to some extent Wayland) however were designed to support the security features that are required when dealing with flatpaks or other containerized applications.

                          PipeWire aims to solve this problem and provides a unified framework to run both consumer and pro audio as well as video capture and processing in a secure way.

                          It was so securely useless that this user and supporter of antiX ran away.

                          #116291
                          Member
                          PPC

                            Hi, everyone. Real life problems have been keeping me away from posting in the Forum, and from using antiX in general.

                            I’ve still kept an eye on the forum, and noticed that, in https://www.antixforum.com/forums/topic/pipewire-and-volume-icon-startup-proposed-solution-for-antix-23/, it seems that a solution for the problems starting pipewire has been found, and if so, it should be included in a future .1 release- it anticapitalista chooses to keep pipewire installed and enabled by default.
                            But the problem the “switch GUI” aims to solve was not just that (pipewire not producing sound at all) but also making sure that people that prefer just plain Alsa sound have an easy way to achieve that…
                            I’ve seen several ways to disable pipewire (the common point seems to be deleting it’s folder, so apps don’t find it and expect it to be present)- the one that works best can be implemented in the GUI- I’ve not had time to test any of those solutions, since I’ve not yet installed antiX-23- I just tested it live. If this is route that you folks, and the Dev team wants to go, the switch to “enable/disable Pipewire” can evolve to something like a switch to “install and enable/uninstall and disable Pipewire”. That would imply a major reworking of the script- including a confirmation window, warning that Pipewire will be uninstalled, and that re-enabling it would require an internet connection to reinstall it…

                            P.

                            #116333
                            Moderator
                            Brian Masinick

                              Hi @PPC, given that a sufficient number of people have found the Pipewire solution NOT to work favorably, it does seem wise to invest additional resources to cover both scenarios – the one where Pipewire IS a viable and useful solution AND the one where Pipewire has been nothing but frustrating and non-functional; there are enough individuals expressing opinions on both sides to warrant further work on tools that take these factors into account.

                              Anyone also capable of assisting @PPC or taking what he’s done and resolving the ways to accomodate those people that prefer just plain Alsa sound would be valued and appreciated!
                              If not, I’m sure that @PPC will attempt to be helpful once again when he has time and resources available. (Tell me if that’s not the case @PPC and we’ll make further pleas for others to arise to provide their assistance and expertise).

                              Thanks all!

                              --
                              Brian Masinick

                              #117065
                              Member
                              anti-apXos

                                At least on my system, in order to switch between ALSA and Pipewire, the two Pipewire symlinks in /etc/alsa/conf.d also need to be created/removed and alsa needs to be re-initialized using alsactl init 0. If I do that as well as starting or stopping the pipewire, pipewire-pulse, and wireplumer processes, I find I can switch between ALSA and Pipewire very cleanly without restarting. In fact, some of the issues I had with Pipewire appear to be resolved when it’s started this way after the system has been using pure ALSA.

                                A simple toggle script (needs sudo):

                                  if [ $(pidof pipewire) ]; then
                                    # Remove the links to the ALSA pipewire config files
                                    rm /etc/alsa/conf.d/50-pipewire.conf
                                    rm /etc/alsa/conf.d/99-pipewire-default.conf
                                    # Kill pipewire (which also hopefully kills pipewire-pulse and wireplumber)
                                    pkill pipewire
                                    # Re-init ALSA card 0 for ALSA
                                    alsactl init 0
                                  else
                                    # Create new links to the ALSA pipewire config files
                                    ln -s /usr/share/alsa/alsa.conf.d/50-pipewire.conf /etc/alsa/conf.d/50-pipewire.conf
                                    ln -s /usr/share/alsa/alsa.conf.d/99-pipewire-default.conf /etc/alsa/conf.d/99-pipewire-default.conf
                                    # Re-init ALSA card 0 for pipewire
                                    alsactl init 0
                                    # Start pipewire (which handles starting of pipewire-pulse and wireplumber, see ~/.config/pipewire/pipewire.conf)
                                    pipewire &
                                  fi
                                

                                I don’t know if that would work on other systems (definitely might need to change which card is inited) or if it’s even useful for anyone else. Since I prefer to use ALSA, but need Pipewire ocassionally for headphones, this is good for me.

                                #120635
                                Member
                                abc-nix

                                  @anti-apXos already had a good proposal for disabling/enabling pipewire without restarting (I tested this and it works). I will adapt this into the toggle_pipewire script, requiring sudo only for the symlink creation/deletion and alsactl reload. Much better than having the full script require sudo, as starting pipewire should be done by the user and not root.

                                Viewing 15 posts - 16 through 30 (of 73 total)
                                • You must be logged in to reply to this topic.