commit: 274f08964197fac2907863311e36c0afbb58d381 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> AuthorDate: Sat May 8 14:07:53 2021 +0000 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> CommitDate: Sat May 8 18:27:45 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=274f0896
media-video/pipewire: raise RLIMIT_MEMLOCK to 256 by default for audio group Closes: https://bugs.gentoo.org/785778 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> media-video/pipewire/pipewire-9999.ebuild | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/media-video/pipewire/pipewire-9999.ebuild b/media-video/pipewire/pipewire-9999.ebuild index 98c6d6dc15f..3412a2825be 100644 --- a/media-video/pipewire/pipewire-9999.ebuild +++ b/media-video/pipewire/pipewire-9999.ebuild @@ -43,6 +43,7 @@ BDEPEND=" ) " RDEPEND=" + acct-group/audio media-libs/alsa-lib sys-apps/dbus[${MULTILIB_USEDEP}] sys-libs/ncurses[unicode] @@ -122,6 +123,15 @@ src_prepare() { # significantly worse user experience on systemd then. eapply "${FILESDIR}"/${PN}-0.3.25-non-systemd-integration.patch fi + + einfo "Generating ${limitsdfile}" + cat > ${limitsdfile} <<- EOF || die + # Start of ${limitsdfile} from ${P} + + @audio - memlock 256 + + # End of ${limitsdfile} from ${P} + EOF } multilib_src_configure() { @@ -178,17 +188,6 @@ multilib_src_configure() { multilib_src_compile() { meson_src_compile - - if multilib_is_native_abi; then - einfo "Generating ${limitsdfile}" - cat > ${limitsdfile} <<- EOF || die - # Start of ${limitsdfile} from ${P} - - 1000:60000 - memlock 256 - - # End of ${limitsdfile} from ${P} - EOF - fi } multilib_src_install() { @@ -221,6 +220,11 @@ multilib_src_install_all() { pkg_postinst() { if ! use pipewire-alsa; then + elog "It is recommended to raise RLIMIT_MEMLOCK to 256 for user" + elog "using PipeWire. Do it either manually or add yourself" + elog "to the 'audio' group:" + elog " usermod -aG audio <youruser>" + elog elog "Contrary to what some online resources may suggest, avoid setting" elog "PULSE_LATENCY_MSEC environment variable since it may break ALSA clients." elog
