Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Unsupported Software
  • Search

[SOLVED] mpd + pipewire

This forum covers all Gentoo-related software not officially supported by Gentoo. Ebuilds/software posted here might harm the health and stability of your system(s), and are not supported by Gentoo developers. Bugs/errors caused by ebuilds from overlays.gentoo.org are covered by this forum, too.
Post Reply
Advanced search
32 posts
  • Previous
  • 1
  • 2
Author
Message
arvamircea
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 109
Joined: Sat May 21, 2022 10:09 am
Location: Swadlincote
Contact:
Contact arvamircea
Website

  • Quote

Post by arvamircea » Sun Feb 04, 2024 7:23 pm

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:
Top
szatox
Advocate
Advocate
Posts: 3858
Joined: Tue Aug 27, 2013 12:35 pm

  • Quote

Post by szatox » Tue Feb 06, 2024 4:10 pm

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.
[topic=1152524]Make Pipewire a system service[/topic]
Top
arvamircea
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 109
Joined: Sat May 21, 2022 10:09 am
Location: Swadlincote
Contact:
Contact arvamircea
Website

  • Quote

Post by arvamircea » Wed Feb 07, 2024 3:57 am

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: Select all

#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".
Top
szatox
Advocate
Advocate
Posts: 3858
Joined: Tue Aug 27, 2013 12:35 pm

  • Quote

Post by szatox » Wed Feb 07, 2024 11:36 am

What wiki guide are you using?
The one I see https://wiki.gentoo.org/wiki/MPD#Pipewi ... ptional.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?
[topic=1152524]Make Pipewire a system service[/topic]
Top
arvamircea
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 109
Joined: Sat May 21, 2022 10:09 am
Location: Swadlincote
Contact:
Contact arvamircea
Website

  • Quote

Post by arvamircea » Wed Feb 07, 2024 11:53 am

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: Select all

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: Select all

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"
Top
szatox
Advocate
Advocate
Posts: 3858
Joined: Tue Aug 27, 2013 12:35 pm

  • Quote

Post by szatox » Thu Feb 08, 2024 6:01 pm

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.
[topic=1152524]Make Pipewire a system service[/topic]
Top
arvamircea
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 109
Joined: Sat May 21, 2022 10:09 am
Location: Swadlincote
Contact:
Contact arvamircea
Website

  • Quote

Post by arvamircea » Sun Mar 03, 2024 3:55 pm

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

Steps to fix:

1)

Code: Select all

sudo cp -r /usr/share/pipewire/ /etc/ 
2)

Code: Select all

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

Code: Select all

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: Select all

gentoo-pipewire-launcher restart &
5)

Code: Select all

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

Code: Select all

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"
}
Top
Post Reply

32 posts
  • Previous
  • 1
  • 2

Return to “Unsupported Software”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy