You are not logged in.

#1 2024-12-31 15:36:27

xornet
Member
Registered: 2024-12-31
Posts: 1

Pipewire/Wireplumber: Can't set default volume for usb-c monitor

Hello community!
Happy New Year everyone!
Hope someone can help me to solve one annoying sound issue smile

I have an issue on a fresh Linux Arch installation with my pipewire/wireplumber configuration.
I have this hardware:

  • Lenovo Thinkpad T15 Gen2 Laptop

  • Lenovo Thunderbolt 4 dock station

  • USB-C monitor which is connected to that dock station. That monitor has audio speakers

The problem: Whenever I re-connect my monitor or my monitor turns off or goes to sleep (due to inactivity for example) the volume of monitor speakers are getting reset to 100%. Which is.. inconvenient, especially at nights smile
I've tried to set default-sink-volume but it doesn't work. Here is my wpctl settings:

❯ wpctl settings | grep -B4 '\[Saved:'
- Name: bluetooth.autoswitch-to-headset-profile
  Desc: Whether to autoswitch to BT headset profile or not
  Type: Boolean
  Default: true
  Value: true   [Saved: true]
--
- Name: device.routes.default-sink-volume
  Desc: The default volume for sink devices
  Type: Float
  Default: 0.064        [Min: 0.0, Max: 1.0]
  Value: 0.1    [Saved: 0.1]

My software:

  • Fresh Arch installation

  • KDE plasma 6 installed as package plasma-meta

  • pipewire and wireplumber

Related packages:

❯ pacman -Qs | grep -E '^local/.*(pipewire|wireplumber|pulse|alsa|sof-firmware)'
local/alsa-card-profiles 1:1.2.7-1
local/alsa-firmware 1.2.4-4
local/alsa-lib 1.2.13-1
local/alsa-topology-conf 1.2.5.1-4
local/alsa-ucm-conf 1.2.13-2
local/alsa-utils 1.2.13-2
local/kpipewire 6.2.4-1 (plasma)
local/libpipewire 1:1.2.7-1
local/libpulse 17.0+r43+g3e2bb8a1e-1
local/libwireplumber 0.5.7-1
local/pipewire 1:1.2.7-1
local/pipewire-alsa 1:1.2.7-1
local/pipewire-audio 1:1.2.7-1
local/pipewire-jack 1:1.2.7-1
local/pipewire-pulse 1:1.2.7-1
local/pipewire-session-manager 1:1.2.7-1
local/pulse-native-provider 1:1.2.7-1
local/pulseaudio-qt 1.6.1-1
local/sof-firmware 2024.09.2-1
local/wireplumber 0.5.7-1
❯ pacman -Qe plasma-meta
plasma-meta 6.1-1
❯ uname -a
Linux xornet-book 6.12.7-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 27 Dec 2024 14:24:37 +0000 x86_64 GNU/Linux

This is my wpctl status output related to my sinks at the moment:

Audio
 ├─ Devices:
 │      59. Tiger Lake-LP Smart Sound Technology Audio Controller [alsa]
 │     106. ThinkPad Thunderbolt 4 Dock USB Audio [alsa]
 │     179. WH-1000XM4                          [bluez5]
 │
 ├─ Sinks:
 │      78. Tiger Lake-LP Smart Sound Technology Audio Controller Headphones [vol: 1.00]
 │     101. Tiger Lake-LP Smart Sound Technology Audio Controller HDMI / DisplayPort 3 Output [vol: 1.00]
 │     108. ThinkPad Thunderbolt 4 Dock USB Audio Analog Stereo [vol: 0.40]
 │     127. Tiger Lake-LP Smart Sound Technology Audio Controller HDMI / DisplayPort 1 Output [vol: 0.21]
 │     135. Tiger Lake-LP Smart Sound Technology Audio Controller HDMI / DisplayPort 2 Output [vol: 1.00]
 │  *  181. WH-1000XM4                          [vol: 0.37]
 │
 ├─ Sources:
 │     134. Tiger Lake-LP Smart Sound Technology Audio Controller Digital Microphone [vol: 0.96]
 │     141. Tiger Lake-LP Smart Sound Technology Audio Controller Headphones Stereo Microphone [vol: 1.00]
 │
 ├─ Filters:
 │    - loopback-1570633-23
 │     170. bluez_capture_internal.14:3F:A6:10:E8:C3                     [Stream/Input/Audio/Internal]
 │  *  178. bluez_input.14:3F:A6:10:E8:C3                                [Audio/Source]

Sink that I'm looking to fix is Tiger Lake-LP Smart Sound Technology Audio Controller HDMI / DisplayPort 1 Output

I managed to fix sink priorities and it works (before that my dock station analog audio always took precedence):

❯ cat ~/.config/wireplumber/wireplumber.conf.d/lower-integrated-priority.conf
monitor.alsa.rules = [
        {
                matches = [{
                        node.name = "alsa_output.usb-Lenovo_ThinkPad_Thunderbolt_4_Dock_USB_Audio_000000000000-00.analog-stereo"
                }]
                actions = {
                        update-props = {
                                priority.driver = 500
                                priority.session = 500
                        }
                }
        }
]

But I don't know how to setup volume for a matched device and default-sink-volume doesn't work either.

Even better solution would be if it could save volume level and restore it to the same level after re-connect.

Also I need to mention: I've already disabled and masked pipewire and wireplumber under SDDM user as suggested here: It doesn't work either.

P.S. This problem I see only on that USB-C monitoor sink. Internal speakers are defaulted to 40% and Bluetooth headset even saves it's volume between reconnects.

Thank you!

Offline

Board footer

Powered by FluxBB