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

Goto page 1, 2  Next  
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: 109
Location: Swadlincote

PostPosted: Tue Jan 02, 2024 7:05 pm    Post subject: [SOLVED] mpd + pipewire Reply with quote

Hello,

I have setup ncmpcpp with alsa/pavucontrol and it was working great. Since then I've updated to PipeWire and WirePlumber (WirePlumber gui does not work but I don't really care).
The issue I am having is that when selecting a song in ncmpcpp it looks like the audio is playing but no actual sound is coming out.
On the ncmpcpp "Output" page I have: Alsa, Pulse Output, Pipewire Output, my_fifo.

The MPD modifications I've made:
->I have the flags: media-sound/mpd upnp expat alsa pipewire
->mpd.conf
Code:
input {
        plugin "curl"
#       proxy "proxy.isp.com:8080"
#       proxy_user "user"
#       proxy_password "password"
}

audio_output {
        type            "alsa"
        name            "Alsa"
}

audio_output {
        type            "pulse"
        name            "Pulse Output"
}

audio_output {
        type            "pipewire"
        name            "Pipewire Output"
        mixer_control   "Master"
}

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

restore_paused "yes"


If I can play music again with MPD and ncmpcpp I will be very happy.


Last edited by arvamircea on Sun Mar 03, 2024 3:55 pm; edited 3 times in total
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3830

PostPosted: Tue Jan 02, 2024 7:47 pm    Post subject: Reply with quote

Here's:
Code:
audio_output {
   type      "pipewire"
   name      "Pipewire Sound Server"
}
Code:
eix media-video/pipewire
[I] media-video/pipewire
     Installed versions:  9999(0/0.4)*l^t(23:54:28 01/01/2024)(bluetooth dbus echo-cancel extra gstreamer jack-sdk lv2 pipewire-alsa roc sound-server -X -doc -ffmpeg -flatpak -gsettings -ieee1394 -jack-client -liblc3 -man -modemmanager -readline -selinux -ssl -system-service -systemd -test -v4l -zeroconf ABI_MIPS="-n32 -n64 -o32" ABI_S390="-32 -64" ABI_X86="64 -32 -x32")
for what it's worth.

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
arvamircea
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2022
Posts: 109
Location: Swadlincote

PostPosted: Tue Jan 02, 2024 7:57 pm    Post subject: Reply with quote

Thank you CaptainBlood.
Do you have more audio_output in your mpd.conf or just the one?
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3830

PostPosted: Tue Jan 02, 2024 8:58 pm    Post subject: Reply with quote

All others from former configuration are currently commented out.

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3830

PostPosted: Tue Jan 02, 2024 9:02 pm    Post subject: Reply with quote

Using
Code:
eix helvum
[I] media-sound/helvum
     Available versions:  ~0.4.1 ~0.5.1-r2 (~)9999*l[1] {debug}
     Installed versions:  9999*l[1](07:17:55 10/12/2023)
     Homepage:            https://gitlab.freedesktop.org/pipewire/helvum
     Description:         A GTK patchbay for pipewire

[1] "tezeta" /var/db/repos/tezeta
to monitor or force pipewire connections.
Code:
eix pavucontrol
[I] media-sound/pavucontrol
     Available versions:  5.0-r2 {nls}
     Installed versions:  5.0-r2(19:51:24 19/05/2023)(-nls)
     Homepage:            https://freedesktop.org/software/pulseaudio/pavucontrol/
may help to set default.

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
arvamircea
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2022
Posts: 109
Location: Swadlincote

PostPosted: Tue Jan 02, 2024 9:12 pm    Post subject: Reply with quote

CaptainBlood wrote:
All others from former configuration are currently commented out.

Thks 4 ur attention, interest & support.


Really? Thank you very much. I've made some progress now.
Only using pipewire as output for mpd, the music does not start at all in ncmpcpp. It just stays "Paused"
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3830

PostPosted: Tue Jan 02, 2024 10:13 pm    Post subject: Reply with quote

Before previous posting I did a full test mpd + ncmpcpp.
It so happened mpd client stuck on pause.
I killed pipewire and mpd and ncmpcpp altogether.

mpd client could switch from pause to play.

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
arvamircea
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2022
Posts: 109
Location: Swadlincote

PostPosted: Wed Jan 03, 2024 2:26 pm    Post subject: Reply with quote

If anyone can point me in the right direction on how to troubleshoot this, I will be very grateful.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3830

PostPosted: Wed Jan 03, 2024 2:58 pm    Post subject: Reply with quote

Do you have CONFIG_SND_PROC_FS=y in .config?

Thks 4 ur attention,, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
arvamircea
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2022
Posts: 109
Location: Swadlincote

PostPosted: Wed Jan 03, 2024 3:04 pm    Post subject: Reply with quote

CaptainBlood wrote:
Do you have CONFIG_SND_PROC_FS=y in .config?

Thks 4 ur attention,, interest & support.


Nope, but adding it to mpd or ncmpcpp config breaks them. (they cant be started)
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3830

PostPosted: Wed Jan 03, 2024 3:17 pm    Post subject: Reply with quote

Talking about kernel .config file....
Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
arvamircea
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2022
Posts: 109
Location: Swadlincote

PostPosted: Wed Jan 03, 2024 3:23 pm    Post subject: Reply with quote

Oh, yep Sound Proc FS Support is enabled.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3830

PostPosted: Wed Jan 03, 2024 3:46 pm    Post subject: Reply with quote

Here's my whole mpd.conf
Code:
# An example configuration file for MPD.
# Read the user manual for documentation: http://www.musicpd.org/doc/user/


# Files and directories #######################################################
#
# This setting controls the top directory which MPD will search to discover the
# available audio files and add them to the daemon's online database. This
# setting defaults to the XDG directory, otherwise the music directory will be
# be disabled and audio files will only be accepted over ipc socket (using
# file:// protocol) or streaming files over an accepted protocol.
#
##music_directory "/var/lib/mpd/music"
music_directory         "~/Music"
#
# This setting sets the MPD internal playlist directory. The purpose of this
# directory is storage for playlists created by MPD. The server will use
# playlist files not created by the server but only if they are in the MPD
# format. This setting defaults to playlist saving being disabled.
#
##playlist_directory "/var/lib/mpd/playlists"
playlist_directory      "~/.config/mpd/playlists"
#
# This setting sets the location of the MPD database. This file is used to
# load the database at server start up and store the database while the
# server is not up. This setting defaults to disabled which will allow
# MPD to accept files over ipc socket (using file:// protocol) or streaming
# files over an accepted protocol.
#
##db_file "/var/lib/mpd/database"
db_file         "~/.config/mpd/database"

# These settings are the locations for the daemon log files for the daemon.
#
# The special value "syslog" makes MPD use the local syslog daemon. This
# setting defaults to logging to syslog.
#
# If you use systemd, do not configure a log_file.  With systemd, MPD
# defaults to the systemd journal, which is fine.
#
##log_file "/var/lib/mpd/log"
log_file         "/home/luc/.config/mpd/log"

# This setting sets the location of the file which stores the process ID
# for use of mpd --kill and some init scripts. This setting is disabled by
# default and the pid file will not be stored.
#
# If you use systemd, do not configure a pid_file.
#
##pid_file "/var/lib/mpd/pid"
pid_file         "~/.config/mpd/pid"
# This setting sets the location of the file which contains information about
# most variables to get MPD back into the same general shape it was in before
# it was brought down. This setting is disabled by default and the server
# state will be reset on server start up.
#
##state_file "/var/lib/mpd/state"
state_file         "~/.config/mpd/state"
#
# The location of the sticker database.  This is a database which
# manages dynamic information attached to songs.
#
#sticker_file         "~/.mpd/sticker.sql"
#
###############################################################################


# General music daemon options ################################################
#
# This setting specifies the user that MPD will run as. MPD should never run as
# root and you may use this setting to make MPD change its user ID after
# initialization. This setting is disabled by default and MPD is run as the
# current user.
#
##user "mpd"
#
# This setting specifies the group that MPD will run as. If not specified
# primary group of user specified with "user" setting will be used (if set).
# This is useful if MPD needs to be a member of group such as "audio" to
# have permission to use sound card.
#
#group            "nogroup"
#
# This setting sets the address for the daemon to listen on. Careful attention
# should be paid if this is assigned to anything other than the default, any.
# This setting can deny access to control of the daemon. Not effective if
# systemd socket activation is in use.
#
# For network
bind_to_address "localhost"
#
# And for Unix Socket
##bind_to_address "/var/lib/mpd/socket"
bind_to_address      "/home/luc/.config/mpd/socket"
#
# This setting is the TCP port that is desired for the daemon to get assigned
# to.
#
#port            "6600"
#
# Suppress all messages below the given threshold.  Use "verbose" for
# troubleshooting. Available setting arguments are "notice", "info", "verbose",
# "warning" and "error".
#
#log_level         "notice"
#
# Setting "restore_paused" to "yes" puts MPD into pause mode instead
# of starting playback after startup.
#
#restore_paused "no"
#
# This setting enables MPD to create playlists in a format usable by other
# music players.
#
#save_absolute_paths_in_playlists   "no"
#
# This setting defines a list of tag types that will be extracted during the
# audio file discovery process. The complete list of possible values can be
# found in the user manual.
#metadata_to_use   "artist,album,title,track,name,genre,date,composer,performer,disc"
#
# This example just enables the "comment" tag without disabling all
# the other supported tags:
#metadata_to_use "+comment"
#
# This setting enables automatic update of MPD's database when files in
# music_directory are changed.
#
auto_update   "yes"
#
# Limit the depth of the directories being watched, 0 means only watch
# the music directory itself.  There is no limit by default.
#
#auto_update_depth "3"
#
###############################################################################


# Symbolic link behavior ######################################################
#
# If this setting is set to "yes", MPD will discover audio files by following
# symbolic links outside of the configured music_directory.
#
#follow_outside_symlinks   "yes"
#
# If this setting is set to "yes", MPD will discover audio files by following
# symbolic links inside of the configured music_directory.
#
#follow_inside_symlinks      "yes"
#
###############################################################################


# Zeroconf / Avahi Service Discovery ##########################################
#
# If this setting is set to "yes", service information will be published with
# Zeroconf / Avahi.
#
#zeroconf_enabled      "yes"
#
# The argument to this setting will be the Zeroconf / Avahi unique name for
# this MPD server on the network. %h will be replaced with the hostname.
#
#zeroconf_name         "Music Player @ %h"
#
###############################################################################


# Permissions #################################################################
#
# If this setting is set, MPD will require password authorization. The password
# setting can be specified multiple times for different password profiles.
#
#password                        "password@read,add,control,admin"
#
# This setting specifies the permissions a user has who has not yet logged in.
#
#default_permissions             "read,add,control,admin"
#
###############################################################################


# Database #######################################################################
#
# An example of a database section instead of the old 'db_file' setting.
# It enables mounting other storages into the music directory.
#
#database {
#       plugin "simple"
#       path "~/.local/share/mpd/db
#       cache_directory "~/.local/share/mpd/cache"
#}
#
# An example of database config for a satellite setup
#
##music_directory "/var/lib/mpd/music"
#database {
#       plugin "proxy"
#       host "other.mpd.host"
#       port "6600"
#}

# Input #######################################################################
#
#input {
#        plugin "curl"
#       proxy "proxy.isp.com:8080"
#       proxy_user "user"
#       proxy_password "password"
#}

#
###############################################################################

# Audio Output ################################################################
#
# MPD supports various audio output types, as well as playing through multiple
# audio outputs at the same time, through multiple audio_output settings
# blocks. Setting this block is optional, though the server will only attempt
# autodetection for one sound card.
#
# An example of an ALSA output:
#
#audio_output {
#   type      "alsa"
#   name      "My ALSA Device"
#   device      "hw:0,0"   # optional
#   mixer_type      "hardware"   # optional
#   mixer_device   "default"   # optional
#   mixer_control   "PCM"      # optional
#   mixer_index   "0"      # optional
#}
#
# An example of an OSS output:
#
#audio_output {
#   type      "oss"
#   name      "My OSS Device"
##   device      "/dev/dsp"   # optional
##   mixer_type      "hardware"   # optional
##   mixer_device   "/dev/mixer"   # optional
##   mixer_control   "PCM"      # optional
#}
#
# An example of a shout output (for streaming to Icecast):
#
#audio_output {
#   type      "shout"
#   encoder      "vorbis"      # optional
#   name      "My Shout Stream"
#   host      "localhost"
#   port      "8000"
#   mount      "/mpd.ogg"
#   password   "hackme"
#   quality      "5.0"
#   bitrate      "128"
#   format      "44100:16:1"
##   protocol   "icecast2"      # optional
##   user      "source"      # optional
##   description   "My Stream Description"   # optional
##   url      "http://example.com"   # optional
##   genre      "jazz"         # optional
##   public      "no"         # optional
##   timeout      "2"         # optional
##   mixer_type      "software"      # optional
#}
#
# An example of a recorder output:
#
#audio_output {
#   type      "recorder"
#   name      "My recorder"
#   encoder      "vorbis"      # optional, vorbis or lame
#   path      "/var/lib/mpd/recorder/mpd.ogg"
##   quality      "5.0"         # do not define if bitrate is defined
#   bitrate      "128"         # do not define if quality is defined
#   format      "44100:16:1"
#}
#
# An example of a httpd output (built-in HTTP streaming server):
#
#audio_output {
#   type      "httpd"
#   name      "My HTTP Stream"
#   encoder      "vorbis"      # optional, vorbis or lame
#   port      "8000"
#   bind_to_address   "0.0.0.0"      # optional, IPv4 or IPv6
##   quality      "5.0"         # do not define if bitrate is defined
#   bitrate      "128"         # do not define if quality is defined
#   format      "44100:16:1"
#   max_clients   "0"         # optional 0=no limit
#}
#
# An example of a pulseaudio output (streaming to a remote pulseaudio server)
#
#audio_output {
#   type      "pulse"
#   name      "My Pulse Output"
##   server      "remote_server"      # optional
##   sink      "remote_server_sink"   # optional
##   media_role   "media_role"      #optional
#}
#
# An example of a winmm output (Windows multimedia API).
#
#audio_output {
#   type      "winmm"
#   name      "My WinMM output"
##   device      "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
#      or
##   device      "0"      # optional
##   mixer_type   "hardware"   # optional
#}
#
# An example of a wasapi output (Windows multimedia API).
#
#audio_output {
#   type      "wasapi"
#   name      "My WASAPI output"
##   device      "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
#      or
##   device      "0"      # optional
## Exclusive mode blocks all other audio source, and get best audio quality without resampling.
##   exclusive   "no"      # optional
## Enumerate all devices in log.
##   enumerate   "no"      # optional
#}
#
# An example of an openal output.
#
#audio_output {
#   type      "openal"
#   name      "My OpenAL output"
##   device      "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
#}
#
# An example of an sndio output.
#
#audio_output {
#   type      "sndio"
#   name      "sndio output"
#   mixer_type   "hardware"
#}
#
# An example of an OS X output:
#
#audio_output {
#   type      "osx"
#   name      "My OS X Device"
##   device      "Built-in Output"   # optional
##   channel_map      "-1,-1,0,1"   # optional
#}
#
## Example "pipe" output:
#
#audio_output {
#   type      "pipe"
#   name      "my pipe"
#   command      "aplay -f cd 2>/dev/null"
## Or if you're want to use AudioCompress
#   command      "AudioCompress -m | aplay -f cd 2>/dev/null"
## Or to send raw PCM stream through PCM:
#   command      "nc example.org 8765"
#   format      "44100:16:2"
#}
#
## An example of a null output (for no audio output):
#
#audio_output {
#   type      "null"
#   name      "My Null Output"
#   mixer_type      "none"         # optional
#}
#
audio_output {
   type      "pipewire"
   name      "Pipewire Sound Server"
}
###############################################################################


# Normalization automatic volume adjustments ##################################
#
# This setting specifies the type of ReplayGain to use. This setting can have
# the argument "off", "album", "track" or "auto". "auto" is a special mode that
# chooses between "track" and "album" depending on the current state of
# random playback. If random playback is enabled then "track" mode is used.
# See <https://wiki.hydrogenaud.io/index.php?title=Replaygain> for
# more details about ReplayGain.
# This setting is off by default.
#
#replaygain         "album"
#
# This setting sets the pre-amp used for files that have ReplayGain tags. By
# default this setting is disabled.
#
#replaygain_preamp      "0"
#
# This setting sets the pre-amp used for files that do NOT have ReplayGain tags.
# By default this setting is disabled.
#
#replaygain_missing_preamp   "0"
#
# This setting enables or disables ReplayGain limiting.
# MPD calculates actual amplification based on the ReplayGain tags
# and replaygain_preamp / replaygain_missing_preamp setting.
# If replaygain_limit is enabled MPD will never amplify audio signal
# above its original level. If replaygain_limit is disabled such amplification
# might occur. By default this setting is enabled.
#
#replaygain_limit      "yes"
#
# This setting enables on-the-fly normalization volume adjustment. This will
# result in the volume of all playing audio to be adjusted so the output has
# equal "loudness". This setting is disabled by default.
#
#volume_normalization      "no"
#
###############################################################################

# Character Encoding ##########################################################
#
# If file or directory names do not display correctly for your locale then you
# may need to modify this setting.
#
filesystem_charset "UTF-8"
#
###############################################################################


Thks 4 ur attention, interest & support
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3830

PostPosted: Wed Jan 03, 2024 3:49 pm    Post subject: Reply with quote

Does pipewire works for other audio sources # to mpd?

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3404

PostPosted: Wed Jan 03, 2024 3:51 pm    Post subject: Reply with quote

Do your pipewire and mpd run as the same user?
Do you have a dbus running on the same user too?
Those 2 are prerequisites for the default configuration to work. I'm looking for a way to circumvent it (though I did take a break recently).


BTW, why unsupported software and not e.g. multimedia?
Back to top
View user's profile Send private message
arvamircea
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2022
Posts: 109
Location: Swadlincote

PostPosted: Wed Jan 03, 2024 3:55 pm    Post subject: Reply with quote

CaptainBlood wrote:
Does pipewire works for other audio sources # to mpd?

Thks 4 ur attention, interest & support.


My mpd.conf looks about the same.
I think pipewire works, I mean, I have audio. I don't have much control over it tho as wireplumber does not work.
Back to top
View user's profile Send private message
arvamircea
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2022
Posts: 109
Location: Swadlincote

PostPosted: Wed Jan 03, 2024 3:59 pm    Post subject: Reply with quote

szatox wrote:
Do your pipewire and mpd run as the same user?
Do you have a dbus running on the same user too?
Those 2 are prerequisites for the default configuration to work. I'm looking for a way to circumvent it (though I did take a break recently).


BTW, why unsupported software and not e.g. multimedia?


You know? I was scared that it might be something user related. I did not want to look into that on the wiki, it did not make sense to me, of course I want pipewire system-wide so it should be installed as root, same with mpd.
Any way, I will go read the wiki and come back to update this post if I manage to fix it.

Why 'unsupported software'? Well in hindsight I should have probably posted in multimedia. My logic was, "Is most likely a stupid mistake on my part, not something Gentoo specific."
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3830

PostPosted: Wed Jan 03, 2024 4:05 pm    Post subject: Reply with quote

arvamircea wrote:
I don't have much control over it tho as wireplumber does not work.
I think that should be fixed.

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3830

PostPosted: Wed Jan 03, 2024 4:26 pm    Post subject: Reply with quote

szatox wrote:
Do your pipewire and mpd run as the same user?
Do you have a dbus running on the same user too?
Those 2 are prerequisites for the default configuration to work
Yeah, dbus has been here in many places almost from the start, as some things seemed not to work without it here.

I have a (wrong?) feeling dbus+elogind+pam may provide a (little) layer of security ragarding rogue apps launches.

I"ve also saw many around the forum to favor avoiding theses three as much as possible.

Very confusing and very conservative as a result despite my low memory footprint policy.

Thks 4 ur attention, interest & support.<
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
arvamircea
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2022
Posts: 109
Location: Swadlincote

PostPosted: Sun Feb 04, 2024 2:10 am    Post subject: Reply with quote

[UPDATE]
Made some progress. Not much but is honest work.
1)The issue that I am having has nothing to do with "ncmpcpp". I've installed "mpc" and still no audio.
So it must be something to do with mpd and pipewire.

2)The issue has nothing do to with USE flags ether, I've installed mpd with USE=" * " but still no audio.

3)In "pavucontrol" it does not show mpd output at all.
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3404

PostPosted: Sun Feb 04, 2024 12:37 pm    Post subject: Reply with quote

> 1)The issue that I am having has nothing to do with "ncmpcpp". I've installed "mpc" and still no audio.
As expected, they are both replaceable UIs used to command Music Player >>DAEMON<< and nothing more. Even if you close your UI, the music stays on.

> 3)In "pavucontrol" it does not show mpd output at all.

