Pipewire without systemd

Forum Forums New users New Users and General Questions Pipewire without systemd

  • This topic has 132 replies, 11 voices, and was last updated Mar 7-12:58 am by stevesr0.
Viewing 15 posts - 106 through 120 (of 133 total)
  • Author
    Posts
  • #100927
    Member
    olsztyn
      Helpful
      Up
      0
      ::

      Thank you @stevesr0 for your contribution, particularly in the area of Pipewire accomplishment.

      A person that I dearly miss is Xecure, who provided a wealth of knowledge in this area and developed many pieces of modern antiX infrastructure, such as Runit init system. I am still searching old posts by Xecure to refresh understanding of various mechanisms in antiX architecture. Unfortunately he decided to leave antiX forum, being too gentle to endure certain polemics. If he ever reads this I want him to know that he and his contribution will never be forgotten…

      To follow up:
      At this point (as summarized in antiX 23 thread), quite a few of us are able to run Pipewire sound (along with Bluetooth support) completely *elogind*-free. This is thanks to all necessary pipewire related components modified to be *elogind*-free by anticapitalista.

      What is the next challenge for me is to streamline the sequence of starting the components of pipewire infrastructure. So far I have been following the @Caprea’s tip to use session startup for this.
      I have been experimenting with setting up Runit user services for individual pipewire components, setting up ./runit/sv and runsvdir, following some info found in Artix and Devuan related to pipewire. However not quite successful yet in antiX.
      As we know, @Xecure, the ultimate expert in Runit who left this forum, successfully created Runit user services for pipewire, however I have not been able to find details on how to define start files in ./runit/sv as prerequisite to ./runit/runsvdir.
      If anyone has details of pipewire runit user services for antiX, such info would be greatly appreciated…
      Thanks and Regards…

      • This reply was modified 2 months, 1 week ago by olsztyn.
      • This reply was modified 2 months, 1 week ago by olsztyn.

      Live antiX Boot Options (Previously posted by Xecure):
      https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_Parameters

      #100966
      Member
      stevesr0
        Helpful
        Up
        0
        ::

        Hi olsztyn,

        I saw there is information about setting up Pipewire runit services in a GitHub site, (https://github.com/madand/runit-services/blob/master/README.md).

        I haven’t tried it, as I haven’t used Pipewire on a system running runit.

        stevesr0

        P.S. I agree completely with your thoughts about Xecure.

        • This reply was modified 2 months, 1 week ago by stevesr0.
        #100968
        Member
        olsztyn
          Helpful
          Up
          0
          ::

          I saw there is information about setting up Pipewire runit services in a GitHub site

          Thanks. Yes. I have seen this and some of my initial attempt was based on this info. However this site does not provide critical info on how to define start files for pipewire, just tells to clone from somewhere. Basically it provides general info only, not details of start files. This is what I am missing at this point. Have tried to adapt similar files from existing runit services but none of my modificaations of them seems to work. I was hoping someone would have those…
          Thanks and Regards…

          Live antiX Boot Options (Previously posted by Xecure):
          https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_Parameters

          #100969
          Forum Admin
          anticapitalista
            Helpful
            Up
            0
            ::

            Running pipewire doesn’t need any service files for runit, sysvinit or even the dreaded systemd as far as I am aware.
            Why do you want it? Seems to me to be a solution looking for a problem.

            Philosophers have interpreted the world in many ways; the point is to change it.

            antiX with runit - leaner and meaner.

            #100970
            Member
            olsztyn
              Helpful
              Up
              0
              ::

              Running pipewire doesn’t need any service files for runit, sysvinit or even the dreaded systemd as far as I am aware.
              Why do you want it?

              Yes. Indeed. You are right, of course. They are not required, in principle…
              However the reason for runit user services to start pipewire components (pipewire, wireplumber, pipewire-pulse) is that starting them from desktop session startup or individual WMs startup causes running into issue of sequencing them correctly.
              So e.g. wireplumber must start after pipewire has fully initialized and similarly pipewire-pulse after both preceding ones are fully up. Injecting some ‘sleep 5’ wait between each one is only a workaround expecting when they will be able to initialize and not a reliable or clean solution.
              On the other hand, defining them as runit user services will allow to define their dependencies and sequence their startup.
              If there is a way other than structuring them as runit user services I will appreciate such info…

              • This reply was modified 2 months, 1 week ago by olsztyn.
              • This reply was modified 2 months, 1 week ago by olsztyn.

              Live antiX Boot Options (Previously posted by Xecure):
              https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_Parameters

              #100978
              Member
              olsztyn
                Helpful
                Up
                0
                ::

                Seems to me to be a solution looking for a problem.

                This is a great statement in itself, just attracted my attention. I like it a lot…

                Live antiX Boot Options (Previously posted by Xecure):
                https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_Parameters

                #101013
                Member
                stevesr0
                  Helpful
                  Up
                  0
                  ::

                  Hi olsztyn,

                  Have you looked at this page: https://forum.artixlinux.org/index.php/topic,4202.0.html ?

                  Reply #7 suggests a way to configure that might be what you want (or not)?

                  stevesr0

                  #101019
                  Member
                  olsztyn
                    Helpful
                    Up
                    0
                    ::

                    Have you looked at this page: https://forum.artixlinux.org/index.php/topic,4202.0.html ?
                    Reply #7 suggests a way to configure that might be what you want (or not)?

                    Thanks @stevesr0 for pointing this out…
                    I have looked at this page before and I think you are right that this might be the way to deal with pipewire. I have not got to the details yet but it looks promising at first glance.
                    My general concern, whichever way to ensure sequence of starting pipewire components:
                    – Why is this needs to be so complicated?
                    Anticapitalista is right in principle. It should be the ressponsibility of pipewire design to ensure these components start seamlessly and reliably, even if they are just listed in desktop session startup. It appears to me this is not the case though and I believe some reports of pipewire sometimes working and sometimes no sound coming out after reboot might be related to timing of these components startup.
                    Before I find a reliable way I am following @Caprea advice to inject ‘sleep 4 or 5’ between each pipewire component in desktop session startup. And it works fine, including volume icon popping up after sleep 5 delay.
                    However this seems a workaround about this issue and it seems to me that on fast computers it usually works even without ‘sleep 5’ delays, but on slower computers this seems not the case and sometimes with less time delay such as ‘sleep 3’ I may not even see volume icon pop up in tray as the preceding pipewire components may have not enough time to initialize correctly.
                    My conjecture is that the reason @Xecure was using Runit user services for pipewire components is to implement a reliable startup sequence with no artificial timing delays but I have not seen details of this.
                    In any case I will be further looking into the post # 7 in the link you provided above.
                    Thanks and Regards…

                    • This reply was modified 2 months, 1 week ago by olsztyn.

                    Live antiX Boot Options (Previously posted by Xecure):
                    https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_Parameters

                    #101026
                    Forum Admin
                    dolphin_oracle
                      Helpful
                      Up
                      0
                      ::

                      I put this script (pipewire-start) called from an autostart entry

                      MX will be using this.

                      #/bin/bash
                      
                      INITCHECK=$(/usr/bin/ps -p 1 -o cmd -h)
                      echo $INITCHECK
                      if [ "$INITCHECK" = "/lib/systemd/systemd" ]; then 
                      	exit 0
                      fi
                      #else start them up
                      echo "start pipewire"
                      /usr/bin/pipewire &
                      /usr/bin/pipewire-pulse & 
                      /usr/bin/wireplumber &
                      
                      exit 0
                      #101030
                      Member
                      olsztyn
                        Helpful
                        Up
                        0
                        ::

                        MX will be using this.

                        Thanks D/O…
                        Please let me know if I am understanding correctly, if you do not mind:
                        – Check for ‘systemd’ – If it is on Systemd MX then script just ends with return code 0 without initializing pipewire components?
                        – If the check for ‘systemd’ is negative then it executes the pipewire initialization?

                        If my understanding is correct:
                        – You do not expect timing issues with initializing these three components of pipewire.
                        – Pipewire-pulse is started here before wireplumber, not the other way round?

                        Then this seems no different than running the same in desktop session startup and with no ‘sleep’ timing delays at all.
                        Now I am confused… Perhaps I have been looking for complicated solutions, not having a problem in the first place as anticapitalista pointed out, after all…
                        Thanks and Regards.

                        Live antiX Boot Options (Previously posted by Xecure):
                        https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_Parameters

                        #101033
                        Member
                        PPC
                          Helpful
                          Up
                          0
                          ::

                          From what I read from DO’s post- it seems that the answer to all your questions is “yes”.
                          On antiX that doesn’t use systemd as init system, the script can be shortened to:

                          
                          #/bin/bash
                          echo "start pipewire"
                          /usr/bin/pipewire &
                          /usr/bin/pipewire-pulse & 
                          /usr/bin/wireplumber &
                          exit 0

                          You can try it out and let us know how it works…

                          P.

                          #101035
                          Member
                          olsztyn
                            Helpful
                            Up
                            0
                            ::

                            Thank you PPC… I will at the earliest convenience…

                            Live antiX Boot Options (Previously posted by Xecure):
                            https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_Parameters

                            #101037
                            Forum Admin
                            dolphin_oracle
                              Helpful
                              Up
                              1
                              ::

                              PPC is on the money.

                              sysVinit doesn’t have the concept of user services, so autostart is the easiest way to go. I’ve been running this for a long time without issue.

                              and yes, I’ve had the best success with running wireplumber last

                              #101040
                              Member
                              olsztyn
                                Helpful
                                Up
                                0
                                ::

                                sysVinit doesn’t have the concept of user services, so autostart is the easiest way to go. I’ve been running this for a long time without issue.
                                and yes, I’ve had the best success with running wireplumber last

                                Thank you D/O…
                                This looks like the best and simplest way… Perhaps my thinking that pipewire-pulse must be started after wireplumber confused me and my results…
                                Greatly appreciate this advice.

                                Live antiX Boot Options (Previously posted by Xecure):
                                https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_Parameters

                                #101045
                                Member
                                olsztyn
                                  Helpful
                                  Up
                                  0
                                  ::

                                  Just want to report my initial testing of this setup:
                                  Machine – Thinkpad X220, i5, 4Gb.

                                  – At first all worked great. Pipewire, pipewire-pulse and wireplumber initialized fine. Volumeicon showed up quickly (not like with all those sleep delays, which caused volumeicon show after quite some time). Sound worked both on internal speakers and Bluetooth speaker just fine.
                                  By the way, I am testing all on Grup Yorum music run from SMTube, routing to MPV…
                                  – Rebooted several times and still all pipewire processes started and all worked as expected…
                                  – Another reboot and suddenly a negative result – wireplumber process did not start. Subsequently no sound. Pipewire and pipewire-pulse processes were started. This was reminiscent of some reports I read that sometimes pipewire did not work sometimes after reboot.

                                  This issue of wireplumber failing to start occasionally:
                                  I will be testing further how often this happens after reboot. This might be related to the timing of startup sequence I was ranting about but also may not. I do not have sufficient understanding of pipewire infrastructure to tell for sure.
                                  For me it is more important if I can make it work reliably.

                                  The important for me is the Dolphin_Oracle tells me this simple sequence does work so it must be my machine, insufficient power of this machine or something else that caused this failure. I will test on other machines, both more powerful and less powerful to nail this issue down…
                                  Thanks and Regards…

                                  Live antiX Boot Options (Previously posted by Xecure):
                                  https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_Parameters

                                Viewing 15 posts - 106 through 120 (of 133 total)
                                • You must be logged in to reply to this topic.