Pipewire and volumeicon startup proposed solution for antiX 23

Forum Forums General Tips and Tricks Pipewire and volumeicon startup proposed solution for antiX 23

  • This topic has 138 replies, 18 voices, and was last updated Jan 31-10:54 pm by Brian Masinick.
Viewing 15 posts - 1 through 15 (of 139 total)
  • Author
    Posts
  • #116146
    Member
    abc-nix

      If you are running antiX 23 full, or have installed pipewire on your antiX computer, you may find that sometimes your volume-icon doesn’t show up in the toolbar or that audio is not working at all.

      Because pipewire isn’t configured as a service (except for systemd) to be launched with your init system or service manager, you are probably starting pipewire and it’s other components from a script managed by your startup solution. The order in which pipewire and its components need to start is important, and should generally follow these steps:

      1. First start pipewire, the audio and video server. (you generally always start the server before the components).
      2. You then start the modular session manager for pipewire. Before, the tool pipewire-media-session was used, but currently the recommended tool is called wireplumber.
      3. (Optional) You then launch the different pipewire pluggins and programs that interface with pipewire. If you want pulseaudio compatibility, this would be the pipewire-pulse daemon. If you want to control the audio configuration with a tool like volumeicon in the system tray of your toolbar, or modify audio properties with a tool like easyeffects, you will need to start them after pipewire and wireplumber are ready.

      The time it takes for each program to launch must be taken into account. You need to be sure that pipewire is ready before starting the other components. If a component starts too early, it will not interface properly with the pipewire server, and will exit its operation, failing to launch. This race condition is what leads to problems, like no audio output or a missing volume icon in your system tray.

      You could try solving this issue by delaying the startup of each process, to control the time each step has to wait for before launching. This is the usual process you will find in the antiX $HOME/.desktop-session/startup file. Different commands will have a sleep time set for their launch.

      Another alternative is to let the pipewire server be the one in charge of starting the different programs that depend on it. This built-in solution can be managed using the pipewire configuration file. In this way, we know that the programs will only launch once the pipewire server is ready.

      In Debian, the default configuration file for pipewire can be found in /usr/share/pipewire/pipewire.conf, which will manage the pipewire configuration for the whole system. If you want to manage only the configuration for your user account, and not risk pipewire updates to undo the changes, I recommend creating a configuration folder for pipewire inside your home folder and copying the configuration file there. This way, you can control pipewire for your user, and also move it with you to different installations when migrating in the future.

      First, create the pipewire config folder for your user. Using your file manager of choice, enter the .config directory for your user and create a folder named “pipewire”. Alternatively, from the terminal:
      mkdir $XDG_CONFIG_HOME/pipewire

      Second, copy the pipewire.conf file from /usr/share/pipewire/ to the new pipewire folder in the .config folder for your user. Alternatively, from the terminal:
      cp /usr/share/pipewire/pipewire.conf $XDG_CONFIG_HOME/pipewire/

      Third, edit the pipewire.conf file you just copied over. You need to add the lines for starting the components you want launched once the pipewire server is ready. Inside the section that starts with context.exec, you can add for wireplumber:
      { path = "wireplumber" args = "" }
      and below it, you can optionally add the instruction for starting pipewire-pulse:
      { path = "pipewire-pulse" args = "" }

      Once you have added all components that depend on pipewire, edit the startup script you initially used for launching pipewire with your desktop. You could even replace this script with the command to only start pipewire, as the pipewire server will now be in charge of launching its components. If you are using the desktop-session startup option for antiX, edit it and remove the line:
      pipewire-start &
      replacing it with
      pipewire &

      Save and reboot the system.

      I hope this small tutorial will help solve the current issues you may be experiencing with pipewire. Any questions will be answered as best as I know and can.

      • This topic was modified 5 months, 3 weeks ago by abc-nix. Reason: Changed volumeicon name
      • This topic was modified 5 months, 3 weeks ago by abc-nix. Reason: Specify antiX 23 full release
      #116154
      Member
      olsztyn

        Nice tutorial… It should be quite helpful to pipewire users.
        Thanks.

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

        #116193
        Moderator
        Brian Masinick

          I’ve already applied this to my runit instance, saved it and restarted the system and sound continues to work.
          I’m now on my sysVinit instance, where Pipewire sound is also working and I’ve just applied the suggested
          script changes, and I’ll verify them here too, of course expecting them to work since they did work on my
          other system instance.

          --
          Brian Masinick

          #116194
          Moderator
          Brian Masinick

            The details provided in post #116146 work for both my runit and sysVinit antiX 23 systems; confirmed!

            --
            Brian Masinick

            #116205
            Member
            stevesr0

              Hi abc-nix,

              This is a very clear tutorial. Thank you.

              I will report back after getting a chance to test it.

              stevesr0

              #116481
              Member
              ultas

                Sorry, I tried to follow all steps and after restart can’t see any volume icon anywhere.

                #116488
                Moderator
                caprea

                  Thanks ultas, I see the same if I edit the desktop-session startup file from
                  pipewire-start &
                  to
                  pipewire &

                  With pipewire-start & however pipewire works as expected here,included the volumeicon.Could others test?

                  @abc-nix, please have a look.When I confirmed the above method in another thread, no changes were made to the startup file at all.
                  Edit: Pipewire & seems to work now.Sorry for the false alarm.

                  ultas, probably the volumeicon needs more time on your hardware. You could try to change the line in startup file
                  sleep 5 && volumeicon &
                  to
                  sleep 7 && volumeicon &

                  Edit2: We need more testers.

                  • This reply was modified 5 months, 3 weeks ago by caprea.
                  • This reply was modified 5 months, 3 weeks ago by caprea.
                  #116502
                  Member
                  abc-nix

                    @caprea, when writing the tutorial, I was trying to find the simplest step for editing how pipewire started. I ended up deciding to give all instructions without sudo, so that there is no need to use the password to make the changes. That is why instead of editing /usr/local/bin/pipewire-start, I decided to replace the command in the startup file.

                    Editing both should have the same effect, but probably the initial solution of editing /usr/local/bin/pipewire-start should be the default. If it is confirmed that the pipewire-start method is better (just for the reason that it checks to see if pipewire is already running), I will edit the original post.

                    Edit2: We need more testers.

                    This. Hopefully more people can chip in and share their experience.

                    #116505
                    Moderator
                    Brian Masinick

                      I’m sure there’s an optimal way to do all of this; maybe I’m “fortunate”, at least on my newest system.
                      I’ve been able to use sound and video regardless of which approach I’ve taken with antiX 23 and the sound alternatives we’ve offered and the suggestions that have been made.

                      I admit that though I’ve installed and tested antiX 23 to some degree on all of them, but I haven’t exercised the sound nearly as much on the others because I use my HP-14 much more, but still I’ve had fortunate success.

                      --
                      Brian Masinick

                      #116506
                      Moderator
                      caprea

                        Brian , I am very optimistic that the proposal described by abc-nix above works.
                        I was affected by wireplumber sometimes not starting and had not found time during the beta phase to test the new pipewire-start script extensively, which is annoying and bothers me now.

                        abc-nix, that was nothing but a false alarm.Sorry for this.Your suggested solution works fine, at least here on my hardware.

                        #116508
                        Member
                        olsztyn

                          With pipewire-start & however pipewire works as expected here,included the volumeicon.Could others test?

                          I just want to mention that I have been running with abc-nix’s methodology since it was posted and it works for me perfectly every time. This is consistent with subsequent posts in this thread.
                          Time delay for volumeicon will likely to be varied, depending on specific machines.
                          My implementation for volume icon is a bit different and I am using sleep 2, although sleep 1 also works but not 100% of occurrences.

                          • This reply was modified 5 months, 3 weeks ago by olsztyn.

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

                          #116515
                          Member
                          marcelocripe

                            caprea wrote:
                            ultas, probably the volumeicon needs more time on your hardware. You could try to change the line in startup file
                            sleep 5 && volumeicon &
                            to
                            sleep 7 && volumeicon &

                            Edit2: We need more testers.

                            I just changed “sleep 5” to “sleep 7” in the “startup” file. I’ll test it for the next few days and then I’ll come back here to tell you if it worked for me.
                            Thank you.

                            – – – – –

                            caprea wrote:
                            ultas, probably the volumeicon needs more time on your hardware. You could try to change the line in startup file
                            sleep 5 && volumeicon &
                            to
                            sleep 7 && volumeicon &

                            Edit2: We need more testers.

                            Eu fiz apenas a alteração do “sleep 5” para “sleep 7” no arquivo “startup”. Eu irei testar pelos próximos dias e depois eu retorno aqui para contar se funcionou para mim.
                            Obrigado.

                            #116517
                            Moderator
                            Brian Masinick

                              Brian , I am very optimistic that the proposal described by abc-nix above works.
                              I was affected by wireplumber sometimes not starting and had not found time during the beta phase to test the new pipewire-start script extensively, which is annoying and bothers me now.

                              abc-nix, that was nothing but a false alarm.Sorry for this.Your suggested solution works fine, at least here on my hardware.

                              Both of the ideas work for me; on older systems maybe the delays are needed to account for slower process initiation.

                              When I say both ideas. I mean what abc-nix shared earlier and his recent suggestions both work for me.

                              --
                              Brian Masinick

                              #116524
                              Moderator
                              caprea

                                Both of the ideas work for me; on older systems maybe the delays are needed to account for slower process initiation.

                                You are certainly very fortunate.The pipewire-start scripts do not work for me.Wireplumber is not always loaded,then there’s no sound.The above method from abc-nix until now works perfect here. It seems on some older systems also a longer delay for volumeicon is needed.

                                #116532
                                Member
                                ultas

                                  Sorry friend, I changed 5 to 10 but the volume icon does not shwoing anywhere.

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