What does your setup look like right now?
I'm asking in particular about user accounts: Your login user, users running pipewire, and user running mpd. It won't work until you get this part sorted. Are they the same user? Have you done anything clever to bridge the gaps in your audio subsystem?
It will not work until you get this part sorted.
_________________
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: 109
Location: Swadlincote

PostPosted: Sun Feb 04, 2024 3:39 pm    Post subject: Reply with quote

Thank you for your reply sir.
I have read the wiki on mpd/pipewire so many times I almost know them by heart.

My user:
Code:
cocolino


All accounts on the system:
Code:
root
bin
daemon
adm
lp
sync
shutdown
halt
news
uucp
operator
portage
nobody
polkitd
messagebus
man
sshd
cron
ntp
cocolino
nullmail
bitcoin
pcap
mysql
steamcmd
libreoffice
i2pd
apache
tor
nvpd
mpd
sndiod
avahi
qbittorrent
rtkit

The user running pipewire (ps aux | grep pipewire)
Code:
cocolino  5441  0.2  0.0  50876 15548 ?        S<l  15:35   0:00 /usr/bin/pipewire
cocolino  5443  0.3  0.0  31096 13392 ?        S<Ll 15:35   0:00 /usr/bin/pipewire -c pipewire-pulse.conf
cocolino  6307  0.0  0.0   7568  2304 pts/0    S+   15:37   0:00 grep --colour=auto pipewire


User running mpd (ps aux | grep mpd)
Code:
mpd       2467  0.0  0.0 858960 22080 ?        Ssl  15:30   0:00 /usr/bin/mpd /etc/mpd.conf
cocolino  6434  0.0  0.0   7568  2252 pts/0    S+   15:37   0:00 grep --colour=auto mpd


Details of the logged-in user (id cocolino)
Code:
uid=1000(cocolino) gid=1000(cocolino) groups=1000(cocolino),10(wheel),27(video),85(usb),100(users),377(pcap),48(docker),509(pipewire),43(tor),1001(games)


Groups of my user (groups cocolino)
Code:
wheel video usb users pcap docker pipewire tor games cocolino
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3404

PostPosted: Sun Feb 04, 2024 4:38 pm    Post subject: Reply with quote

So, mpd and pipewire run as different users. This is a problem.

The good solution would be to somehow make a single piewire server accept connections from all users. It should be possible, but I it seems nobody around knows how to do it right now.
As a bad workaround, you could start second instance of dbus, pipewire and wireplumber as mpd, but this will result in mpd user fighting your login user over control of hardware, so only one of you will be able to produce sound at any time, which is not very convenient. Also, wireplumber might mess up default outputs, so you might need to manually pin it to the playback device.
Finally, for the ugly workaround, it looks like you're the only log-in user on this machine. Changing mpd's user to your own might just do the trick. It's not supposed to be used this way, but at least it should work.
_________________
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: 109
Location: Swadlincote

PostPosted: Sun Feb 04, 2024 5:30 pm    Post subject: Reply with quote

Thank you. You made my day.
I thought I am such an idiot I can't even follow simple instructions.
Knowing is an actual problem makes me feel a lot better.

1) Could not figure out how to make Pipewire accept connections from all users
2) Starting mpd as a different user did not work ether. I start mpd with "rc-service mpd start". Just typing "mpd" in the console did not work, i don't get any errors or output.
3) Changeing MPD's user to my own, makes "rc-service mpd start" not work I get:
Code:
 * Stopping mpd ...                                                        [ ok ]
 * Starting mpd ...
Feb 04 17:26 : exception: Failed to create pid file "/var/lib/mpd/pid": Permission denied
 * start-stop-daemon: failed to start `/usr/bin/mpd'
 * Failed to start mpd                                                     [ !! ]
 * ERROR: mpd failed to start

I could change the permissions in `/usr/bin/mpd' but I don't know what I am doing and probably will break things more.

But is all good. I can just wait for a fix. Thank you again.
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3404

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

Quote:
Failed to create pid file "/var/lib/mpd/pid": Permission denied
this one at least looks easy to fix with chown.

Quote:
But is all good. I can just wait for a fix. Thank you again.
You're welcome, but I don't think waiting will cut it. This is not a bug, but a deliberate design choice. IMO a bad one, but it is still a deliberate choice, so I doubt fixing it is currently on the roadmap.
_________________
Make Computing Fun Again
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 1, 2  Next
Page 1 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