/srv/irclogs.ubuntu.com/2022/12/22/#ubuntustudio-devel.txt

OvenWerksEickmeyer: "autojack expects pulseaudio" Thats coming to an end... but not sure I'll be there in time.00:44
EickmeyerOvenWerks: Right, that's causing problems for people who merely install "ubuntustudio-installer" as it depends on studio-controls which installs autojack which tries to restart pulseaudio which causes havoc on pipewire. Pipewire is default on Ubuntu Desktop already as of 22.1000:48
EickmeyerBasically, the change I uploaded to Lunar needs to be SRU'd to Kinetic for that compatibility.00:50
OvenWerksAh, ok.00:51
EickmeyerOvenWerks: If you can't get the changes done to studio-controls, I might have to make some default config changes in lunar that allow for a pipewire-jack configuration that conflicts with studio-controls. Still hashing that out.00:54
EickmeyerOvenWerks: Got some fairly unfortunate news. Apparently, pulseaudio and pipewire-pulse are not coinstallable since they functionally overlap. Therefore, a simple switch between the two with studio-controls will not work and must be done with packaging. Still working on this.18:59
OvenWerksEickmeyer: that is not true18:59
OvenWerksI have both installed right now19:00
EickmeyerRight, but what is the DE using?19:00
OvenWerksright now PW19:00
EickmeyerHow do you switch to pulse?19:00
OvenWerkssystemctl enable/disable works19:00
EickmeyerOh, that's cool.19:01
OvenWerksBasically, if both are installed, pulse will grab the socket first and pw will drop out19:01
OvenWerksdisable pulse and pw will grab things and go.19:01
OvenWerksI have even been able to do it without reboot.19:02
EickmeyerOk, then that leaves me worried from a seeding perspective if we want both installed by default but PW enabled by default.19:02
OvenWerksone of two things, the meta can do a preinstall to disable or to remove the symbolic link19:04
OvenWerks(same thing really)19:04
EickmeyerExcept one problem: .iso images aren't built with metas, they're built with tasks.19:04
OvenWerksdo those tasks include installing packages?19:05
EickmeyerYes, but I'm not sure how that all works. It's quite a bit different than installing the metas as defined by the ubuntustudio-meta since it grabs directly from the seed itself.19:06
EickmeyerIt's partially why packages on the .iso aren't necessarily marked as "auto".19:07
EickmeyerAdditionally, the metas don't have a pre/postinst script.19:08
OvenWerksCouls we include this in ubuntustudio-default-settings?19:08
EickmeyerGerminate doesn't have a facility for it.19:08
EickmeyerWe can, and that's one thing I'm working on in ubuntustudio-default-settings. I already have a "ubuntustudio-pipewire-config" package I've been working on. I can probably do a "systemctl disable pipewire" or something to that effect inside its postinst.19:09
OvenWerksautojack, while not set to do this as yet could set the switch one way or the other19:09
OvenWerksActually you might to disable pulse19:10
EickmeyerBetter yet, mask pulse altogether and unmask it when removing the package.19:10
OvenWerkscontrols/autojack can (do) check for what is actually installed and running on first run.19:11
EickmeyerThere we go. I think we have a solution.19:11
OvenWerksFor most people I think pw mode will just work for them19:12
OvenWerksThose who have a good idea what they are doing might want something else.19:12
OvenWerksPerhaps to finish a project19:13
EickmeyerRight.19:13
OvenWerks(though they will have to deal with a different version of DAW possibly anyway)19:13
EickmeyerThe config I've been making installs a file to /etc/profile.d/ubuntustudio-pwjack.sh which sets the environment variables necessary for pipewire-jack.19:13
EickmeyerIt removes that upon uninstallation.19:14
EickmeyerAlso includes a script to change the buffer size.19:14
EickmeyerDefaults to 102419:15
EickmeyerThough, I've found, each JACK client can set its own buffer size and that the buffer isn't global.19:16
OvenWerksis that all? pwjack installs a file in /etc/ld.so.conf.d to set the libpath already so don't add that to the environment19:16
EickmeyerActually, it doesn't. At least not in lunar.19:17
OvenWerks(controls adds/removes that file for switching purposes)19:17
EickmeyerI tried it and all JACK clients would scream that JACK wasn't running until I added the necessary environment variables.19:18
OvenWerksthe contents of that file: /etc/ld.so.conf.d/pipewire-jack.conf should be: ls -d /usr/lib/*/pipewire*/jack/ > /etc/ld.so.conf.d/pipewire-jack.conf19:19
OvenWerksI guess it makes more sense to say I create that file with the line: ls -d /usr/lib/*/pipewire*/jack/ > /etc/ld.so.conf.d/pipewire-jack.conf19:20
OvenWerksIt has to be run as sudo of course19:21
OvenWerksIn controls case it is run with pkexec19:21
OvenWerksThis is the manner that upstream does things19:23
EickmeyerUnfortunately, that file doesn't exist in lunar.19:23
Eickmeyerwith pipewire-jack installed.19:23
OvenWerksI understand but a preinstall that creates the file you are creating could just as easily create this one.19:24
OvenWerksone of the packages in: https://launchpad.net/~pipewire-debian/+archive/ubuntu/pipewire-upstream must put that line in.19:25
EickmeyerWell, we have to do this using the Ubuntu packages, not that.19:26
OvenWerksyes but that is not the point. Adding an environment variable is not the right way to make the pw libjack active19:27
EickmeyerIt is according to every single document I found. The pw-jack executable is merely a wrapper that sets the environment variables so that JACk applications can connect to JACK. This sets them system-wide.19:28
OvenWerkshttps://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Config-JACK19:29
OvenWerkshttps://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Config-JACK#installation to be exact19:29
OvenWerks"You also need to to create a file /etc/ld.so.conf.d/pipewire-jack-x86_64.conf containing a link to the JACK modules:"19:30
OvenWerksLike I said upstream pw recommends this way19:30
EickmeyerYes. PIPEWIRE_QUANTUM and LD_LIBRARY_PATH are the two environment variables that PIPEWIRE THEMSELVES SET in pw-jack.19:30
Eickmeyerexport PIPEWIRE_QUANTUM="1024/48000"19:31
Eickmeyerexport LD_LIBRARY_PATH='/usr/${LIB}/pipewire-0.3/jack'19:31
OvenWerksyes but that is just for running a jack application when the lib is not set up 19:31
EickmeyerThis sets the lib up.19:31
OvenWerksI have looked at that file as well.19:31
EickmeyerIt works. Trust me. I've tested it ad-nauseum.19:31
OvenWerksbut that is not needed to make things work if the installation procedure laid out in the pw documentation is followed19:32
OvenWerksThe installation procedure also works19:32
EickmeyerOk, then why isn't the Ubuntu package installing it correctly then?19:33
OvenWerksGood question19:33
EickmeyerMy point is we need to work with what we've got until that is fixed. It's in main, so I can't fix it.19:33
OvenWerksif you are going to install a file install the correct one19:33
EickmeyerWhat does that file contain then?19:34
OvenWerksthe file can be created with this line: ls -d /usr/lib/*/pipewire*/jack/ > /etc/ld.so.conf.d/pipewire-jack.conf19:35
OvenWerksthe documentation says the line in the file is /usr/lib64/pipewire-0.3/jack/19:35
OvenWerksbut... I figure the line I use will still work if the version specific line they use changes19:35
OvenWerks]That is for pw-jack 0.4 or something19:36
OvenWerkswhich version of pw (or pw jack) does ubuntu use in main? The documentation says "This configuration issue should be fixed in later versions but as of 0.3.21+ it is still an issue."19:38
OvenWerksit may be the package I am using is newer?19:39
EickmeyerLet me see.19:39
EickmeyerNo, your package is older. Lunar has 0.3.63 in proposed already.19:41
OvenWerksYup19:41
OvenWerksso different packaging19:41
EickmeyerYep. The packaging is straight from Debian, synced.19:42
EickmeyerAnd it's in main, so I'm not allowed to touch it.19:42
OvenWerksThats ok19:43
EickmeyerFigured it out: Debian interprets the ld.so.conf.d stuff as examples, not "the way to do it." Basically, there's more than one way to skin a cat.19:45
EickmeyerThey install it, but to /usr/share/doc/pipewire/examples/ld.so.conf.d19:45
OvenWerksby not putting it in /etc/ they leave jackd working19:46
EickmeyerCorrect. What's nice about the way I'm doing it is it's a simple package install/uninstall.19:46
OvenWerksthis means that by not installing pulse, pw works for all desktop applications while jack users still use jack19:46
OvenWerksthe way you are doing it breaks controls19:47
EickmeyerThe way I'm doing it helps people who might not want controls.19:47
Eickmeyeri.e. users of other flavors.19:47
OvenWerksyes but using the upstream method works for them as well19:48
OvenWerksAnd it has the benefit that all distros can work the same19:48
EickmeyerRight, except Arch's documentation about pipewire-jack don't even mention the upstream method and mention setting an environment variable.19:49
OvenWerkswonderful...19:49
OvenWerksThe package I'm using comes from a arch user  :P19:50
OvenWerkslife is complicated19:50
EickmeyerI think we're in a situation of scope creep here.19:51
OvenWerksI guess I can search for that file and -x it?19:51
EickmeyerWell, anything in profile.d gets executed regardless of executable bit as long as the extension is .sh, so it could be renamed from .sh.19:51
OvenWerksIn any case, I would ask that the installation method speced by upstream developers would be the way to go.19:52
EickmeyerYou're not wrong, but, in order for controls to work with it, distros have to agree on that as well. Right now, there seems to be confusion.19:53
EickmeyerDebian sees it as optional, and Arch has the "Arch Way".19:53
OvenWerksThat is ok, someone sends me an issue/bugreport I can at least point at the upstream installation and say if your distro doesn't do it that way, I can't help you.19:54
OvenWerksI guess controls will have to do a breaks/replaces for that package19:57
OvenWerksThere is not really any difference between rename and nuke19:58
OvenWerkseither one will mess with upgrades I would imagine19:59
EickmeyerOvenWerks: I'm already on it. Right now, that package is definitely on Breaks: studio-controls20:00
EickmeyerAs far as upgrades, still working on that. I might be able to maneuver around that.20:01
OvenWerksIf the file is installed as part of postinstall it is probably ok20:01
EickmeyerIt is, and removed as part of prerm.20:01
EickmeyerIn fact, it's dynamically generated by a new command: ubuntustudio-pwjack which lets the user set the default buffer size.20:02
EickmeyerUpon installation, it sets it to 1024.20:02
OvenWerksSo the only problem for me would be to look for it and nuke it if found20:02
OvenWerks(if switching to jack)20:03
EickmeyerHonestly, it would need to be renamed to remove the .sh extension and then the user would have to relog. That's it.20:04
OvenWerksyes but the upgrade would not see the renamed file and just create a new file.20:10
OvenWerksAs a sw dev creating something for the whole of the ecosystem, I have to use what upstream uses, not some kludge in some directory other than that. If using the upstream method doesn't work I have to point the user at their distro to submit a bug.20:12
EickmeyerRight, which is precisely why I'm setting a Breaks: line in the packaging.20:15
EickmeyerOvenWerks: The biggest problem I have with installing anything directly into /etc (as opposed to dynamically writing it) is that it requires a purge to remove it or if a newer version gets installed it requires user intervention.22:06
EickmeyerSo, believe me, I'm trying to figure out how to work ld.so.conf.d in.22:06
EickmeyerI just can't guarantee full ownership of it.22:07
EickmeyerIt's a namespace issue and the archive admins are going to stomp all over me.22:07
EickmeyerOvenWerks: I figured it out. I can symlink pipewire-jack.conf -> /usr/share/doc/pipewire/examples/ld.so.conf.d/pipewire-jack-*-linux-gnu.conf (to keep it ok for all archs) and it'll just  work. I'll have to keep the other file for the PIPEWIRE_QUANTUM variable, but this one does the LD_LIBRARY stuff.22:33
EickmeyerOvenWerks: Bad news, the symlink doesn't work. It still wants the environment variable set somehow.22:50
EickmeyerI can make the variable LD_LIBRARY_PATH=$(cat /etc/ld.so.conf.d/pipewire-jack.conf) and have it export that, but it has to have something in that variable otherwise it's completely broken.22:52
EickmeyerActually, it'll be LD_LIBRARY_PATH=$(cat /etc/ld.so.conf.d/pipewire-jack.conf || true), that way it retuns empty if studio-controls removes the pipewire-jack.conf file.22:58
EickmeyerOvenWerks: Nevermind. Got the symlink to work. I forgot to put ldconfig in the postinst.23:25
EickmeyerI can remove the Breaks: line now.23:25
EickmeyerLadies and gentlemen, we have a Pipewire configuration that doesn't break anything.23:25

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!