Hi all, I'm using pipewire, version above. I have installed it following the suggestions reported in gentoo documentation , systemd option. Sound works just fine, no issues so far. However, whenever I log in into kde (sddm) I have to run systemctl --user restart pipewire.socket pipewire-pulse.socket otherwise no application will be able to connect. If I enquiry the status of the units via systemd, they are reported to be working and pipewire/pipewire-pulse are present as processes. I have no real idea how to proceed further to debug or provide more details. Reproducible: Always
Portage 3.0.30 (python 3.10.4-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-11.3.0, glibc-2.35-r4, 5.17.6-cova x86_64) ================================================================= System uname: Linux-5.17.6-cova-x86_64-Intel-R-_Core-TM-_i7-6820HQ_CPU_@_2.70GHz-with-glibc2.35 KiB Mem: 65678352 total, 48346500 free KiB Swap: 8388604 total, 8388604 free Timestamp of repository gentoo: Thu, 12 May 2022 05:18:09 +0000 Head commit of repository gentoo: f536af2f0729e573dc9ad96c60d8f23f717dab8d sh bash 5.1_p16 ld GNU ld (Gentoo 2.38 p4) 2.38 app-misc/pax-utils: 1.3.4::gentoo app-shells/bash: 5.1_p16::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.34.1-r3::gentoo dev-lang/python: 3.8.13::gentoo, 3.9.12::gentoo, 3.10.4::gentoo, 3.11.0_beta1-r2::gentoo dev-lang/rust: 1.60.0::gentoo dev-util/cmake: 3.23.1::gentoo dev-util/meson: 0.62.1::gentoo sys-apps/baselayout: 2.8::gentoo sys-apps/sandbox: 2.29::gentoo sys-apps/systemd: 250.5-r1::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.71-r1::gentoo sys-devel/automake: 1.16.5::gentoo sys-devel/binutils: 2.38-r2::gentoo sys-devel/binutils-config: 5.4.1::gentoo sys-devel/clang: 14.0.3::gentoo sys-devel/gcc: 9.4.0::gentoo, 10.3.1_p20211126::gentoo, 11.3.0::gentoo sys-devel/gcc-config: 2.5-r1::gentoo sys-devel/libtool: 2.4.7::gentoo sys-devel/lld: 14.0.3::gentoo sys-devel/llvm: 14.0.3::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.17-r1::gentoo (virtual/os-headers) sys-libs/glibc: 2.35-r4::gentoo Repositories: gentoo location: /usr/portage sync-type: git sync-uri: https://anongit.gentoo.org/git/repo/sync/gentoo.git priority: -1000 sync-git-verify-commit-signature: yes kde location: /var/lib/layman/kde sync-type: laymansync sync-uri: https://anongit.gentoo.org/git/proj/kde.git masters: gentoo priority: 50 nix-guix location: /var/lib/layman/nix-guix sync-type: laymansync sync-uri: https://github.com/trofi/nix-guix-gentoo.git masters: gentoo priority: 50 local location: /usr/overlay masters: gentoo priority: 51 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O3 -fgraphite-identity -floop-nest-optimize -ftree-loop-distribution -flto=4 -fuse-linker-plugin -pipe -fpie -fpic -fstack-protector-strong -fstack-clash-protection" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/sddm/scripts/Xsetup" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=native -O3 -fgraphite-identity -floop-nest-optimize -ftree-loop-distribution -flto=4 -fuse-linker-plugin -pipe -fpie -fpic -fstack-protector-strong -fstack-clash-protection" DISTDIR="/usr/portage/distfiles" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/" LANG="en_IE.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -march=native -O3 -fgraphite-identity -floop-nest-optimize -ftree-loop-distribution -flto=4 -fuse-linker-plugin -pipe -fpie -fpic -fstack-protector-strong -fstack-clash-protection -Wl,--as-needed -Wl,--hash-style=gnu" LINGUAS="en it de" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" SHELL="/bin/bash" USE="3dnow 3dnowext 3dnowprefetch X \ a52 aac aalib acl acpi activities aim alsa amd64 apng appstream ares asf ati audio audiofile avahi bash-completion bidi bl bluetooth branding bri bzip2 cairo caps cdda cdr cjk cli crypt cups curl dba dbus declarative device-mapper dga divx divx4linux dri dts dv dvb dvd dvdr dvdread eap-sim edl egl encode ethereal evdev exif expat faad fam fame fbcon ffmpeg fftw flac force-cgi-redirect fortran ftp gallium garmin gd gdbm gif gimp gmedia gmp gnutls gphoto2 gpm gps gsm gtk gui h264 h323 iconv icq icu idn ifp ilbc imagemagick imap innodb ipod iproute2 ipv6 ithreads jabber java javascript joystick jpeg kde kontact kvm kwallet lastfm lcms libglvnd libnotify libtirpc libvirtd live lm_sensors lua lvm lxc lzma lzo mad maildir matroska mbox mdnsresponder-compat mhash mime mjpeg mmap mmx mmxext mng mozdevelop mozilla mp3 mp4 mpeg msn mtp multilib mysql ncurses network networkmanager new-hpcups nfsv4 njb nls nptl nptlonly offensive ofx ogg oggvorbis ogm openal openexr opengl openmp oscar pam pango parted pcap pcre pdf phonon php plasma plotutils png policykit ppds pulseaudio qemu qml qt5 readline real rtc ruby samba sasl screencast sdl seccomp semantic-desktop semantic-destkop sha512 sip slang slp smartcard sndfile snmp sox speex spell split-usr srt sse sse2 ssh ssl ssse3 startup-notification svg symlink systemd tcltk telepathy theora threads tiff tk touchpad tremor truetype udev udisks unicode upower usb utempter v4l v4l2 vaapi vcd vde vdpaum vhosts video videos vim-syntax virt-network virtualbox vorbis vulkan wav wayland widgets wifi wmf wmp wps wxwidgets wxwindows x264 xanim xattr xcb xface xft xine xinerama xml xosd xpm xscreensaver xsl xv xvid zeroconf zlib zpm" ABI_X86="64 32" ADA_TARGET="gnat_2020" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en it de en_IE" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="X86" LUA_SINGLE_TARGET="luajit" LUA_TARGETS="lua5-1 lua5-4 luajit" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8 python3_9 python3_10" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby26 ruby27 ruby30 ruby31" USERLAND="GNU" VIDEO_CARDS="i965 intel nvidia v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Let's try some basic checks. Please provide the output of these commands while the issue is present: ps aux | grep -E pulse\|wire echo $XDG_RUNTIME_DIR ls -l /run/user/*/{pipewire,pulse/}* pw-cli --version wpctl status pactl info systemctl status | head systemctl --user status | head ls -l {/etc,$HOME/.config}/{pipewire,wireplumber} Hopefully one of these will give some insight on where to look further.
(In reply to Niklāvs Koļesņikovs from comment #2) > Let's try some basic checks. Please provide the output of these commands > while the issue is present: > > ps aux | grep -E pulse\|wire cova 2727 0.1 0.0 52696 15324 ? S<sl 20:07 0:00 /usr/bin/pipewire cova 2728 0.5 0.0 448920 35416 ? S<sl 20:07 0:00 /usr/bin/wireplumber cova 2729 0.0 0.0 23356 7028 ? S<sl 20:07 0:00 /usr/bin/pipewire-pulse > > echo $XDG_RUNTIME_DIR /var/tmp/cova > > ls -l /run/user/*/{pipewire,pulse/}* srw-rw-rw- 1 cova cova 0 May 12 20:07 /run/user/1000/pipewire-0= -rw-r----- 1 cova cova 0 May 12 20:07 /run/user/1000/pipewire-0.lock srw-rw-rw- 1 cova cova 0 May 12 20:07 /run/user/1000/pulse/native= -rw-r--r-- 1 cova cova 5 May 12 20:07 /run/user/1000/pulse/pid > > pw-cli --version pw-cli Compiled with libpipewire 0.3.51 Linked with libpipewire 0.3.51 > > wpctl status Could not connect to PipeWire > > pactl info Connection failure: Connection refused pa_context_connect() failed: Connection refused > > systemctl status | head ● hobbes State: degraded Jobs: 0 queued Failed: 1 units Since: Thu 2022-05-12 20:06:50 CEST; 4min 48s ago CGroup: / ├─ 2565 bpfilter_umh ├─init.scope │ └─ 1 /usr/lib/systemd/systemd ├─system.slice > > systemctl --user status | head ● hobbes State: running Jobs: 0 queued Failed: 0 units Since: Thu 2022-05-12 20:07:00 CEST; 5min ago CGroup: /user.slice/user-1000.slice/user@1000.service ├─app.slice │ ├─app-\x2fusr\x2fbin\x2fkalendarac-49fb0a628efa4647a169d1cbf369c0a1.scope │ │ ├─ 3036 /usr/bin/kalendarac -session 10cde26262000165192503300000029090009_1652378762_539004 │ │ ├─ 3086 /usr/bin/akonadi_control > > ls -l {/etc,$HOME/.config}/{pipewire,wireplumber} ls: cannot access '/etc/pipewire': No such file or directory ls: cannot access '/home/cova/.config/pipewire': No such file or directory ls: cannot access '/home/cova/.config/wireplumber': No such file or directory /etc/wireplumber: total 16 -rw-r--r-- 1 root root 2399 May 11 09:34 bluetooth.conf drwxr-xr-x 1 root root 144 May 11 09:34 bluetooth.lua.d/ drwxr-xr-x 1 root root 32 May 11 09:34 common/ -rw-r--r-- 1 root root 2121 May 11 09:34 main.conf drwxr-xr-x 1 root root 494 May 11 09:34 main.lua.d/ -rw-r--r-- 1 root root 2091 May 11 09:34 policy.conf drwxr-xr-x 1 root root 154 May 11 09:34 policy.lua.d/ drwxr-xr-x 1 root root 572 May 11 09:34 scripts/ -rw-r--r-- 1 root root 2596 May 11 09:34 wireplumber.conf > > Hopefully one of these will give some insight on where to look further. After restarting pipewire, with ⌙➤ systemctl --user restart pipewire.socket pipewire-pulse.socket differences are: ⌙➤ ls -l /run/user/*/{pipewire,pulse/}* srw-rw-rw- 1 cova cova 0 May 12 20:13 /run/user/1000/pipewire-0= srw-rw-rw- 1 cova cova 0 May 12 20:13 /run/user/1000/pulse/native= -rw-r--r-- 1 cova cova 5 May 12 20:07 /run/user/1000/pulse/pid (no lock file) ⌙➤ wpctl status PipeWire 'pipewire-0' [0.3.51, cova@hobbes, cookie:3334018671] └─ Clients: 31. WirePlumber [0.3.51, cova@hobbes, pid:4607] 32. WirePlumber [export] [0.3.51, cova@hobbes, pid:4607] 34. Plasma PA [0.3.51, cova@hobbes, pid:2921] 35. Plasma PA [0.3.51, cova@hobbes, pid:2909] 37. pipewire-pulse [0.3.51, cova@hobbes, pid:4613] 40. xdg-desktop-portal [0.3.51, cova@hobbes, pid:3762] 80. wpctl [0.3.51, cova@hobbes, pid:4735] Audio ├─ Devices: │ 47. GM107 High Definition Audio Controller [GeForce 940MX] [alsa] │ 48. AC511 Sound Bar [alsa] │ 49. Webcam C930e [alsa] │ 50. Built-in Audio [alsa] │ ├─ Sinks: │ 57. GM107 High Definition Audio Controller [GeForce 940MX] Digital Stereo (HDMI 3) [vol: 0.74] │ 58. AC511 Sound Bar Analog Stereo [vol: 0.53] │ * 60. Built-in Audio Analog Stereo [vol: 0.59] │ ├─ Sink endpoints: │ ├─ Sources: │ 38. Webcam C930e Analog Stereo [vol: 0.74] │ * 59. AC511 Sound Bar Analog Stereo [vol: 0.67 MUTED] │ 61. Built-in Audio Analog Stereo [vol: 0.74] │ ├─ Source endpoints: │ └─ Streams: Video ├─ Devices: │ 41. Logitech Webcam C930e [v4l2] │ 42. Logitech Webcam C930e [v4l2] │ 43. Integrated Camera [v4l2] │ 44. Integrated Camera [v4l2] │ 45. Akvcam (Output device) [v4l2] │ 46. Akvcam (Capture device) [v4l2] │ ├─ Sinks: │ ├─ Sink endpoints: │ ├─ Sources: │ * 51. Logitech Webcam C930e │ 53. Integrated Camera │ 55. Akvcam (Capture device) │ ├─ Source endpoints: │ └─ Streams: Settings └─ Default Configured Node Names: 0. Audio/Sink alsa_output.pci-0000_00_1f.3.analog-stereo 1. Audio/Source alsa_input.usb-Dell_Dell_AC511_USB_SoundBar-00.analog-stereo ⌙➤ pactl info Server String: /var/tmp/cova/pulse/native Library Protocol Version: 35 Server Protocol Version: 35 Is Local: yes Client Index: 83 Tile Size: 65472 User Name: cova Host Name: hobbes Server Name: PulseAudio (on PipeWire 0.3.51) Server Version: 15.0.0 Default Sample Specification: float32le 2ch 48000Hz Default Channel Map: front-left,front-right Default Sink: alsa_output.pci-0000_00_1f.3.analog-stereo Default Source: alsa_input.usb-Dell_Dell_AC511_USB_SoundBar-00.analog-stereo Cookie: c6b9:166f systemd status is exactly the same and of course the pipewire directories
I'm not sure if that's the entire reason but your $XDG_RUNTIME_DIR is set to a surprising value - it's usually /run/user/<UID> rather than /var/tmp/<username>. Also I observe that /var/tmp is usually persistent tmp but XDG_RUNTIME_DIR, I believe, should be always tmpfs backed but that's mainly a correctness issue. After you restart the daemons the sockets end up being moved from the usual/correct /run/user/1000/ to the /var/tmp/cova and then it starts working but I'd still suggest not overriding XDG_RUNTIME_DIR to /var/tmp/cova in the first place. Thank you for also providing the output after the issue is cleared by the daemon restart - I was going to ask for that now but it's already available. ;) I think there's a bit of a surprising behavior in that PipeWire somehow picks up the new XDG_RUNTIME_DIR but the systemd socket files still create the old placeholders inside /run/users/1000 - I'm not sure why that works rather than becoming fully broken. I'll try bringing up with the upstream to see if such behavior is expected and desired (arguably your system is broken but that doesn't change that the observed behavior is unusual enough that it would be best to understand why and how it ends up working anyway). I'm also a bit unsure why there's = and the end of socket files for both PipeWire (/run/user/1000/pipewire-0=) and PulseAudio (/run/user/1000/pulse/native=) but I can't immediately come up with an explanation for that. Perhaps you have an idea? If the socket filenames really end with = that could also cause the issue, since I don't think any software is anticipating that. What does this return after the daemons have been restarted: ls -l /var/tmp/cova/{pipewire,pulse/}*
Sorry, I meant /run/users/<UID> not the singular user I wrote in my reply.
Also I forgot that you should check with `systemctl list-units --failed` to figure out which systemd unit failed and try to fix that since in rare occasions that can lead to surprising system behavior if the unit that failed happens to be important to the boot process (though in this case it's probably all related to the XDG_RUNTIME_DIR override).
(In reply to Niklāvs Koļesņikovs from comment #5) > Sorry, I meant /run/users/<UID> not the singular user I wrote in my reply. Double sorry, turns out I was right the first time. It is singular.
(In reply to Niklāvs Koļesņikovs from comment #4) > I'm not sure if that's the entire reason but your $XDG_RUNTIME_DIR is set to > a surprising value - it's usually /run/user/<UID> rather than > /var/tmp/<username>. Also I observe that /var/tmp is usually persistent tmp > but XDG_RUNTIME_DIR, I believe, should be always tmpfs backed but that's > mainly a correctness issue. > > After you restart the daemons the sockets end up being moved from the > usual/correct /run/user/1000/ to the /var/tmp/cova and then it starts > working but I'd still suggest not overriding XDG_RUNTIME_DIR to > /var/tmp/cova in the first place. Nailed it! For some reasons (I guess a since long forgotten debug session for some other weirdness common with Gentoo ~ :) ) I had that setting laying around. I removed it an now pipewire starts without issues. Great catch. > I'm also a bit unsure why there's = and the end of socket files for both > PipeWire (/run/user/1000/pipewire-0=) and PulseAudio > (/run/user/1000/pulse/native=) but I can't immediately come up with an > explanation for that. Perhaps you have an idea? If the socket filenames > really end with = that could also cause the issue, since I don't think any > software is anticipating that. This is only a "ls" artifact. launching it with ls -la --indicator-style=none --color=never /run/user/1000 creates a clean list: ⌙➤ ls -la --indicator-style=none --color=never /run/user/1000 total 4 drwx------ 9 cova cova 400 May 13 08:59 . drwxr-xr-x 3 root root 60 May 13 08:57 .. srwxr-xr-x 1 cova cova 0 May 13 08:57 Alacritty-:0-3746.sock srwxr-xr-x 1 cova cova 0 May 13 08:59 Alacritty-:0-4154.sock -rw-r--r-- 1 cova cova 71 May 13 08:57 KSMserver__0 drwx------ 2 cova cova 60 May 13 08:57 at-spi srw-rw-rw- 1 cova cova 0 May 13 08:57 bus drwx------ 3 cova cova 60 May 13 08:57 dbus-1 drwx------ 2 cova cova 60 May 13 08:57 dconf prw------- 1 cova cova 0 May 13 08:57 fish_universal_variables.notifier dr-x------ 2 cova cova 0 May 13 08:57 gvfs drwx------ 2 cova cova 40 May 13 08:57 gvfsd srw------- 1 cova cova 0 May 13 08:57 kdeinit5__0 srwxr-xr-x 1 cova cova 0 May 13 08:57 klauncherBJMxdW.1.slave-socket srwx------ 1 cova cova 0 May 13 08:57 org.keepassxc.KeePassXC.BrowserServer srw-rw-rw- 1 cova cova 0 May 13 08:57 pipewire-0 -rw-r----- 1 cova cova 0 May 13 08:57 pipewire-0.lock drwx------ 2 cova cova 80 May 13 08:57 pulse drwxr-xr-x 6 cova cova 160 May 13 08:57 systemd So now pipewire works just fine, thanks for the hint!!!