Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sound then update with No sound #25002

Closed
1 of 7 tasks
Martii opened this issue Apr 15, 2024 · 15 comments
Closed
1 of 7 tasks

Sound then update with No sound #25002

Martii opened this issue Apr 15, 2024 · 15 comments
Labels
Triage: Needed (managed by bot!) issue that was just created and needs someone looking at it

Comments

@Martii
Copy link

Martii commented Apr 15, 2024

Bug report

Describe the bug

Here is a clear and concise description of what the problem is:

No sound today after:

$ sudo flatpak update

... was working yesterday before update.

Please advise and thanks for the look.

Expected Behavior

Here is a clear and concise description of what was expected to happen:

Have sound.

Actual Behavior

No sound.

Possible Fix

Needs check for PulseAudio and offer/use it perhaps in addition to PipeWire if detected.

More of a work around here in the short term...

$ # Viable solution not messing with installing Pipewire which would affect a lot of applications including system

$ sudo flatpak update --commit=c66a791ac482c3b0c257188f2b3ccf796082176e0822192ec9132f9b78044dd0 tv.kodi.Kodi
[sudo] password:
Looking for updates…


        ID                   Branch         Op        Remote         Download
 1. [✓] tv.kodi.Kodi         stable         u         flathub        39.7 MB / 220.6 MB

Updating… ████████████████████ 100%  6.6 MB/s  00:00
Note that '/var/lib/flatpak/exports/share' is not in the search path
set by the XDG_DATA_HOME and XDG_DATA_DIRS
environment variables, so applications may not
be able to find it until you set them. The
directories currently searched are:

- /root/.local/share
        ID                   Branch         Op        Remote         Download
 1. [✓] tv.kodi.Kodi         stable         u         flathub        39.7 MB / 220.6 MB

Updates complete.

$ # Prevent updates until fixed for production targets
$ flatpak mask tv.kodi.Kodi

$ ## Future option to release update prevention
$ #flatpak mask --remove tv.kodi.Kodi

ACCEPTED FIX

Mentioned at #25002 (comment) and documented exactly at #25002 (comment)

Patch

#25019

#25043

flathub/tv.kodi.Kodi#252
$ flatpak info tv.kodi.Kodi

Team Kodi - Ultimate entertainment center

          ID: tv.kodi.Kodi
         Ref: app/tv.kodi.Kodi/x86_64/stable
        Arch: x86_64
      Branch: stable
     Version: 21.0-Omega
     License: GPL-2.0-only GPL-2.0-or-later LGPL-2.1-or-later MIT BSD-3-Clause BSD-4-Clause
      Origin: flathub
  Collection: org.flathub.Stable
Installation: system
   Installed: 508.3 MB
     Runtime: org.freedesktop.Platform/x86_64/22.08
         Sdk: org.freedesktop.Sdk/x86_64/22.08

      Commit: 1121f35831a650c21f833dfa79d2544e9770ebb222be032cab858aa32f9cf95d
      Parent: 54a88d5dd9f7f477144a2ab9aeee4e161eae88326cc36a67c024f0f435e3d256
     Subject: Revert "Add PipeWire support" (ebb2bdeb)
        Date: 2024-05-11 00:13:24 +0000
flathub/tv.kodi.Kodi#259
$ flatpak install --user https://dl.flathub.org/build-repo/106582/tv.kodi.Kodi.flatpakref
error: Can't load uri https://dl.flathub.org/build-repo/106582/tv.kodi.Kodi.flatpakref: Server returned status 404: Not Found

$ # Doesn't appear to be "long lived" after two days. Unable to test.

#25252

To Reproduce

Steps to reproduce the behavior:

$ uname -a
Linux machine 6.5.0-27-generic #28~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 15 10:51:06 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:        22.04
Codename:       jammy

$ flatpak remote-info --log flathub tv.kodi.Kodi
        ID: tv.kodi.Kodi
       Ref: app/tv.kodi.Kodi/x86_64/stable
      Arch: x86_64
    Branch: stable
Collection: org.flathub.Stable
  Download: 220.7 MB
 Installed: 508.2 MB
   Runtime: org.freedesktop.Platform/x86_64/22.08
       Sdk: org.freedesktop.Sdk/x86_64/22.08

    Commit: 12f232340d35749eb4513802c12614126cd0b0e631bf809df414063c1c3e332b
    Parent: c66a791ac482c3b0c257188f2b3ccf796082176e0822192ec9132f9b78044dd0
   Subject: Update hwdata (af8e5a0b)
      Date: 2024-04-14 16:49:35 +0000
   History:

    Commit: c66a791ac482c3b0c257188f2b3ccf796082176e0822192ec9132f9b78044dd0
   Subject: Update addons (25fba414)
      Date: 2024-04-07 15:51:04 +0000

$ # Sound at previous release of c66a791ac482c3b0c257188f2b3ccf796082176e0822192ec9132f9b78044dd0

$ flatpak run tv.kodi.Kodi --version
Kodi Media Center 21.0 (21.0.0) Git:20240406-60c4500-dirty
Copyright (C) 2005-2021 Team Kodi - http://kodi.tv

$ # See screenshots beginning with Sound since current flatpak seems a bit useless for versioning switch.
$ sudo flatpak update
$ # No Sound at current release of 12f232340d35749eb4513802c12614126cd0b0e631bf809df414063c1c3e332b

$ flatpak run tv.kodi.Kodi --version
Kodi Media Center 21.0 (21.0.0) Git:20240406-60c4500-dirty
Copyright (C) 2005-2021 Team Kodi - http://kodi.tv

$ # See screenshots beginning with No Sound since current flatpak seems a bit useless for versioning switch.

Debuglog

The debuglog can be found here:

Project should provide a howto reference here in the HTML comments to do this by modifying xbmc/xbmc/blob/ddf131b/.github/ISSUE_TEMPLATE/bug_report.md ... will append in a bit after I find it for before and after... EDIT attached:

  Sound No Sound
normal ~/.var/app/tv.kodi.Kodi/data/temp/kodi.old.log ~/.var/app/tv.kodi.Kodi/data/temp/kodi.log
EDIT debug ~/.var/app/tv.kodi.Kodi/data/temp/kodi.old.log ~/.var/app/tv.kodi.Kodi/data/temp/kodi.log

Screenshots

Here are some links or screenshots to help explain the problem:

Sound  
Sound - System Info Sound - Settings-System
No Sound  
No Sound - System Info No Sound - Settings-System

Additional context or screenshots (if appropriate)

Here is some additional context or explanation that might help:

¹ Released End of Standard Support End of Ubuntu Pro Support
22.04 LTS (Jammy Jellyfish) Apr 2022 Apr 2027 Apr 2032

References reported by others

Your Environment

Used Operating system:

  • Android

  • iOS

  • tvOS

  • Linux

  • macOS

  • Windows

  • Windows UWP

  • Operating system version/name: Kubuntu (see above Steps To Reproduce (STR))

  • Kodi version: Varies (described elsewhere above)

note: Once the issue is made we require you to update it with new information or Kodi versions should that be required.
Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.

@xbmc-gh-bot xbmc-gh-bot bot added the Triage: Needed (managed by bot!) issue that was just created and needs someone looking at it label Apr 15, 2024
@neo1973
Copy link
Member

neo1973 commented Apr 15, 2024

Your system is offering a PipeWire socket so Kodi is using it because the PipeWire backend has higher priority than PulseAudio. To force PulseAudio you can launch Kode with --audio-backend=pulseaudio. I can't say what the problem with your PipeWire setup is, maybe a debug log would reveal more information but as is we can't help you any further.

@neo1973 neo1973 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 15, 2024
@Martii
Copy link
Author

Martii commented Apr 15, 2024

@neo1973

It would be more helpful for you to show me how PipeWire was installed. I have not installed PipeWire at all plus it worked on last weeks build... so Kodi issue not systems. I will try the switch override but the code should be modified to handle any sound server. It used to.

@neo1973
Copy link
Member

neo1973 commented Apr 15, 2024

PipeWire is part of your host system, the Flatpak doesn't provide/install it. All yesterdays update does is to expose the PipeWire socket provided by the host to the Flatpak so it can be used: flathub/tv.kodi.Kodi@f7e5df7 For Kodi to use PipeWire over PulseAudio is the intended behaviour and matches native installs. It's not an option to not expose the PipeWire socket as this breaks the setup for people with a working PipeWire install.

@Martii
Copy link
Author

Martii commented Apr 15, 2024

@neo1973

you can launch Kode with --audio-backend=pulseaudio

$ flatpak run tv.kodi.Kodi --audio-backend=pulseaudio

... or alternative from flatpak installation...

$ # NOTE: May require KDE/Plasma widget or other permissions to change in Application menus
$ /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=kodi tv.kodi.Kodi --audio-backend=pulseaudio

... seems to work with it. Since Jammy's life cycle is 10 years from release this might be nice to have in the Kodi documentation for those machines... along with support for the flatpak log file locations. Thank you for that suggestion.

maybe a debug log would reveal more information but as is we can't help you any further.

Debug logs were included about 10 minutes after issue creation.

All yesterdays update does is to expose the PipeWire socket provided by the host to the Flatpak so it can be used: flathub/tv.kodi.Kodi@f7e5df7

Appreciate the explanation. Still trying to find any command that actually shows if PipeWire is installed. I certainly didn't add their PPA.

EDIT f7e5df7/tv.kodi.Kodi.yml#L17 is what broke it. If removed then it resumes normal operation with PulseAudio. So:

Your system is offering a PipeWire socket

... is where Kodi is trying to force usage of PipeWire which may or may not be present on a target host. In my cases so far it's not present natively.

For Kodi to use PipeWire over PulseAudio

I think I saw something in a documentation article about this from their PPA... more to check out.

For Kodi to use PipeWire over PulseAudio is the intended behaviour and matches native installs.

The Ubuntu PPA has been severely out of date, missing binaries, etc, and definitely didn't target PipeWire on any production machines that I've serviced. It was also labeled as PulseAudio... so not sure what you mean here. It's also been "retired".

@Martii
Copy link
Author

Martii commented Apr 15, 2024

@neo1973

NOTE This reply may change at random when new commands or tools are found

$ # PulseAudio control
$ pactl info
Server String: /run/user/1000/pulse/native
Library Protocol Version: 35
Server Protocol Version: 35
Is Local: yes
Client Index: 38
Tile Size: 65472
User Name: user
Host Name: htpc
Server Name: pulseaudio
Server Version: 15.99.1
Default Sample Specification: s16le 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000_01_00.1.hdmi-surround
Default Source: alsa_input.usb-SG.Ltd_SG_Control_Mic-00.mono-fallback
Cookie: bd92:6d58

Says I'm running PulseAudio on multiple machines that are affected by this... checking for more commands.


$ apt-cache search --names-only ^pulseaudio$
pulseaudio - PulseAudio sound server

$ apt-cache policy pulseaudio
pulseaudio:
  Installed: 1:15.99.1+dfsg1-1ubuntu2.2
  Candidate: 1:15.99.1+dfsg1-1ubuntu2.2
  Version table:
 *** 1:15.99.1+dfsg1-1ubuntu2.2 500
        500 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     1:15.99.1+dfsg1-1ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

$ apt-cache search --names-only ^pipewire$
pipewire - audio and video processing engine multimedia server

$ apt-cache policy pipewire
pipewire:
  Installed: 0.3.48-1ubuntu3
  Candidate: 0.3.48-1ubuntu3
  Version table:
 *** 0.3.48-1ubuntu3 500
        500 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     0.3.48-1ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

$ apt-cache search --names-only ^pipewire-pulse$
pipewire-pulse - PipeWire PulseAudio daemon

$ apt-cache policy pipewire-pulse
pipewire-pulse:
  Installed: (none)
  Candidate: 0.3.48-1ubuntu3
  Version table:
     0.3.48-1ubuntu3 500
        500 http://us.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages
     0.3.48-1ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages

$ apt-cache search --names-only ^wireplumber$
wireplumber - modular session / policy manager for PipeWire

$ apt-cache policy wireplumber
wireplumber:
  Installed: (none)
  Candidate: 0.4.8-4
  Version table:
     0.4.8-4 500
        500 http://us.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages

... do have some of these installed by the distro. First package is the current and default sound server. i.e. PulseAudio.


$ inxi -A
Audio:
  Device-1: NVIDIA GP108 High Definition Audio driver: snd_hda_intel
  Device-2: ELMCU SG Control Mic type: USB
    driver: hid-generic,snd-usb-audio,usbhid
  Sound Server-1: ALSA v: k6.5.0-27-generic running: yes
  Sound Server-2: PulseAudio v: 15.99.1 running: yes
  Sound Server-3: PipeWire v: 0.3.48 running: yes

$ systemctl --user status pulseaudio
? pulseaudio.service - Sound Service
     Loaded: loaded (/usr/lib/systemd/user/pulseaudio.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2024-04-15 13:38:23 MDT; 9h ago
TriggeredBy: ? pulseaudio.socket


$ systemctl --user status pipewire
? pipewire.service - PipeWire Multimedia Service
     Loaded: loaded (/usr/lib/systemd/user/pipewire.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2024-04-15 13:38:23 MDT; 9h ago
TriggeredBy: ? pipewire.socket


$ # (Click arrow to expand result)

$ # PipeWire command line interface
$ pw-cli info all

	id: 0
	permissions: rwxm
	type: PipeWire:Interface:Core/3
	cookie: 1016199336
	user-name: "user"
	host-name: "htpc"
	version: "0.3.48"
	name: "pipewire-0"
*	properties:
*		config.name = "pipewire.conf"
*		link.max-buffers = "16"
*		core.daemon = "true"
*		core.name = "pipewire-0"
*		default.clock.min-quantum = "16"
*		cpu.max-align = "32"
*		default.clock.rate = "48000"
*		default.clock.quantum = "1024"
*		default.clock.max-quantum = "2048"
*		default.clock.quantum-limit = "8192"
*		default.video.width = "640"
*		default.video.height = "480"
*		default.video.rate.num = "25"
*		default.video.rate.denom = "1"
*		log.level = "2"
*		clock.power-of-two-quantum = "true"
*		mem.warn-mlock = "false"
*		mem.allow-mlock = "true"
*		settings.check-quantum = "false"
*		settings.check-rate = "false"
*		object.id = "0"
*		object.serial = "0"
	id: 1
	permissions: rwxm
	type: PipeWire:Interface:Module/3
	name: "libpipewire-module-rt"
	filename: "/usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-rt.so"
	args: "{
            nice.level    = -11
            #rt.prio      = 88
            #rt.time.soft = -1
            #rt.time.hard = -1
        }"
*	properties:
*		module.name = "libpipewire-module-rt"
*		object.id = "1"
*		object.serial = "1"
*		module.author = "Wim Taymans <[email protected]>"
*		module.description = "Use realtime thread scheduling, falling back to RTKit"
*		module.usage = "[nice.level=<priority: default 20(don't change)>] [rt.prio=<priority: default 88>] [rt.time.soft=<in usec: default -1] [rt.time.hard=<in usec: default -1] "
*		module.version = "0.3.48"
*		nice.level = "-11"
	id: 2
	permissions: rwxm
	type: PipeWire:Interface:Module/3
	name: "libpipewire-module-protocol-native"
	filename: "/usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-protocol-native.so"
	args: "(null)"
*	properties:
*		module.name = "libpipewire-module-protocol-native"
*		object.id = "2"
*		object.serial = "2"
*		module.author = "Wim Taymans <[email protected]>"
*		module.description = "Native protocol using unix sockets"
*		module.version = "0.3.48"
	id: 3
	permissions: rwxm
	type: PipeWire:Interface:Module/3
	name: "libpipewire-module-profiler"
	filename: "/usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-profiler.so"
	args: "(null)"
*	properties:
*		module.name = "libpipewire-module-profiler"
*		object.id = "3"
*		object.serial = "3"
*		module.author = "Wim Taymans <[email protected]>"
*		module.description = "Generate Profiling data"
*		module.version = "0.3.48"
	id: 5
	permissions: rwxm
	type: PipeWire:Interface:Module/3
	name: "libpipewire-module-metadata"
	filename: "/usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-metadata.so"
	args: "(null)"
*	properties:
*		module.name = "libpipewire-module-metadata"
*		object.id = "5"
*		object.serial = "5"
*		module.author = "Wim Taymans <[email protected]>"
*		module.description = "Allow clients to create metadata store"
*		module.version = "0.3.48"
	id: 6
	permissions: rwxm
	type: PipeWire:Interface:Factory/3
	name: "metadata"
	object-type: PipeWire:Interface:Metadata/3
*	properties:
*		module.id = "5"
*		object.id = "6"
*		object.serial = "6"
*		factory.name = "metadata"
*		factory.type.name = "PipeWire:Interface:Metadata"
*		factory.type.version = "3"
	id: 7
	permissions: rwxm
	type: PipeWire:Interface:Module/3
	name: "libpipewire-module-spa-device-factory"
	filename: "/usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-spa-device-factory.so"
	args: "(null)"
*	properties:
*		module.name = "libpipewire-module-spa-device-factory"
*		object.id = "7"
*		object.serial = "7"
*		module.author = "Wim Taymans <[email protected]>"
*		module.description = "Provide a factory to make SPA devices"
*		module.version = "0.3.48"
	id: 8
	permissions: rwxm
	type: PipeWire:Interface:Factory/3
	name: "spa-device-factory"
	object-type: PipeWire:Interface:Device/3
*	properties:
*		module.id = "7"
*		object.id = "8"
*		object.serial = "8"
*		factory.name = "spa-device-factory"
*		factory.type.name = "PipeWire:Interface:Device"
*		factory.type.version = "3"
	id: 9
	permissions: rwxm
	type: PipeWire:Interface:Module/3
	name: "libpipewire-module-spa-node-factory"
	filename: "/usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-spa-node-factory.so"
	args: "(null)"
*	properties:
*		module.name = "libpipewire-module-spa-node-factory"
*		object.id = "9"
*		object.serial = "9"
*		module.author = "Wim Taymans <[email protected]>"
*		module.description = "Provide a factory to make SPA nodes"
*		module.version = "0.3.48"
	id: 10
	permissions: rwxm
	type: PipeWire:Interface:Factory/3
	name: "spa-node-factory"
	object-type: PipeWire:Interface:Node/3
*	properties:
*		module.id = "9"
*		object.id = "10"
*		object.serial = "10"
*		factory.name = "spa-node-factory"
*		factory.type.name = "PipeWire:Interface:Node"
*		factory.type.version = "3"
	id: 11
	permissions: rwxm
	type: PipeWire:Interface:Module/3
	name: "libpipewire-module-client-node"
	filename: "/usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-client-node.so"
	args: "(null)"
*	properties:
*		module.name = "libpipewire-module-client-node"
*		object.id = "11"
*		object.serial = "11"
*		module.author = "Wim Taymans <[email protected]>"
*		module.description = "Allow clients to create and control remote nodes"
*		module.version = "0.3.48"
	id: 12
	permissions: rwxm
	type: PipeWire:Interface:Factory/3
	name: "client-node"
	object-type: PipeWire:Interface:ClientNode/4
*	properties:
*		module.id = "11"
*		object.id = "12"
*		object.serial = "12"
*		factory.name = "client-node"
*		factory.type.name = "PipeWire:Interface:ClientNode"
*		factory.type.version = "4"
	id: 13
	permissions: rwxm
	type: PipeWire:Interface:Module/3
	name: "libpipewire-module-client-device"
	filename: "/usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-client-device.so"
	args: "(null)"
*	properties:
*		module.name = "libpipewire-module-client-device"
*		object.id = "13"
*		object.serial = "13"
*		module.author = "Wim Taymans <[email protected]>"
*		module.description = "Allow clients to create and control remote devices"
*		module.version = "0.3.48"
	id: 14
	permissions: rwxm
	type: PipeWire:Interface:Factory/3
	name: "client-device"
	object-type: Spa:Pointer:Interface:Device/0
*	properties:
*		factory.usage = "[device.name=<string>]"
*		module.id = "13"
*		object.id = "14"
*		object.serial = "14"
*		factory.name = "client-device"
*		factory.type.name = "Spa:Pointer:Interface:Device"
*		factory.type.version = "0"
	id: 15
	permissions: rwxm
	type: PipeWire:Interface:Module/3
	name: "libpipewire-module-portal"
	filename: "/usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-portal.so"
	args: "(null)"
*	properties:
*		module.name = "libpipewire-module-portal"
*		object.id = "15"
*		object.serial = "15"
	id: 16
	permissions: rwxm
	type: PipeWire:Interface:Module/3
	name: "libpipewire-module-access"
	filename: "/usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-access.so"
	args: "{
            # access.allowed to list an array of paths of allowed
            # apps.
            #access.allowed = [
            #    /usr/bin/pipewire-media-session
            #]

            # An array of rejected paths.
            #access.rejected = [ ]

            # An array of paths with restricted access.
            #access.restricted = [ ]

            # Anything not in the above lists gets assigned the
            # access.force permission.
            #access.force = flatpak
        }"
*	properties:
*		module.name = "libpipewire-module-access"
*		object.id = "16"
*		object.serial = "16"
*		module.author = "Wim Taymans <[email protected]>"
*		module.description = "Perform access check"
*		module.usage = "[ access.force=flatpak ] [ access.allowed=<cmd-line> ] [ access.rejected=<cmd-line> ] [ access.restricted=<cmd-line> ] "
*		module.version = "0.3.48"
	id: 17
	permissions: rwxm
	type: PipeWire:Interface:Module/3
	name: "libpipewire-module-adapter"
	filename: "/usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-adapter.so"
	args: "(null)"
*	properties:
*		module.name = "libpipewire-module-adapter"
*		object.id = "17"
*		object.serial = "17"
*		module.author = "Wim Taymans <[email protected]>"
*		module.description = "Manage adapter nodes"
*		module.version = "0.3.48"
	id: 18
	permissions: rwxm
	type: PipeWire:Interface:Factory/3
	name: "adapter"
	object-type: PipeWire:Interface:Node/3
*	properties:
*		factory.usage = "factory.name=<factory-name> [library.name=<library-name>] node.name=<string> "
*		module.id = "17"
*		object.id = "18"
*		object.serial = "18"
*		factory.name = "adapter"
*		factory.type.name = "PipeWire:Interface:Node"
*		factory.type.version = "3"
	id: 19
	permissions: rwxm
	type: PipeWire:Interface:Module/3
	name: "libpipewire-module-link-factory"
	filename: "/usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-link-factory.so"
	args: "(null)"
*	properties:
*		module.name = "libpipewire-module-link-factory"
*		object.id = "19"
*		object.serial = "19"
*		module.author = "Wim Taymans <[email protected]>"
*		module.description = "Allow clients to create links"
*		module.version = "0.3.48"
	id: 20
	permissions: rwxm
	type: PipeWire:Interface:Factory/3
	name: "link-factory"
	object-type: PipeWire:Interface:Link/3
*	properties:
*		factory.usage = "link.output.node=<output-node> [link.output.port=<output-port>] link.input.node=<input-node> [link.input.port=<input-port>] [object.linger=<bool>] [link.passive=<bool>]"
*		module.id = "19"
*		object.id = "20"
*		object.serial = "20"
*		factory.name = "link-factory"
*		factory.type.name = "PipeWire:Interface:Link"
*		factory.type.version = "3"
	id: 21
	permissions: rwxm
	type: PipeWire:Interface:Module/3
	name: "libpipewire-module-session-manager"
	filename: "/usr/lib/x86_64-linux-gnu/pipewire-0.3/libpipewire-module-session-manager.so"
	args: "(null)"
*	properties:
*		module.name = "libpipewire-module-session-manager"
*		object.id = "21"
*		object.serial = "21"
*		module.author = "George Kiagiadakis <[email protected]>"
*		module.description = "Implements objects for session management"
*		module.version = "0.3.48"
	id: 22
	permissions: rwxm
	type: PipeWire:Interface:Factory/3
	name: "client-endpoint"
	object-type: PipeWire:Interface:ClientEndpoint/0
*	properties:
*		module.id = "21"
*		object.id = "22"
*		object.serial = "22"
*		factory.name = "client-endpoint"
*		factory.type.name = "PipeWire:Interface:ClientEndpoint"
*		factory.type.version = "0"
	id: 23
	permissions: rwxm
	type: PipeWire:Interface:Factory/3
	name: "client-session"
	object-type: PipeWire:Interface:ClientSession/0
*	properties:
*		module.id = "21"
*		object.id = "23"
*		object.serial = "23"
*		factory.name = "client-session"
*		factory.type.name = "PipeWire:Interface:ClientSession"
*		factory.type.version = "0"
	id: 24
	permissions: rwxm
	type: PipeWire:Interface:Factory/3
	name: "session"
	object-type: PipeWire:Interface:Session/0
*	properties:
*		module.id = "21"
*		object.id = "24"
*		object.serial = "24"
*		factory.name = "session"
*		factory.type.name = "PipeWire:Interface:Session"
*		factory.type.version = "0"
	id: 25
	permissions: rwxm
	type: PipeWire:Interface:Factory/3
	name: "endpoint"
	object-type: PipeWire:Interface:Endpoint/0
*	properties:
*		module.id = "21"
*		object.id = "25"
*		object.serial = "25"
*		factory.name = "endpoint"
*		factory.type.name = "PipeWire:Interface:Endpoint"
*		factory.type.version = "0"
	id: 26
	permissions: rwxm
	type: PipeWire:Interface:Factory/3
	name: "endpoint-stream"
	object-type: PipeWire:Interface:EndpointStream/0
*	properties:
*		module.id = "21"
*		object.id = "26"
*		object.serial = "26"
*		factory.name = "endpoint-stream"
*		factory.type.name = "PipeWire:Interface:EndpointStream"
*		factory.type.version = "0"
	id: 27
	permissions: rwxm
	type: PipeWire:Interface:Factory/3
	name: "endpoint-link"
	object-type: PipeWire:Interface:EndpointLink/0
*	properties:
*		module.id = "21"
*		object.id = "27"
*		object.serial = "27"
*		factory.name = "endpoint-link"
*		factory.type.name = "PipeWire:Interface:EndpointLink"
*		factory.type.version = "0"
	id: 28
	permissions: rwxm
	type: PipeWire:Interface:Node/3
*	input ports: 0/0
*	output ports: 0/0
*	state: "suspended"
*	properties:
*		factory.name = "support.node.driver"
*		node.name = "Dummy-Driver"
*		node.group = "pipewire.dummy"
*		priority.driver = "20000"
*		factory.id = "10"
*		clock.quantum-limit = "8192"
*		node.driver = "true"
*		object.id = "28"
*		object.serial = "28"
*	params: (0)
		none
	id: 29
	permissions: rwxm
	type: PipeWire:Interface:Node/3
*	input ports: 0/0
*	output ports: 0/0
*	state: "suspended"
*	properties:
*		factory.name = "support.node.driver"
*		node.name = "Freewheel-Driver"
*		priority.driver = "19000"
*		node.group = "pipewire.freewheel"
*		node.freewheel = "true"
*		factory.id = "10"
*		clock.quantum-limit = "8192"
*		node.driver = "true"
*		object.id = "29"
*		object.serial = "29"
*	params: (0)
		none
	id: 31
	permissions: rwxm
	type: PipeWire:Interface:Client/3
*	properties:
*		pipewire.protocol = "protocol-native"
*		pipewire.sec.pid = "1701"
*		pipewire.sec.uid = "1000"
*		pipewire.sec.gid = "1000"
*		pipewire.sec.label = "unconfined"
*		module.id = "2"
*		object.id = "31"
*		object.serial = "31"
*		config.prefix = "media-session.d"
*		config.name = "media-session.conf"
*		cpu.max-align = "32"
*		default.clock.rate = "48000"
*		default.clock.quantum = "1024"
*		default.clock.min-quantum = "32"
*		default.clock.max-quantum = "2048"
*		default.clock.quantum-limit = "8192"
*		default.video.width = "640"
*		default.video.height = "480"
*		default.video.rate.num = "25"
*		default.video.rate.denom = "1"
*		log.level = "2"
*		clock.power-of-two-quantum = "true"
*		link.max-buffers = "64"
*		mem.warn-mlock = "false"
*		mem.allow-mlock = "true"
*		settings.check-quantum = "false"
*		settings.check-rate = "false"
*		application.name = "pipewire-media-session"
*		application.process.binary = "pipewire-media-session"
*		application.language = "en_US.UTF-8"
*		application.process.id = "1701"
*		application.process.user = "user"
*		application.process.host = "htpc"
*		core.version = "0.3.48"
*		core.name = "pipewire-user-1701"
*		pipewire.access = "unrestricted"
	id: 32
	permissions: rwxm
	type: PipeWire:Interface:Client/3
*	properties:
*		pipewire.protocol = "protocol-native"
*		pipewire.sec.pid = "1701"
*		pipewire.sec.uid = "1000"
*		pipewire.sec.gid = "1000"
*		pipewire.sec.label = "unconfined"
*		module.id = "2"
*		object.id = "32"
*		object.serial = "32"
*		config.prefix = "media-session.d"
*		config.name = "media-session.conf"
*		cpu.max-align = "32"
*		default.clock.rate = "48000"
*		default.clock.quantum = "1024"
*		default.clock.min-quantum = "32"
*		default.clock.max-quantum = "2048"
*		default.clock.quantum-limit = "8192"
*		default.video.width = "640"
*		default.video.height = "480"
*		default.video.rate.num = "25"
*		default.video.rate.denom = "1"
*		log.level = "2"
*		clock.power-of-two-quantum = "true"
*		link.max-buffers = "64"
*		mem.warn-mlock = "false"
*		mem.allow-mlock = "true"
*		settings.check-quantum = "false"
*		settings.check-rate = "false"
*		application.name = "pipewire-media-session"
*		application.process.binary = "pipewire-media-session"
*		application.language = "en_US.UTF-8"
*		application.process.id = "1701"
*		application.process.user = "user"
*		application.process.host = "htpc"
*		core.version = "0.3.48"
*		core.name = "pipewire-user-1701"
*		pipewire.access = "unrestricted"
	id: 33
	permissions: rwxm
	type: PipeWire:Interface:Client/3
*	properties:
*		pipewire.protocol = "protocol-native"
*		pipewire.sec.pid = "3166"
*		pipewire.sec.uid = "1000"
*		pipewire.sec.gid = "1000"
*		pipewire.sec.label = "unconfined"
*		module.id = "2"
*		object.id = "33"
*		object.serial = "37"
*		log.level = "0"
*		cpu.max-align = "32"
*		default.clock.rate = "48000"
*		default.clock.quantum = "1024"
*		default.clock.min-quantum = "32"
*		default.clock.max-quantum = "2048"
*		default.clock.quantum-limit = "8192"
*		default.video.width = "640"
*		default.video.height = "480"
*		default.video.rate.num = "25"
*		default.video.rate.denom = "1"
*		clock.power-of-two-quantum = "true"
*		link.max-buffers = "64"
*		mem.warn-mlock = "false"
*		mem.allow-mlock = "true"
*		settings.check-quantum = "false"
*		settings.check-rate = "false"
*		application.name = "pw-cli"
*		application.process.binary = "pw-cli"
*		application.language = "en_US.UTF-8"
*		application.process.id = "3166"
*		application.process.user = "user"
*		application.process.host = "htpc"
*		application.process.session-id = "1"
*		window.x11.display = ":0"
*		core.version = "0.3.48"
*		core.name = "pipewire-user-3166"
*		pipewire.access = "unrestricted"

$ # Current man page documents this as `$ pw-cli list-objects Node` but below works too

$ # NOTE: `state: "suspended"` for both below Nodes and no IO ports (all set to zero) from above info all

$ pw-cli ls Node
        id 28, type PipeWire:Interface:Node/3
                object.serial = "28"
                factory.id = "10"
                priority.driver = "20000"
                node.name = "Dummy-Driver"
        id 29, type PipeWire:Interface:Node/3
                object.serial = "29"
                factory.id = "10"
                priority.driver = "19000"
                node.name = "Freewheel-Driver"

PipeWire known GUI's

NOTE: These may or may not work on older versions of PipeWire (seems unuseful on my version so far).

@neo1973
Copy link
Member

neo1973 commented Apr 15, 2024

Debug logs were included about 10 minutes after issue creation.

I see the logs but they are not debug logs, please see https://kodi.wiki/view/Log_file on how to create one.

Still trying to find any command that actually shows if PipeWire is installed. I certainly didn't add their PPA.

According to the German Ubuntu wiki https://wiki.ubuntuusers.de/Pipewire/ (I can't find any English documentation at all) PipeWire is provided starting 22.04 but shouldn't be the default for audio, still it's already used for WebRTC by web browsers. Not sure if that means that the PipeWire socket should exist. You can disable PipeWire entirely via systemctl --user --now disable pipewire.socket pipewire.service but that maybe interferes with other stuff.

is what broke it. If removed then it resumes normal operation with PulseAudio.

That makes sense. But removing it breaks PipeWire for the uses that want to use it, see flathub/tv.kodi.Kodi#240 and in the forum. I'm not sure how Kodi should detect to use PulseAudio over PipeWire if both are present. And something is present on your system, Kodi is seeing one device:

2024-04-15 09:17:03.450 T:14       info <general>: Found 1 Lists of Devices
2024-04-15 09:17:03.450 T:14       info <general>: Enumerated PIPEWIRE devices:
2024-04-15 09:17:03.450 T:14       info <general>:     Device 1
2024-04-15 09:17:03.450 T:14       info <general>:         m_deviceName      : Default
2024-04-15 09:17:03.450 T:14       info <general>:         m_displayName     : Default
2024-04-15 09:17:03.450 T:14       info <general>:         m_displayNameExtra: Default Output Device (PIPEWIRE)
2024-04-15 09:17:03.450 T:14       info <general>:         m_deviceType      : AE_DEVTYPE_PCM
2024-04-15 09:17:03.450 T:14       info <general>:         m_channels        : FL, FR
2024-04-15 09:17:03.450 T:14       info <general>:         m_sampleRates     : 5512,8000,11025,16000,22050,32000,44100,48000,64000,88200,96000,176400,192000,384000
2024-04-15 09:17:03.450 T:14       info <general>:         m_dataFormats     : AE_FMT_RAW,AE_FMT_U8,AE_FMT_S16NE,AE_FMT_S24NE4,AE_FMT_S32NE,AE_FMT_S24NE3,AE_FMT_FLOAT
2024-04-15 09:17:03.450 T:14       info <general>:         m_streamTypes     : No passthrough capabilities

@lrusak: Do you know of way how to determine if PipeWire is fully working?

The Ubuntu PPA has been severely out of date, missing binaries, etc, and definitely didn't target PipeWire on any production machines that I've serviced. It was also labeled as PulseAudio... so not sure what you mean here. It's also been "retired".

I'm not talking about Ubuntu in particular, on every Linux distribution that is running PipeWire it will be Kodis preferred choice.

@Martii
Copy link
Author

Martii commented Apr 15, 2024

@neo1973

... not debug logs ...

My bad was on that page to find the log file location and totally missed that. :) ... Created and updated above with both put below standard logs.

something is present on your system, Kodi is seeing one device

I assume it's the "Built in Audio" i.e. the motherboard sound which is disabled in the Audio System Settings in KDE/Plasma... can temporarily disable it in BIOS to confirm (Probably should be since I have no analog speakers hooked up). No other hardware sound cards other than HDMI out. EDIT Nope not the onboard audio. Don't have clue... possibly a virtual? EDIT Looking at pactl and Default Channel Map: front-left,front-right that is the HDMI default profile but I switch it to what I have instead... maybe that?

Appreciate the extra tips and time.

@lrusak
Copy link
Contributor

lrusak commented Apr 15, 2024

Pipewire (and pulseaudio) will likely always have a default device available. It may not be an actual hardware device and may just be a null sink if no hardware is available (or is being held by another soundserver).

@MyCookie MyCookie mentioned this issue Apr 17, 2024
7 tasks
@Erick555
Copy link

Erick555 commented Apr 18, 2024

It's not an option to not expose the PipeWire socket as this breaks the setup for people with a working PipeWire install.

Isn't pipewire re-using pulseaudio socket for compat reasons? Why you need native socket? native socket was historically used for non-audio stuff so it's very common to have both sockets avalaible but using pulse for audio. SDL2 was facing similar issue and are now defaulting to pipewire only if it's above 1.0 which is also not perfect but shouldn't break older distros.

@fritsch
Copy link
Member

fritsch commented Apr 18, 2024

I think i'ts the other way round - it provides a pulse compatible socket, so that native pulseaudio clients connect seamlessly into pipewire.

@Martii
Copy link
Author

Martii commented Apr 18, 2024

SDL2 was facing similar issue and are now defaulting to pipewire only if it's above 1.0 which is also not perfect but shouldn't break older distros.

That seems reasonable. I was thinking yesterday "What an early PipeWire version... pre-production?"... when I finally found the package names above. I assume it will eventually be bumped on LTS. 22.x distro has ~8 more years of pro support... if they don't bump... :\ 23.x of K/Ubuntu does default to PipeWire from what I've read.

That leads into the unanswered question of @neo1973 's:

Do you know of way how to determine if PipeWire is fully working?

... The process logic you describe @Erick555 would probably be an excellent indicator of when not to use (initialize as Kodi default according to the PR by @fritsch ) PipeWire.

@neo1973
Copy link
Member

neo1973 commented Apr 18, 2024

To summarize, the problem is that in some system configurations PipeWire is running but it's not driving the audio system. Ideally there would be a PipeWire mechanisms to detect such a situation but so far that doesn't exist: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1835

SDL just recently worked around this by checking systemd if pipewire-pulse.service is running: libsdl-org/SDL#9473

@Erick555
Copy link

SDL just recently worked around this by checking systemd if pipewire-pulse.service is running

You may see in the PR I linked above that was reverted and they're checking for pipewire version instead.

@Martii
Copy link
Author

Martii commented May 8, 2024

@neo1973

Did #25019 and #25043 make it into either one of these flatpak releases today?:

$ flatpak remote-info --log flathub tv.kodi.Kodi
        ID: tv.kodi.Kodi
       Ref: app/tv.kodi.Kodi/x86_64/stable
      Arch: x86_64
    Branch: stable
Collection: org.flathub.Stable
  Download: 220.7 MB
 Installed: 508.3 MB
   Runtime: org.freedesktop.Platform/x86_64/22.08
       Sdk: org.freedesktop.Sdk/x86_64/22.08

    Commit: 54a88d5dd9f7f477144a2ab9aeee4e161eae88326cc36a67c024f0f435e3d256
    Parent: c37a408730e54535c25dae2e9bcaf62c417cdeacc03219a3833349ac53429a1b
   Subject: Bump FFmpeg to version 6.0.1 (268a8751)
      Date: 2024-05-07 07:09:53 +0000
   History: 

    Commit: c37a408730e54535c25dae2e9bcaf62c417cdeacc03219a3833349ac53429a1b
   Subject: Bump FFmpeg to version 6.0.1 (990163a8)
      Date: 2024-05-07 01:10:04 +0000

... if they did then the issue is still present on several production machines. :\ The one I submitted here seems (redoing Kodi flatpak from scratch as we speak with no data folder just to be sure) to be okay but several others aren't. They keep picking PipeWire... I realize the Accepted Fix above still works but curious as to why out of the box is not working everywhere. I didn't "work-around" two machines with the switch at all and still picking PipeWire. I'll update more when I can... but would be nice to know if those flatpak release commits include those two PRs please. TIA.


$ flatpak info tv.kodi.Kodi

Team Kodi - Ultimate entertainment center

          ID: tv.kodi.Kodi
         Ref: app/tv.kodi.Kodi/x86_64/stable
        Arch: x86_64
      Branch: stable
     Version: 21.0-Omega
     License: GPL-2.0-only GPL-2.0-or-later LGPL-2.1-or-later MIT BSD-3-Clause BSD-4-Clause
      Origin: flathub
  Collection: org.flathub.Stable
Installation: system
   Installed: 508.3 MB
     Runtime: org.freedesktop.Platform/x86_64/22.08
         Sdk: org.freedesktop.Sdk/x86_64/22.08

      Commit: 54a88d5dd9f7f477144a2ab9aeee4e161eae88326cc36a67c024f0f435e3d256
      Parent: c37a408730e54535c25dae2e9bcaf62c417cdeacc03219a3833349ac53429a1b
     Subject: Bump FFmpeg to version 6.0.1 (268a8751)
        Date: 2024-05-07 07:09:53 +0000

Confirmed... the system with a discrete GPU over HDMI (What I've been reporting here) appears to be working normally and picks PulseAudio by default... however at least two others that don't have a discrete GPU do not. One is using DisplayPort (DP) adapted to HDMI monitor with built-in speakers. The other is DP out to DP monitor with no built in speakers (has analog Speakers). These two still pick PipeWire as default. I'll run a few tests on one of them and post some more things here if those two release commits include both pulls.

@Erick555
Copy link

Erick555 commented May 8, 2024

None of the fixes made it into flatpak yet. You may report it in https://github.com/flathub/tv.kodi.Kodi/issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triage: Needed (managed by bot!) issue that was just created and needs someone looking at it
Projects
None yet
Development

No branches or pull requests

5 participants