LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-09-2020, 11:35 AM   #16
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,810

Rep: Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447

Incidentally AlienBob has a decent tutorial on "shoving pulse to the curb" by substituting JACK here >>> https://alien.slackbook.org/blog/con...-use-as-a-daw/ and it should be noted that there is a LiveSlak DAW version if you prefer trying it first and seeing it's innards up close and personal.
 
3 members found this post helpful.
Old 12-09-2020, 12:03 PM   #17
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,570

Rep: Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438
Quote:
Originally Posted by walecha View Post
Just tested pipewire-pulse here by removing pulseaudio.desktop from /etc/xdg/autostart, then created pipewire and pipewire-pulse .desktop entry in /etc/xdg/autostart. Works great on plasma5

Code:
$ ps axww | grep -E 'pulse|pipewire'
23806 ?        Sl     0:00 /usr/bin/pipewire-pulse
23829 ?        Sl     0:00 /usr/bin/pipewire
23835 ?        Sl     0:00 /usr/bin/pipewire-media-session
Now I can remove kill pulseaudio line from my logout script. Thanks for the hint.
Nice!

BUT, I have some little bad news for you...

PulseAudio is (at least somewhat) aware of elogind (and ConsoleKit2 also) and it tries to auto-quit itself on user logout.

However, from my own experience of playing with Wayland/Plasma5, the Pipewire is a "user target" service, expected to be run by systemd.

And you know what is the irony? An "user target" service for systemd is completely unaware of the noble art of user authentication from systemd or whatever. Essentially, it is just a program which should be killed by systemd at user logout.

HOWEVER, our elogind has no such features, all it can do it to kill ALL user processes at user logout - which also will kill screen or tmux, making some people unhappy.

So, I suggest you to tune your logout script to kill the PipeWire processes.

Last edited by LuckyCyborg; 12-09-2020 at 12:12 PM.
 
1 members found this post helpful.
Old 12-09-2020, 12:36 PM   #18
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,810

Rep: Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447Reputation: 4447
Well LuckyCyborg isn't that only true if you "startx" or "startfluxbox" etc. ? If you use SDDM as root, you can drop to any Runlevel 3 login with Ctrl-Alt-F(number) key. I just wish it was still offered an option to kill X in the process like KDM and early SDDM did. Commands even by a separate root login like "killall sddm" do nothing now. It pisses me off if I employ any part of X and decide to do something out of X, I have to reboot entirely just like freaking Windows FFS.
 
1 members found this post helpful.
Old 12-09-2020, 12:56 PM   #19
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Quote:
Originally Posted by enorbet View Post
Well LuckyCyborg isn't that only true if you "startx" or "startfluxbox" etc. ? If you use SDDM as root, you can drop to any Runlevel 3 login with Ctrl-Alt-F(number) key. I just wish it was still offered an option to kill X in the process like KDM and early SDDM did. Commands even by a separate root login like "killall sddm" do nothing now. It pisses me off if I employ any part of X and decide to do something out of X, I have to reboot entirely just like freaking Windows FFS.
init 3
 
3 members found this post helpful.
Old 12-09-2020, 05:16 PM   #20
garpu
Senior Member
 
Registered: Oct 2009
Distribution: Slackware
Posts: 1,600

Rep: Reputation: 925Reputation: 925Reputation: 925Reputation: 925Reputation: 925Reputation: 925Reputation: 925Reputation: 925
I was one of the pulse haters, and when I installed current, I didn't bother to turn it off. And...it really doesn't get in my way much. When jack's running, it isn't. (And I shouldn't be surfing youtube videos of urban explorers while writing music, anyway, but if I wanted to, Alien Bob's got a package that acts as a shim between the two.) I was leery of pulse for a good, long time, and it's bad for the kinds of music things I do. But when I'm not working on supercollider, pulse isn't noticeable.

Now watch, big issue will happen with an update, and I'll eat my words.
 
Old 12-09-2020, 05:58 PM   #21
mumahendras3
Member
 
Registered: Feb 2018
Location: Indonesia
Distribution: Slackware-current + s6 + s6-rc + s6-linux-init (github.com/mumahendras3/sl6ckware)
Posts: 126

Rep: Reputation: Disabled
Quote:
Originally Posted by enorbet View Post
Commands even by a separate root login like "killall sddm" do nothing now. It pisses me off if I employ any part of X and decide to do something out of X, I have to reboot entirely just like freaking Windows FFS.
Instead of
Code:
killall sddm
, you have to use
Code:
killall sddm.bin
if you want to kill the main SDDM process. "sddm" is just a wrapper script that will eventually execute the real SDDM process. If you run "killall sddm" while plasma is running, you will only kill the sddm wrapper script, not the main SDDM process itself, thus leaving SDDM and KDE plasma still running. I have already made a request last month (details in: https://www.linuxquestions.org/quest...ml#post6182882) suggesting to prepend "exec" to the "/usr/bin/sddm.bin" invocation in the /usr/bin/sddm wrapper script to avoid this kind of behaviour, but so far it's not applied yet. It's probably a low priority for Mr. Volkerding since you can still avoid it by never running "killall sddm" but instead just run "init 3" from the console (just like Mr. Hameleers suggested).

Last edited by mumahendras3; 12-09-2020 at 06:20 PM. Reason: Changing to a better and more approriate wording
 
1 members found this post helpful.
Old 12-09-2020, 08:55 PM   #22
hpfeil
Member
 
Registered: Nov 2010
Location: Tucson, Arizona US
Distribution: Slackware Current
Posts: 357
Blog Entries: 1

Rep: Reputation: Disabled
KDE pretty-much uses pulseaudio. Since it is built on alsa, alsamixer and its friends work as well. Whenever I need to run jack for low-latency:

Code:
pasuspender -- jackd -d alsa -d hw:1
Then I can use the patchbay in QjackCtl to connect things up. When finished, ps ax | grep jack to kill the jack process and pulseaudio is restored so I can return to vlc playing the Bach streams at http://38.96.148.28:8342/ or http://audio.wgbh.org/Bach-8108-aac
 
1 members found this post helpful.
Old 12-10-2020, 09:24 AM   #23
0XBF
Member
 
Registered: Nov 2018
Distribution: Slackware
Posts: 795

Rep: Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912
Quote:
Originally Posted by walecha View Post
Just tested pipewire-pulse here by removing pulseaudio.desktop from /etc/xdg/autostart, then created pipewire and pipewire-pulse .desktop entry in /etc/xdg/autostart. Works great on plasma5

Code:
$ ps axww | grep -E 'pulse|pipewire'
23806 ?        Sl     0:00 /usr/bin/pipewire-pulse
23829 ?        Sl     0:00 /usr/bin/pipewire
23835 ?        Sl     0:00 /usr/bin/pipewire-media-session
Now I can remove kill pulseaudio line from my logout script. Thanks for the hint.
You can also keep the autostarting user specific with the ~/.config/autostart directory, which lets you leave the /etc/xdg/autostart directory as is.

In my case I copied the pulseaudio.desktop file from /etc/xdg/autostart/ to my ~/.config/autostart and then edited the desktop entry to include "NotShowIn=KDE", which prevents it from starting in KDE for my user only. You could alternatively opt for "Hidden=True" to disable the autostarting entirely. Note that the ~/.config/autostart entries takes precedence over the /etc/xdg/autostart directory for a .desktop entry with the same name.

Then I added pipewire.desktop and pipewire-pulse.desktop entries, also in the ~/.config/autostart directory. These I set to "OnlyShowIn=KDE". This results in pipewire only launching for my user, for a Plasma 5 session (x or wayland), while still launching pulseaudio in the other desktop environments.

I did notice that pipewire doesnt end cleanly as LuckyCyborg has pointed out. Since I'm running pipewire in plasma only I added a "plasma_shutdown.sh" script in ~/.config/plasma-workspace/shutdown/ with the following:
Code:
#!/bin/sh
kill $(pidof pipewire)
kill $(pidof pipewire-pulse)
So far everything seems to be working and stopping when needed, and I'm getting sound through pipewire in a plasma session. Now to figure out the JACK integration and see if the realtime performance is any good out of pipewire.
 
2 members found this post helpful.
Old 12-10-2020, 09:34 AM   #24
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Keep the posts on pipewire in Plasma5 coming!
 
1 members found this post helpful.
Old 12-10-2020, 10:12 AM   #25
philanc
Member
 
Registered: Jan 2011
Posts: 308

Rep: Reputation: 273Reputation: 273Reputation: 273
Quote:
Originally Posted by hpfeil View Post
... so I can return to vlc playing the Bach streams at http://38.96.148.28:8342/ or http://audio.wgbh.org/Bach-8108-aac
(OT) Thanks for the Bach streams!
 
Old 12-10-2020, 10:22 AM   #26
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Quote:
Originally Posted by hpfeil View Post
KDE pretty-much uses pulseaudio. Since it is built on alsa, alsamixer and its friends work as well. Whenever I need to run jack for low-latency:

Code:
pasuspender -- jackd -d alsa -d hw:1
Then I can use the patchbay in QjackCtl to connect things up. When finished, ps ax | grep jack to kill the jack process and pulseaudio is restored so I can return to vlc playing the Bach streams at http://38.96.148.28:8342/ or http://audio.wgbh.org/Bach-8108-aac
I run everything through JACK and Pulse is merely a conduit. Using QJackCtl to start and configure all of it.
Needs a few additional packages, see https://alien.slackbook.org/blog/con...-use-as-a-daw/
 
Old 12-10-2020, 01:29 PM   #27
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,570

Rep: Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438Reputation: 3438
Quote:
Originally Posted by 0XBF View Post
I did notice that pipewire doesnt end cleanly as LuckyCyborg has pointed out. Since I'm running pipewire in plasma only I added a "plasma_shutdown.sh" script in ~/.config/plasma-workspace/shutdown/ with the following:
Code:
#!/bin/sh
kill $(pidof pipewire)
kill $(pidof pipewire-pulse)
So far everything seems to be working and stopping when needed, and I'm getting sound through pipewire in a plasma session. Now to figure out the JACK integration and see if the realtime performance is any good out of pipewire.
You probably do not want to kill all pipewire daemon instances.

Because for every user login session may is started an pipewire instance. IF somehow you are able to kill an other user pipewire daemon, his/her Wayland/Plasma5 desktop will crash totally. This will be certainly not so fun in a multi-seat setup (which is supported by elogind) or while running several desktops in parallel.

So, maybe this is a better solution:
Code:
#!/bin/sh
pkill -u $USER pipewire-pulse
pkill -u $USER pipewire
And probably you will want this particular order, because the master program is the pipewire daemon.

Last edited by LuckyCyborg; 12-10-2020 at 01:39 PM.
 
3 members found this post helpful.
Old 12-10-2020, 03:10 PM   #28
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by LuckyCyborg View Post
Because for every user login session may is started an pipewire instance. IF somehow you are able to kill an other user pipewire daemon, his/her Wayland/Plasma5 desktop will crash totally. This will be certainly not so fun in a multi-seat setup (which is supported by elogind) or while running several desktops in parallel.
Any non-root user shouldn't be able to kill other users' processes, but that is a good change anyway (in case root runs Plasma5, even if it isn't recommended).
 
Old 12-10-2020, 05:20 PM   #29
0XBF
Member
 
Registered: Nov 2018
Distribution: Slackware
Posts: 795

Rep: Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912Reputation: 912
Quote:
Originally Posted by LuckyCyborg View Post
You probably do not want to kill all pipewire daemon instances.

Because for every user login session may is started an pipewire instance. IF somehow you are able to kill an other user pipewire daemon, his/her Wayland/Plasma5 desktop will crash totally. This will be certainly not so fun in a multi-seat setup (which is supported by elogind) or while running several desktops in parallel.

So, maybe this is a better solution:
Code:
#!/bin/sh
pkill -u $USER pipewire-pulse
pkill -u $USER pipewire
And probably you will want this particular order, because the master program is the pipewire daemon.
That's a reasonable precaution. I had only been testing pipewire for my user account and wasn't thinking about the multiuser situation. With my setup, pipewire starts and stops with plasma, hence killing both at the end. Not claiming best practice here, just trying to get started on experimenting.

I take it you run pipewire system wide from /etc/autostart/pipewire.desktop and then launch pipewire-pulse during your wayland or X session from your user?

It's hard to know the best practice for running pipewire when the documented method is with a user targeted systemd service. Not sure how to mimic that functionality without systemd so I guess we try to come up with the best alternative. The software still works, it's just too bad the daemon can't manage itself a little nicer.
 
2 members found this post helpful.
Old 12-11-2020, 12:17 AM   #30
ZhaoLin1457
Senior Member
 
Registered: Jan 2018
Posts: 1,045

Rep: Reputation: 1253Reputation: 1253Reputation: 1253Reputation: 1253Reputation: 1253Reputation: 1253Reputation: 1253Reputation: 1253Reputation: 1253
Quote:
Originally Posted by 0XBF View Post
It's hard to know the best practice for running pipewire when the documented method is with a user targeted systemd service. Not sure how to mimic that functionality without systemd so I guess we try to come up with the best alternative. The software still works, it's just too bad the daemon can't manage itself a little nicer.
After asking my Fedora friends about what systemd do with the "user target" daemons, I started to believe that the best way to simulate this systemd feature is to use a daemon supervisor, an idea which I borrowed from a post made by LuckyCyborg.

A bit of background: a daemon supervisor is a daemon which is able to run in background a given program and ideally to start only a single instance which is watched for its properly run, eventually starting again the program if it crashes.

There are daemon supervisors like daemontools or other simpler implementations like is daemonize which already have a SlackBuild.

However, to simulate an "user target" daemon supervisor doing the the job in similar ways like systemd, we need a supervisor which is capable also to talk with elogind, for watching the user logout, and if this happens to quit its instance and the inner running program.

The bad news are that there is not such thing yet, even we should expect more and more "user target" daemons to appear in the wild.

Looking for the available daemon supervisor in the wild, I started to consider that the best candidate is this daemon, because it has even the ability to respawn the inner program, to run it in a single instance with pid files and even to stop/start/restart it.

But, it should be further patched for elogind integration and I am not a C/C++ programmer and apparently in this community are no C/C++ programmers, that's why I tried opening a feature request there: https://github.com/raforg/daemon/issues/1

I believe that would be nice if others will jump in this feature request to support it too and will be even nicer if there will jump bigger names like Mr. Hameleers or Mr. Workman.

Facts are that we need a daemon supervisor with elogind support not only for PipeWire, but certainly for other possible "user target" daemons which in future we will discover that we will want to run.

Last edited by ZhaoLin1457; 12-11-2020 at 12:42 AM.
 
2 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't Get Sound from Pulseaudio -- PulseAudio Will Not Start JasonC10203 Linux - Software 4 11-28-2016 11:18 PM
Bypass pulseaudio problems and crashes when you don't have pulseaudio. Rinndalir Linux - Software 1 08-31-2016 01:00 PM
[SOLVED] Squeeze + Pulseaudio + Alsa and USB Midi device causes Pulseaudio crash mad4linux Debian 1 01-26-2011 03:57 AM
Winecfg crashes on sound tab with Pulseaudio and no 'sounddrivers' without pulseaudio William (Dthdealer) Linux - Software 5 06-13-2010 07:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration