Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Wireplumber/pipewire outputs black screen on hyprland
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
zeio
n00b
n00b


Joined: 01 Nov 2023
Posts: 3

PostPosted: Mon Nov 20, 2023 1:59 am    Post subject: Wireplumber/pipewire outputs black screen on hyprland Reply with quote

Hi, I am trying to make pipewire work on my gentoo installation with wayland, but unfortunately it doesn't see any devices. I am not very interested in using 'pipewire' as an audio server, I want to use it at least for enabling screen recoding in OBS studio. I've enabled 'pipewire' and 'screencast' use flags, installed 'pipewire' and 'wireplumber':

Code:

pipewire
Compiled with libpipewire 0.3.80
Linked with libpipewire 0.3.80
wireplumber
Compiled with libwireplumber 0.4.14
Linked with libwireplumber 0.4.14


I've added myself to the 'pipewire' group according to the documentation. Copied configuration files from '/usr/share/pipewire/pipewire.conf' to '/etc/pipewire/pipewire.conf' and '~/.config/pipewire/pipewire.conf'. I am starting the wireplumber and pipewire with the following command:

Code:

gentoo-pipewire-launcher


Then I run 'wpctl status', which displays no devices:

Code:

PipeWire 'pipewire-0' [0.3.80, cait@gen2, cookie:3468668857]
 └─ Clients:
        32. WirePlumber                         [0.3.80, cait@gen2, pid:9475]
        33. WirePlumber [export]                [0.3.80, cait@gen2, pid:9475]
        36. wpctl                               [0.3.80, cait@gen2, pid:13588]

Audio
 ├─ Devices:
 │
 ├─ Sinks:
 │
 ├─ Sink endpoints:
 │
 ├─ Sources:
 │
 ├─ Source endpoints:
 │
 └─ Streams:

Video
 ├─ Devices:
 │
 ├─ Sinks:
 │
 ├─ Sink endpoints:
 │
 ├─ Sources:
 │
 ├─ Source endpoints:
 │
 └─ Streams:

Settings
 └─ Default Configured Node Names:


But when I run 'pactl list sinks', it shows a sink:

Code:

Sink #0
   State: SUSPENDED
   Name: alsa_output.pci-0000_00_14.2.analog-stereo
   Description: Built-in Audio Analog Stereo
   Driver: module-alsa-card.c
   Sample Specification: s16le 2ch 48000Hz
   Channel Map: front-left,front-right
   Owner Module: 7
   Mute: no
   Volume: front-left: 39280 /  60% / -13.34 dB,   front-right: 39280 /  60% / -13.34 dB
           balance 0.00
   Base Volume: 65536 / 100% / 0.00 dB
   Monitor Source: alsa_output.pci-0000_00_14.2.analog-stereo.monitor
   Latency: 0 usec, configured 0 usec
   Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
   Properties:
      alsa.resolution_bits = "16"
      device.api = "alsa"
      device.class = "sound"
      alsa.class = "generic"
      alsa.subclass = "generic-mix"
      alsa.name = "CX20751/2 Analog"
      alsa.id = "CX20751/2 Analog"
      alsa.subdevice = "0"
      alsa.subdevice_name = "subdevice #0"
      alsa.device = "0"
      alsa.card = "1"
      alsa.card_name = "HD-Audio Generic"
      alsa.long_card_name = "HD-Audio Generic at 0xf0d64000 irq 42"
      alsa.driver_name = "snd_hda_intel"
      device.bus_path = "pci-0000:00:14.2"
      sysfs.path = "/devices/pci0000:00/0000:00:14.2/sound/card1"
      device.bus = "pci"
      device.vendor.id = "1022"
      device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
      device.product.id = "780d"
      device.product.name = "FCH Azalia Controller"
      device.form_factor = "internal"
      device.string = "front:1"
      device.buffering.buffer_size = "352768"
      device.buffering.fragment_size = "176384"
      device.access_mode = "mmap+timer"
      device.profile.name = "analog-stereo"
      device.profile.description = "Analog Stereo"
      device.description = "Built-in Audio Analog Stereo"
      module-udev-detect.discovered = "1"
      device.icon_name = "audio-card-pci"
   Ports:
      analog-output-speaker: Speakers (type: Speaker, priority: 10000, availability unknown)
      analog-output-headphones: Headphones (type: Headphones, priority: 9900, not available)
   Active Port: analog-output-speaker
   Formats:
      pcm


And 'pactl list sources' displays two sources:

Code:

Source #0
   State: SUSPENDED
   Name: alsa_output.pci-0000_00_14.2.analog-stereo.monitor
   Description: Monitor of Built-in Audio Analog Stereo
   Driver: module-alsa-card.c
   Sample Specification: s16le 2ch 48000Hz
   Channel Map: front-left,front-right
   Owner Module: 7
   Mute: no
   Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
           balance 0.00
   Base Volume: 65536 / 100% / 0.00 dB
   Monitor of Sink: alsa_output.pci-0000_00_14.2.analog-stereo
   Latency: 0 usec, configured 0 usec
   Flags: DECIBEL_VOLUME LATENCY
   Properties:
      device.description = "Monitor of Built-in Audio Analog Stereo"
      device.class = "monitor"
      alsa.card = "1"
      alsa.card_name = "HD-Audio Generic"
      alsa.long_card_name = "HD-Audio Generic at 0xf0d64000 irq 42"
      alsa.driver_name = "snd_hda_intel"
      device.bus_path = "pci-0000:00:14.2"
      sysfs.path = "/devices/pci0000:00/0000:00:14.2/sound/card1"
      device.bus = "pci"
      device.vendor.id = "1022"
      device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
      device.product.id = "780d"
      device.product.name = "FCH Azalia Controller"
      device.form_factor = "internal"
      device.string = "1"
      module-udev-detect.discovered = "1"
      device.icon_name = "audio-card-pci"
   Formats:
      pcm

Source #1
   State: SUSPENDED
   Name: alsa_input.pci-0000_00_14.2.analog-stereo
   Description: Built-in Audio Analog Stereo
   Driver: module-alsa-card.c
   Sample Specification: s16le 2ch 44100Hz
   Channel Map: front-left,front-right
   Owner Module: 7
   Mute: no
   Volume: front-left: 27291 /  42% / -22.83 dB,   front-right: 27291 /  42% / -22.83 dB
           balance 0.00
   Base Volume: 13076 /  20% / -42.00 dB
   Monitor of Sink: n/a
   Latency: 0 usec, configured 0 usec
   Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
   Properties:
      alsa.resolution_bits = "16"
      device.api = "alsa"
      device.class = "sound"
      alsa.class = "generic"
      alsa.subclass = "generic-mix"
      alsa.name = "CX20751/2 Analog"
      alsa.id = "CX20751/2 Analog"
      alsa.subdevice = "0"
      alsa.subdevice_name = "subdevice #0"
      alsa.device = "0"
      alsa.card = "1"
      alsa.card_name = "HD-Audio Generic"
      alsa.long_card_name = "HD-Audio Generic at 0xf0d64000 irq 42"
      alsa.driver_name = "snd_hda_intel"
      device.bus_path = "pci-0000:00:14.2"
      sysfs.path = "/devices/pci0000:00/0000:00:14.2/sound/card1"
      device.bus = "pci"
      device.vendor.id = "1022"
      device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
      device.product.id = "780d"
      device.product.name = "FCH Azalia Controller"
      device.form_factor = "internal"
      device.string = "front:1"
      device.buffering.buffer_size = "352768"
      device.buffering.fragment_size = "176384"
      device.access_mode = "mmap+timer"
      device.profile.name = "analog-stereo"
      device.profile.description = "Analog Stereo"
      device.description = "Built-in Audio Analog Stereo"
      module-udev-detect.discovered = "1"
      device.icon_name = "audio-card-pci"
   Ports:
      analog-input-internal-mic: Internal Microphone (type: Mic, priority: 8900, availability unknown)
      analog-input-mic: Microphone (type: Mic, priority: 8700, not available)
   Active Port: analog-input-internal-mic
   Formats:
      pcm


When I run 'pw-top' it displays two processes - 'Dummy-Driver' and 'Freewheel-Driver'.

My use flags for 'pipewire':

Code:

 U I
 + + X             : Enable audible bell for X11
 - - abi_x86_32    : 32-bit (x86) libraries
 + + bluetooth     : Enable Bluetooth Support
 + + dbus          : Enable dbus support for anything that needs it (gpsd, gnomemeeting, etc)
 - - doc           : Add extra documentation (API, Javadoc, etc). It is recommended to enable per package
                     instead of globally
 - - echo-cancel   : Enable WebRTC-based echo canceller via media-libs/webrtc-audio-processing
 - - extra         : Build pw-cat/pw-play/pw-record
 - - ffmpeg        : Enable ffmpeg/libav-based audio/video codec support
 - - flatpak       : Enable Flatpak support
 - - gsettings     : Use gsettings (dev-libs/glib) to read/save used modules (useful for e.g.
                     media-sound/paprefs
 + + gstreamer     : Add support for media-libs/gstreamer (Streaming media)
 - - ieee1394      : Enable FireWire/iLink IEEE1394 support (dv, camera, ...)
 - - jack-client   : Install a plugin for running PipeWire as a JACK client
 - - jack-sdk      : Use PipeWire as JACK replacement
 - - liblc3        : Allow loading LC3 plugins via media-sound/liblc3
 - - lv2           : Allow loading LV2 plugins via media-libs/lv2
 - - modemmanager  : Combined with USE=bluetooth, allows PipeWire to perform telephony on mobile devices.
 - - pipewire-alsa : Replace PulseAudio's ALSA plugin with PipeWire's plugin
 + + readline      : Enable support for libreadline, a GNU line-editing library that almost everyone wants
 - - roc           : Enable roc support for real-time audio streaming over the network, using
                     media-libs/roc-toolkit. See
                     https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Network#roc
 - - sound-server  : Provide sound server using ALSA and bluetooth devices
 + + ssl           : Enable raop-sink support (needs dev-libs/openssl)
 - - systemd       : Enable use of systemd-specific libraries and features like socket activation or session
                     tracking
 - - test          : Enable dependencies and/or preparations necessary to run tests (usually controlled by
                     FEATURES=test but can be toggled independently)
 - - v4l           : Enable support for video4linux (using linux-headers or userspace libv4l libraries)
 - - zeroconf      : Support for DNS Service Discovery (DNS-SD)


And for 'wireplumber':

Code:

U I
 + + elogind                  : Enable session tracking via sys-auth/elogind
 - - lua_single_target_lua5-3 : Build for Lua 5.3 only
 + + lua_single_target_lua5-4 : Build for Lua 5.4 only
 - - systemd                  : Enable use of systemd-specific libraries and features like socket activation
                                or session tracking
 - - test                     : Enable dependencies and/or preparations necessary to run tests (usually
                                controlled by FEATURES=test but can be toggled independently)


UPDATE: It seems that it is a normal behavior that no devices are listed when running 'wpctl status'.

I've moved 'wireplumber' launcher to 'hyprland.conf' like this:

Code:

exec-once = dbus-update-activation-environment & /home/cait/.config/hypr/xdg-portal-hyprland.sh & gentoo-pipewire-launcher & waybar


and tested OBS studio on on 'gnome' instead of 'hyprland'. On 'gnome' it works perfectly - I launch OBS studio and there is an option to choose either screen capture either window capture through pipewire. Here is the fragment from OBS studio logs:

Code:

info: [pipewire] Available captures:
info: [pipewire]     - Desktop capture
info: [pipewire]     - Window capture


Now when I run 'hyprland' there are same messages in logs saying that 'pipewire' now detects my screen. However, after I add screen capture to scene, the following message starts to be printed into log repeatedly:

Code:

info: [pipewire] Negotiated format:
info: [pipewire]     Format: 8 (Spa:Enum:VideoFormat:BGRx)
info: [pipewire]     Modifier: 0x0
info: [pipewire]     Size: 669x741
info: [pipewire]     Framerate: 0/1


And the screen is black, so screen recording still doesn't work. Can anybody help me please figure out what I am doing wrong
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
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