Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] mpd + pipewire
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
arvamircea
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2022
Posts: 107
Location: Swadlincote

PostPosted: Sun Feb 04, 2024 7:23 pm    Post subject: Reply with quote

Well I tired:

chown -R mpd:mpd /var/lib/mpd ==> chown: invalid group: 'mpd:mpd'
and
chown -R mpd:audio /var/lib/mpd ==> Getting the same "Permission denied"

Do you think is should change to chown -R cocolino:cocolino /var/lib/mpd?

Not a bug? Well at least an update to the mpd Wiki for smooth brained people like me. :oops:
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3139

PostPosted: Tue Feb 06, 2024 4:10 pm    Post subject: Reply with quote

Quote:
Do you think is should change to chown -R cocolino:cocolino /var/lib/mpd?
Yes, of course.
Also, chown pretty much requires root access to work. You can't just steal other user's files.
_________________
Make Computing Fun Again
Back to top
View user's profile Send private message
arvamircea
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2022
Posts: 107
Location: Swadlincote

PostPosted: Wed Feb 07, 2024 3:57 am    Post subject: Reply with quote

Well, you are right changing the owner of `/var/lib/mpd/*` and the user in `/etc/mpd.conf` to my user let me start mpd. Still no audio tho :<
Not sure if it means anything but disabling the fifo output in mpd.conf
Code:

#audio_output {
#        type  "fifo"
#        name  "my_fifo"
#        path  "/tmp/mpd.fifo"
#        enabled  "yes"
#        format  "44100:16:2"
#}

makes the music not start at all, it just says on "paused".
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3139

PostPosted: Wed Feb 07, 2024 11:36 am    Post subject: Reply with quote

What wiki guide are you using?
The one I see https://wiki.gentoo.org/wiki/MPD#Pipewire_.28optional.29 includes information about running mpd as user and about configuring pipewire output.
It should even work with alsa output too. On my system nothing uses pipewire protocol, they all talk either alsa or jack.

Anyway, if you still can't get it to work after changing user, perhaps there are some errors in mpd's logs?
_________________
Make Computing Fun Again
Back to top
View user's profile Send private message
arvamircea
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2022
Posts: 107
Location: Swadlincote

PostPosted: Wed Feb 07, 2024 11:53 am    Post subject: Reply with quote

Yep, I am using the same Wiki.
I have all audio outputs, just in case, Alsa, PipeWire, Pulse and my_fifo.
Logs with all audio outputs enable:
Code:

Feb 07 11:47 : mixer: Failed to read mixer for 'Alsa': failed to attach to default: Host is down
Feb 07 11:47 : exception: Failed to enable output "Pulse Output" (pulse); pa_context_connect() has failed: Connection refused
Feb 07 11:47 : exception: Failed to open "Alsa" (alsa); Failed to open ALSA device "default": Host is down
Feb 07 11:47 : exception: Failed to open "Pipewire Output" (pipewire); Failed to connect stream: Host is down
Feb 07 11:47 : player: played "Musik/The_Elder_Scrolls_-_Main_Theme-DJ_AG.mp3"

Log with my_fifo disabled
Code:
Feb 07 11:48 : exception: Failed to enable output "Pulse Output" (pulse); pa_context_connect() has failed: Connection refused
Feb 07 11:48 : exception: Failed to enable output "Pulse Output" (pulse); pa_context_connect() has failed: Connection refused
Feb 07 11:48 : exception: Failed to enable output "Pulse Output" (pulse); pa_context_connect() has failed: Connection refused
Feb 07 11:48 : exception: Failed to enable output "Pulse Output" (pulse); pa_context_connect() has failed: Connection refused
Feb 07 11:48 : exception: Failed to open "Alsa" (alsa); Failed to open ALSA device "default": Host is down
Feb 07 11:48 : exception: Failed to open "Pipewire Output" (pipewire); Failed to connect stream: Host is down
Feb 07 11:48 : exception: Failed to open "Alsa" (alsa); Failed to open ALSA device "default": Host is down
Feb 07 11:48 : player: problems opening audio device while playing "Musik/Infected-Nightcore.mp3"
Feb 07 11:48 : player: played "Musik/Infected-Nightcore.mp3"
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3139

PostPosted: Thu Feb 08, 2024 6:01 pm    Post subject: Reply with quote

That's weird.
Anyway, I went ahead and installed mpd just to see what would happen if I ran it with the default config (except of user, which I changed to myself). It failed to connect to autodetected alsa (with a similar host-down message), but then proceeded to autodetected and connect to jack.
If you feel like giving this a shot, go ahead and enable USE=jack globally. Admittedly, on your system it does look like a workaround to a workaround at this point. Unfortunately, I've ran out of obvious ideas and since I currently have no use for mpd, I'm not going to do a full-blown investigation into that mpd-alsa problem.
Perhaps someone else could come up with a better option for you.
_________________
Make Computing Fun Again
Back to top
View user's profile Send private message
arvamircea
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2022
Posts: 107
Location: Swadlincote

PostPosted: Sun Mar 03, 2024 3:55 pm    Post subject: Reply with quote

[SOLVED] Jesus fking Christ
Thank you @paulj ! Link to solution.

Steps to fix:

1)
Code:
sudo cp -r /usr/share/pipewire/ /etc/

2)
Code:
vim /etc/pipewire/pipewire-pulse.conf

3) `/etc/pipewire/pipewire-pulse.conf` should have the following:
Code:

pulse.properties = {
    # the addresses this server listens on
    server.address = [
        "unix:native"
        #"unix:/tmp/something"              # absolute paths may be used
        "tcp:4713"                         # IPv4 and IPv6 on all addresses
        #"tcp:[::]:9999"                    # IPv6 on all addresses
        #"tcp:127.0.0.1:8888"               # IPv4 on a single address
        #
        #{ address = "tcp:4713"             # address
        #  max-clients = 64                 # maximum number of clients
        #  listen-backlog = 32              # backlog in the server listen queue
        #  client.access = "restricted"     # permissions for clients
        #}
    ]
    #server.dbus-name       = "org.pulseaudio.Server"
    #pulse.min.req          = 128/48000     # 2.7ms
    #pulse.default.req      = 960/48000     # 20 milliseconds
    #pulse.min.frag         = 128/48000     # 2.7ms
    #pulse.default.frag     = 96000/48000   # 2 seconds
    #pulse.default.tlength  = 96000/48000   # 2 seconds
    #pulse.min.quantum      = 128/48000     # 2.7ms
    #pulse.idle.timeout     = 0             # don't pause after underruns
    #pulse.default.format   = F32
    #pulse.default.position = [ FL FR ]
    # These overrides are only applied when running in a vm.
    vm.overrides = {
        pulse.min.quantum = 1024/48000      # 22ms
    }
}

Notice that `"tcp:4713" # IPv4 and IPv6 on all addresses` is un-commented
4)
Code:
gentoo-pipewire-launcher restart &

5)
Code:
disown

6)In /etc/mpd.conf I have the following, but I don't think it matters at all.
Code:

music_directory "/var/lib/mpd/music/Musik"
playlist_directory "/var/lib/mpd/playlists"
db_file "/var/lib/mpd/database"
log_file "/var/log/mpd/mpd.log"
pid_file "/run/mpd/mpd.pid"
user "mpd"
group "audio"
input {
        plugin "curl"
}
audio_output {
    type            "pulse"
    server          "localhost"
    mixer_control   "Master"
    name            "My pulse output"
}
audio_output {
        type  "fifo"
        name  "my_fifo"
        path  "/tmp/mpd.fifo"
        enabled  "yes"
        format  "44100:16:2"
}
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum