Skip to main content
Topic: Pipewire needs turnstile to be enabled as a user service (Read 1775 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Pipewire needs turnstile to be enabled as a user service

The wiki doesn't mention the need to install and enable turnstile(d) :

https://wiki.artixlinux.org/Site/PipewireInsteadPulseaudio

Without it, dinitctl refuses to enable pipewire* and wireplumber services a a user.

Btw, is there a way to register to the wiki, or is it closed ?

Re: Pipewire needs turnstile to be enabled as a user service

Reply #1
Turnstile should not be required. That it 'solves' your problem is probably because it sets the XDG env vars for you. There are other ways to do that.

artist

Re: Pipewire needs turnstile to be enabled as a user service

Reply #2
Turnstile should not be required. That it 'solves' your problem is probably because it sets the XDG env vars for you. There are other ways to do that.

artist

Do you guys have a plan to make pipewire the default sound system in the near future?

Re: Pipewire needs turnstile to be enabled as a user service

Reply #3
Turnstile should not be required. That it 'solves' your problem is probably because it sets the XDG env vars for you. There are other ways to do that.

artist

Without it, dinitctl complains that the socket doesn't exist, do you have an idea of what could causes this issue ?

Code: [Select]
dinit-client: connecting to socket /run/user/1000/dinitctl: No such file or directory

 

Re: Pipewire needs turnstile to be enabled as a user service

Reply #4
It means that XDG_RUNTIME_DIR is not set.
turnstiled sets it for you as well as elogind (not sure about seatd - probably not).
Also you can do it manually.

Re: Pipewire needs turnstile to be enabled as a user service

Reply #5
Well, no need for turnstiled, neither loginctl for just that.  I don't have any, first on rc.local (given my boxes' settings /etc/local.d/rc.start):

Code: [Select]
# XDG_RUNTIME_DIR for each user
declare -A users=( [<user_0>]=<user_0_default_group> )

for _user in "${users[@]}" ; do
    if [ "$(id -u "$_user")" ] && [ "$(id -g "$_user")" ]; then
        XDG_RUNTIME_DIR="/run/user/$(id -u "$_user")"

        if [ -d "$XDG_RUNTIME_DIR" ]; then
            rm -rf "$XDG_RUNTIME_DIR"
        fi

        mkdir -p "$XDG_RUNTIME_DIR"
        chown ${_user}:${users["$_user"]} "${XDG_RUNTIME_DIR}"
        chmod 700 "$XDG_RUNTIME_DIR"
    fi
done

Where users is an associative list of users with username as key and default group as value.  So on boot all users directories are created.  Now that can move to you ~/.bash_profile or ~/.profile if you prefer.  And then I have in my ~/.bash_profile:

Code: [Select]
if [ -n "$PS1" ]; then
    XDG_RUNTIME_DIR="/run/user/$(id -u)"
    export XDG_RUNTIME_DIR
    ...
fi

So no need for any session helper stuff to get that.  Now my approach of having the directories ready right at boot, which is not necessary, comes from the idea of possible headless jobs running as users and not root, which might potentially depend on XDG_RUN_TIME being up and running.

That said, I no longer use pipewire (I was, as requirement for wayland screen sharing) neither wayland, plain alsa and x11 without dbus now, :)

Re: Pipewire needs turnstile to be enabled as a user service

Reply #6
Thanks for sharing , I'm new to Artix so it'll be useful!

That said, I no longer use pipewiere (I was, as requirement for wayland screen sharing) neither wayland, plain alsa and x11 without dbus now, :)

Without dbus ? I read people having their box freezed just for trying to do that. I'm curious,
any link on how to do it ?